1159cl/lib/icecast-metadata-player-1.17.3.synaudio.min.js.map
Mario1159 5b6b79892c
Some checks failed
Release / test (push) Failing after 51s
Release / push-docker-image (push) Has been skipped
2024 new version
2024-12-06 20:38:18 -03:00

1 line
46 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"icecast-metadata-player-1.17.3.synaudio.min.js","mappings":";;;;;;;;;;;;;;;;;;;;yGAeAA,EAAOC,QAAUC,M,+CCfjB,MAAMC,EAAE,CAACA,EAAEC,EAAE,WAAWC,EAAE,YAAY,MAAMC,EAAE,IAAIC,WAAW,KAAK,IAAIC,EAAEC,EAAEC,EAAEC,EAAEP,EAAE,IAAII,EAAE,EAAEA,EAAE,IAAIA,IAAI,CAAC,IAAIE,EAAEF,GAAG,GAAGC,EAAE,EAAEA,EAAE,IAAIA,EAAEC,EAAE,WAAWA,EAAEA,GAAG,EAAEL,EAAEK,GAAG,EAAEJ,EAAEE,GAAGE,CAAC,CAAC,IAAIF,EAAE,EAAEA,EAAEL,EAAES,OAAOJ,IAAIG,EAAEA,GAAG,EAAEL,EAAE,KAAKK,GAAG,GAAGR,EAAEK,KAAK,OAAOG,GAAmLN,EAAE,CAACD,EAAEC,EAAEF,KAAK,MAAMG,EAAEH,GAAG,IAAIU,WAAWV,EAAES,OAAO,GAAGE,KAAI,CAAEV,EAAEC,IAAIU,SAASZ,EAAEa,UAAU,EAAEX,EAAE,GAAGA,EAAE,IAAI,MAAMG,EAAEL,GAAGG,EAAEH,GAAG,GAAGM,EAAE,IAAIQ,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,KAAK,KAAK,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK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://IcecastMetadataPlayer/./node_modules/simple-yenc/dist/esm.js","webpack://IcecastMetadataPlayer/./node_modules/synaudio/src/SynAudio.js","webpack://IcecastMetadataPlayer/./node_modules/synaudio/index.js"],"sourcesContent":["/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nmodule.exports = Worker;","const t=(t,n=4294967295,e=79764919)=>{const r=new Int32Array(256);let o,s,i,c=n;for(o=0;o<256;o++){for(i=o<<24,s=8;s>0;--s)i=2147483648&i?i<<1^e:i<<1;r[o]=i}for(o=0;o<t.length;o++)c=c<<8^r[255&(c>>24^t[o])];return c},n=t=>{const n=[];for(const e of t){let t=(e+42)%256;0===t||10===t||13===t||61===t?n.push(\"=\"+String.fromCharCode((t+64)%256)):n.push(String.fromCharCode(t))}return n.join(\"\")},e=(n,e=t)=>{const r=t=>new Uint8Array(t.length/2).map(((n,e)=>parseInt(t.substring(2*e,2*(e+1)),16))),o=t=>r(t)[0],s=new Map;[,8364,,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,,381,,,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,,382,376].forEach(((t,n)=>s.set(t,n)));const i=new Uint8Array(n.length);let c,a,l,f=!1,g=0,h=42,p=n.length>13&&\"dynEncode\"===n.substring(0,9),u=0;p&&(u=11,a=o(n.substring(9,u)),a<=1&&(u+=2,h=o(n.substring(11,u))),1===a&&(u+=8,l=(t=>new DataView(r(t).buffer).getInt32(0,!0))(n.substring(13,u))));const d=256-h;for(let t=u;t<n.length;t++)if(c=n.charCodeAt(t),61!==c||f){if(92===c&&t<n.length-5&&p){const e=n.charCodeAt(t+1);117!==e&&85!==e||(c=parseInt(n.substring(t+2,t+6),16),t+=5)}if(c>255){const t=s.get(c);t&&(c=t+127)}f&&(f=!1,c-=64),i[g++]=c<h&&c>0?c+d:c-h}else f=!0;const m=i.subarray(0,g);if(p&&1===a){const t=e(m);if(t!==l){const n=\"Decode failed crc32 validation\";throw console.error(\"`simple-yenc`\\n\",n+\"\\n\",\"Expected: \"+l+\"; Got: \"+t+\"\\n\",\"Visit https://github.com/eshaz/simple-yenc for more information\"),Error(n)}}return m},r=(n,e='\"',r=t,o)=>{const s=(t,n)=>(t%n+n)%n,i=(t,n)=>n.push(String.fromCharCode(61,(t+64)%256)),c=t=>t.map((t=>t.toString(16).padStart(2,\"0\")));let a,l,f=[],g=1/0,h=Array(256).fill(0);if('\"'===e?(l=[0,8,9,10,11,12,13,34,92,61],a=t=>0===t||8===t||9===t||10===t||11===t||12===t||13===t||34===t||92===t||61===t):\"'\"===e?(l=[0,8,9,10,11,12,13,39,92,61],a=t=>0===t||8===t||9===t||10===t||11===t||12===t||13===t||39===t||92===t||61===t):\"`\"===e&&(l=[13,61,96],f=[7,205,231],a=(t,n)=>13===t||36===t&&123===n||61===t||92===t&&(85===n||117===n)||96===t),void 0===o){o=0;for(let t=0;t<n.length;t++){const e=0|n[t];h[e]++;for(let r=0;r<f.length;r++){const o=f[r];s(e-n[t+1]|0,256)===o&&h[e]++}}for(let t=0;t<256;t++){let n=0;for(let e=0;e<l.length;e++)n+=h[s(l[e]-t,256)];n<g&&(g=n,o=t)}}const p=[\"dynEncode\",\"01\",c([o]),...c((t=>{const n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),[...n]})(r(n)))];for(let t=0;t<n.length;t++){const e=(n[t]+o)%256;a(e,(n[t+1]+o)%256)?i(e,p):p.push(String.fromCharCode(e))}return\"\\\\\"===p[p.length-1]&&(p.pop(),i(92,p)),p.join(\"\")},o=t=>t.replace(/[\\\\]/g,\"\\\\\\\\\").replace(/[`]/g,\"\\\\`\").replace(/\\${/g,\"\\\\${\");export{t as crc32,e as decode,r as dynamicEncode,n as encode,o as stringify};\n","/* Copyright 2022-2023 Ethan Halsall\n \n This file is part of synaudio.\n \n synaudio is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n synaudio is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with this program. If not, see <https://www.gnu.org/licenses/>\n*/\n\nimport { decode } from \"simple-yenc\";\nimport Worker from \"@eshaz/web-worker\";\n\n// prettier-ignore\nconst simd=async()=>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]))\n\nconst wasmModule = new WeakMap();\n\n/* WASM strings are embeded during the build */\nconst simdWasm = String.raw`dynEncode01658cce3922eÆØÒfeeefsfÅoääääääääääegtfhÊÓÛkÒÊÒÔ×Þgeghgfekmfäe¦åíipl€gnÈÔ××ÊÑÆÙÊeepÄÄÍÊÆÕÄÇÆØÊheo\u0016Œf\u0013Œivälànâiá©eeeeeeee†“g¥g¥…g¦g­re…g¦fІ|…f¦v³i¥…f¦uІz¦e…†}…e…f¦gه†~…e¦¥Ð‡u†th¥…f…f…‡†{…t†p…u†o¦e†qh¥…e…q‡g¦gÙχq…qbeee…e…g…vϦgÙÏbeeebIfbpee…e…g¦iׇq¦gÙχr…rbeee…e…q…vϦgÙÏbeeebIfbpee…e…g¦mׇq¦gÙχr…rbeee…e…q…vϦgÙÏbeeebIfbpee…e…g¦qׇq¦gÙχr…rbeee…e…q…vϦgÙÏbeeebIfbpee…p‡r¦¥Ð†p…o‡s¦¥Ð†o…g¦uχq…z­repg¥…f…q±reg¥…f…‡o¦i®re…e…q…vϦgÙυ~®iä…e…q¦gÙυe…{¦gÙÏ®j¦epre…o¦áև{¦iЇp¦gÛ¦fϦfֆ…pªi¥¦e†gqfp…z…gЦáÖ¦iЦgÛ¦fϦcdddlֆp¦e†gh¥…s…rbege…sbegebIfbpge…s…rbegu…sbegubIfbpgu……φr……φs…g¦mφg…p¦gЇprepp……e…g…‡g¦gÙχp…e…g…vϦgÙÏbege…pbegebIfbpgep…o…{«rf…f…q…‡†op…q¦ä؆g…o¦fÖiä…e…q¦gÙχo…e…q…vϦgÙϏge…oge÷ge…q¦fÏj…qp†q…g…}«re…f…†p…y…q¦gه†r…e†gh¥…g…‡q…g…‡sge…qge÷ge…q…sgi…qgi÷gi…g¦mφg…p¦gЇprepp…x…†y…t…†t…w¦fχw…|¬repqfp…f¦e±re¦e…†t…f¦fֆu…e…f¦gه†w…f¦i®†y…f¦áևo¦q«†zh¥…f…†s¦e†gg¥g¥…yre…e…e…f…sϦgÙÏ®…w…e…s¦gÙχq°Öre…e…qbege…ebegebIfbpgeg¥…o¦i«re…e…qbegu…ebegubIfbpgu…o¦m«re…e…qbeg……ebeg…bIfbpg……zre…e…qbeg•…ebeg•bIfbpg•p…f…o‡g«rfp…g¦ä؆q…uiä…e…g¦gÙχx…e…g…sϦgÙϏge…xge÷ge…g¦f×j…gp†g…q…t«re…f…†q…p…g¦gه†{…e†gh¥…g…‡s…g…{χ}ge…sge÷ge…s…}gi…sgi÷gi…g¦mφg…q¦gЇqrepp…p…†p…r¦fχr…|¬reppg¥…j¦g­re…j¦fІv…i¦v³i¥…i¦uІ|¦e†y¦e…†{…h…i¦gه†}…h¦¥Ð‡j†t¦e†wh¥…i…i…‡†x…t†p…j†o¦e†qh¥…h…q‡g¦gÙχq…qbeee…h…g…uϦgÙÏbeeebIfbpee…h…g¦iׇq¦gÙχr…rbeee…h…q…uϦgÙÏbeeebIfbpee…h…g¦mׇq¦gÙχr…rbeee…h…q…uϦgÙÏbeeebIfbpee…h…g¦qׇq¦gÙχr…rbeee…h…q…uϦgÙÏbeeebIfbpee…p‡r¦¥Ð†p…o‡s¦¥Ð†o…g¦uχq…|­repg¥…i…q±reg¥…i…‡o¦i®re…h…q…uϦgÙυ}®iä…h…q¦gÙυh…x¦gÙÏ®j¦epre…o¦áևx¦iЇp¦gÛ¦fϦfֆ~g¥…pªi¥¦e†gqfp…|…gЦáÖ¦iЦgÛ¦fϦcdddlֆp¦e†gh¥…s…rbege…sbegebIfbpge…s…rbegu…sbegubIfbpgu……φr……φs…g¦mφg…p¦gЇprepp…~i¥…h…g…‡g¦gÙχp…h…g…uϦgÙÏbege…pbegebIfbpgep…o…x«rf…i…q…‡†op…q¦ä؆g…o¦fÖiä…h…q¦gÙχo…h…q…uϦgÙϏge…oge÷ge…q¦fÏj…qp†q…g…{«re…i…†p…y…q¦gه†r…h†gh¥…g…‡q…g…‡sge…qge÷ge…q…sgi…qgi÷gi…g¦mφg…p¦gЇprepp…y…†y…t…†t…w¦fχw…v¬repqfp…i¦e±re¦e†p¦e…†s…i¦fֆt…h…i¦gه†w…i¦i®†y…i¦áևj¦q«†|¦e†rh¥…i…†o¦e†gg¥g¥…yre…h…h…i…oϦgÙÏ®…w…h…o¦gÙχq°Öre…h…qbege…hbegebIfbpgeg¥…j¦i«re…h…qbegu…hbegubIfbpgu…j¦m«re…h…qbeg……hbeg…bIfbpg……|re…h…qbeg•…hbeg•bIfbpg•p…j‡g…i«rfp…g¦ä؆q…tiä…h…g¦gÙχz…h…g…oϦgÙϏge…zge÷ge…g¦f×j…gp†g…q…s«re…i…†q…p…g¦gه†x…h†gh¥…g…‡o…g…‡{ge…oge÷ge…o…{gi…ogi÷gi…g¦mφg…q¦gЇqrepp…p…†p…r¦fχr…v¬repp¦e†i…n¦e›ge…m¦e›geg¥…k¦e¯i¥…k¦hֆjg¥…k¦fЇi¦h®i¥¦e†oqfp…e†g…k¦áևo†qh¥……gge \u0005…ggi \u0005…ggm \u0005…ggq \u0005†…g¦uφg…q¦iЇqrepp…ji¥…e…o¦gÙφg…j†qh¥……gge \u0005†…g¦iφg…q¦fЇqreppg¥…i¦h®i¥¦e†oqfp…h†g…k¦áևo†qh¥…‘…gge \u0005…ggi \u0005…ggm \u0005…ggq \u0005†‘…g¦uφg…q¦iЇqrepp…ji¥…h…o¦gÙφgh¥…‘…gge \u0005†‘…g¦iφg…j¦fЇjrepp…k¦uІs…‘…k\u001c‡‘\b\u001b†‡…k¦v­i¥¦e†i¦e†qqgp…‡bx†¦e†j…h†gh¥…€…gbeee…bJf‡€…€bKfbIf…gbeeu…bJf‡€…€bKfbIf…gbee……bJf‡€…€bKfbIf…gbee•…bJf‡€…€bKfbIf†€…g¦¥Ð†g…j¦uχj…s­rep…i¦Õֆq¦f†iqfp…k¦uІs…“…k\u001c‡‘\b\u001b†‡¦e†qp…€b„h…€b„g…€b„e…€b„f÷÷÷†ˆ…k…q±re…q¦ä؅†p…k¦hևoiä…h…q¦gÙφg…o†jh¥…gge…‡ø‡‰…‰ù…ˆ÷†ˆ…g¦iφg…j¦fЇjrep…o…q×j…qp†q…p¦h®re…k…†j…h…q¦gÙφgh¥…ggq…‡ø‡‰…‰ù…ggm…‡ø‡‰…‰ù…ggi…‡ø‡‰…‰ù…gge…‡ø‡‰…‰ù…ˆ÷÷÷÷†ˆ…g¦uφg…j¦iЇjrepp¦e†j…ii¥…‡bx†€…h†gh¥…g…gbeee…€bJfbpee…g…gbeeu…€bJfbpeu…g…gbee……€bJfbpe……g…gbee•…€bJfbpe•…g¦¥Ð†g…j¦uχj…s­repp…ˆ…k\u0017¨eeå$÷‡‰ú†ˆ…f…†tg¥…j…k³re…k…k…‡f¦h°iä…f¦áևr¦iЇg¦gÛ¦fχo¦hֆq…‡bx†€¦e†p…g¦q´…o¦adddlֆo…h…j¦gÙφgh¥…g…gbege…€bJfbpge…g…gbegu…€bJfbpgu…g…gbeg……€bJfbpg……g…gbeg•…€bJfbpg•…g¦¥Ð†g…p¦uφp…o¦iЇorepp…qi¥…h…j…pϦgÙφgh¥…g…gbege…€bJfbpge…g¦uφg…q¦fЇqrepp…f…r«rf…j…rÏj…jp‡†q…h…j¦gÙφgh¥…g…gge…‡øge…g¦iφg…q¦fЇqrepp…ˆö†‹…t¦e¯i¥…l¦gنu¦e†r¦e…†v…k¦fֆw…k¦fЦÕֆq…‹ †’…e†oh¥…e…r¦gÙχyge†Ž…e…k…rϦgÙφ|……‘\b\u001b†Š…iªi¥bqeeeeeeeeeeeeeeee†€bqeeeeeeeeeeeeeeee†¦eqfp…Šbx†‚¦e†g¦e†pbqeeeeeeeeeeeeeeee†bqeeeeeeeeeeeeeeee†€……g…‡fbeee…‚bJf‡ƒ…g…‡jbeeebKfbIf…fbeeu…‚bJf‡„…jbeeubKfbIf…fbee……‚bJf‡……jbee…bKfbIf…fbee•…‚bJf‡†…jbee•bKfbIf†…€…ƒ…ƒbKfbIf…„…„bKfbIf…………bKfbIf…†…†bKfbIf†€…g¦¥Ð†g…p¦uχp…s­rep…qp†f…|ge†…€b„h…€b„g…€b„e…€b„f÷÷÷†‡…b„h…b„g…b„e…b„f÷÷÷†ˆ…f…k³re…f¦ä؆g…wiä…y…f¦gهge…Šø‡Œ…h…geù…ˆ÷†ˆ…Œ…Œù…‡÷†‡…f¦f×j…fp†f…g…v«re…f¦gنg…k…†jh¥…g…‡fgi…Šø‡Œ…g…‡pgiù…fge…Šø‡…pgeù…ˆ÷÷†ˆ…Œ…Œù……ù…‡÷÷†‡…g¦mφg…j¦gЇjrepp…ˆ…‰ú …‡…‰ú \u0004…’\u0007\b\u001b‡‡…mgeÃi¥…n…r›ge…m…‡gep……Ž \u0006… \u0005†…o…†o…l…‡r…t­reppg¥…l¦f±re…nge‡f…l…‡‡j…t…j…t­€†t¦e†p…f…‡f¦e…f¦e¯€†rg¥…k¦e±i¥…“†qfp…k¦hֆjg¥…k¦fЦh®i¥…“†qfp…e…r¦gÙφg…“†…k¦áևp†qh¥……gge \u0005…ggi \u0005…ggm \u0005…ggq \u0005†…g¦uφg…q¦iЇqrepp…jªre…e…p…rϦgÙφgh¥……gge \u0005†…g¦iφg…j¦fЇjrepp…r…t³re¦e…†p…k¦fֆu…e…r¦gÙφo…k¦fЦÕֆl…‹ †’…e…r¦gÙχvge†…e…k…rϦgÙφw……‘\b\u001b†Š…iªi¥bqeeeeeeeeeeeeeeee†€bqeeeeeeeeeeeeeeee†¦eqfp…Šbx†‚¦e†q…o†g…h†jbqeeeeeeeeeeeeeeee†bqeeeeeeeeeeeeeeee†€……gbeee…‚bJf‡ƒ…jbeeebKfbIf…gbeeu…‚bJf‡„…jbeeubKfbIf…gbee……‚bJf‡……jbee…bKfbIf…gbee•…‚bJf‡†…jbee•bKfbIf†…€…ƒ…ƒbKfbIf…„…„bKfbIf…………bKfbIf…†…†bKfbIf†€…g¦¥Ð†g…j¦¥Ð†j…q¦uχq…s­rep…lp†f…wge†Ž…€b„h…€b„g…€b„e…€b„f÷÷÷†‡…b„h…b„g…b„e…b„f÷÷÷†ˆ…f…k³re…f¦ä؆g…uiä…v…f¦gهge…Šø‡‹…h…geù…ˆ÷†ˆ…‹…‹ù…‡÷†‡…f¦f×j…fp†f…g…p«re…f¦gنg…k…†jh¥…g…‡fgi…Šø‡‹…g…‡qgiù…fge…Šø‡Œ…qgeù…ˆ÷÷†ˆ…‹…‹ù…Œ…Œù…‡÷÷†‡…g¦mφg…j¦gЇjrepp…ˆ…‰ú …‡…‰ú \u0004…’\u0007\b\u001b‡‡…mgeÃi¥…n…r›ge…m…‡gep…… \u0006…Ž \u0005†…o¦iφo…r¦fχr…t¬reppppetÙÆ×ÌÊÙÄËÊÆÙÚ×ÊØflØÎÒɖ—`;\nconst scalarWasm = String.raw`dynEncode010e15d7b662\u000eo{\u000f\u000e\u000e\u000e\u000f+\u0011n\u0011\u000en\u0013‹‹\u000f‹n\u0018\u000e\u0010\u001d\u000f\u0011s|„\u0014{s{}€‡\u0010\u000e\u0010\u0011\u0012\u0011\u000e\u000f\u0010\u0014\u0016\u000f\u000eOŽ–\u0012\u0019\u0015)\u0010\u0017q}€€szo‚s\u000e\u0010\u0019mmvso~mpos\u0011\u000e\u0018  \u0011Ú\u0011\u0010\u0019\u000f‹\u0010N.\u0010O\u0010V\u001b\u000e.\u0010O\u000fy/\u0014.\u000fO\u0013\\\u0012N.\u000fO\u0012y/\u0015.\u000fO\u0010‚/\u0016.\u000fO\u000f/\u0017\u0011N.\u000e/\u0010O\u000f/\u0012\u0011N.\u0010.\u0010.\u0013x0\u00118\u0010\u000e.\u00108\u0010\u000e F\u0010\u000e.\u0010.\u00118\u0010\u0012.\u00108\u0010\u0012 F\u0010\u0012.\u0010.\u00118\u0010\u0016.\u00108\u0010\u0016 F\u0010\u0016.\u0010.\u00118\u0010\u001a.\u00108\u0010\u001a F\u0010\u001a.\u0010O\u001ex/\u0010.\u0012O\u0011x/\u0011.\u0012O\u0012x/\u0012.\u0011.\u0015V\u001b\u000e\u0019\u0010N.\u000f.\u0012O\u000fy0\u0011Z\u001b\u000e.\u0017\u0012.\u0010.\u0010.\u0013x8\u0010\u000e.\u00108\u0010\u000e F\u0010\u000e.\u0012\u0013.\u0011\u0019/\u0010.\u000f.\u0012T\u001b\u000e.\u000f.\u0010y/\u0012.\u0013.\u0010O\u0010‚0\u0018x/\u0019.\u000e/\u0010\u0011N.\u0010.\u0018x0\u0011.\u0010.\u0019x0\u001a8\u0010\u000e.\u00118\u0010\u000e F\u0010\u000e.\u0011.\u001a8\u0010\u0012.\u00118\u0010\u0012 F\u0010\u0012.\u0010O\u0016x/\u0010.\u0012O\u0010y0\u0012\u001b\u000e\u0019\u0019.\u0013.\u0016x/\u0013.\u0014.\u001bO\u000fx0\u001bU\u001b\u000e\u0019\u001a\u000f\u0019.\u000fO\u000eZ\u001b\u000e.\u000fO\u0010‚/\u0012.\u000e8\u0010\u000e/\u001c.\u000fO\u000fT/\u0011.\u000fO\u0011T/\u0013.\u000e/\u0010\u0011N.\u000e.\u00108\u0010\u000e.\u001c 0\u001cF\u0010\u000e\u0010N.\u0011\u001b\u000e.\u000e.\u00108\u0010\u0012.\u000e8\u0010\u0012 F\u0010\u0012.\u000fO\u0010T\u001b\u000e.\u000e.\u00108\u0010\u0016.\u000e8\u0010\u0016 F\u0010\u0016.\u0013\u001b\u000e.\u000e.\u00108\u0010\u001a.\u000e8\u0010\u001a F\u0010\u001a\u0019.\u0010.\u0012x/\u0010.\u0014O\u000fy0\u0014\u001b\u000e\u0019\u0019\u0019‘\u0011\u0010\u0013\u0014‹\u0010N.\u00120\u0013O\u0013V\u0012O\u000e\u0013.\u0013O\u0012y/\u0017\u0011N.\u000e.\u0014x0\u00128\u0010\u001a.\u0010¡0\u0018.\u000f.\u0014x0\u00168\u0010\u001a¢.\u00128\u0010\u0016.\u0010¡0\u001b.\u00168\u0010\u0016¢.\u00128\u0010\u0012.\u0010¡0\u001c.\u00168\u0010\u0012¢.\u00128\u0010\u000e.\u0010¡0\u001d.\u00168\u0010\u000e¢.\u0019    /\u0019.\u0018.\u0018¢.\u001b.\u001b¢.\u001c.\u001c¢.\u001d.\u001d¢.\u001a    /\u001a.\u0014O\u001ex/\u0014.\u0015O\u0012x0\u0015.\u0017V\u001b\u000e\u0019.\u0013O\u000fyOŠ\u00190\u0012.\u0013\\\u001b\u000e.\u0012O/\u0014.\u0013O\u000f\u0012.\u000e.\u0012O\u0010‚0\u0015x8\u0010\u000e.\u0010¡0\u0018.\u000f.\u0015x8\u0010\u000e¢.\u0019 /\u0019.\u0018.\u0018¢.\u001a /\u001a.\u0012O\u000f€\u0013.\u0012\u0019/\u0012O\u000e.\u0013y.\u0014T\u001b\u000e.\u0013.\u0012y/\u0015.\u000e.\u0012O\u0010‚0\u000ex/\u0014.\u000e.\u000fx/\u000e\u0011N.\u00148\u0010\u0012.\u0010¡0\u0018.\u0018¢.\u00148\u0010\u000e.\u0010¡0\u001b.\u001b¢.\u001a  /\u001a.\u0018.\u000e8\u0010\u0012¢.\u001b.\u000e8\u0010\u000e¢.\u0019  /\u0019.\u0014O\u0016x/\u0014.\u000eO\u0016x/\u000e.\u0015O\u0010y0\u0015\u001b\u000e\u0019\u0019.\u0019.\u0013ÀQ\u000e\u000eŽÍ 0\u0010£É.\u001a.\u0010£É­.\u0011É°±Ä\u0019Ê\u0019\u0011\u0012\u0012‹\u0013ŠR\u000e\u000e\u000e\u000e\u000e\u000e\u000e\u000e/$\u0010N.\u000e.\u000f.\u0010\u001e\u000e.\u0011.\u0012.\u0013\u001e\u000e.\u0017O\u000eD\u0010\u000e.\u0016O\u000eD\u0010\u000e\u0010N.\u0014O\u000eX\u0012N.\u0014O\u0011/\u0013.\u0014O\u000fy0\u0018O\u0011]\u0012N.\u000e/\u0012.\u0014OŠ0\u001a/\u0010\u0011N. .\u00128\u0010\u000eÉ®.\u00128\u0010\u0012É®.\u00128\u0010\u0016É®.\u00128\u0010\u001aÉ®/ .\u0012O\u001ex/\u0012.\u0010O\u0012y0\u0010\u001b\u000e\u0019\u0019.\u0013\u0012N.\u001aO\u0010‚.\u000ex/\u0012.\u0013/\u0010\u0011N. .\u00128\u0010\u000eÉ®/ .\u0012O\u0012x/\u0012.\u0010O\u000fy0\u0010\u001b\u000e\u0019\u0019\u0010N.\u0018O\u0011W\u0012NO\u000e/\u001a\u001a\u000f\u0019.\u0011/\u0012.\u0014OŠ0\u001a/\u0010\u0011N.!.\u00128\u0010\u000eÉ®.\u00128\u0010\u0012É®.\u00128\u0010\u0016É®.\u00128\u0010\u001aÉ®/!.\u0012O\u001ex/\u0012.\u0010O\u0012y0\u0010\u001b\u000e\u0019\u0019.\u0013\u0012N.\u001aO\u0010‚.\u0011x/\u0012\u0011N.!.\u00128\u0010\u000eÉ®/!.\u0012O\u0012x/\u0012.\u0013O\u000fy0\u0013\u001b\u000e\u0019\u0019.\u0014O\u0012y/\u001a.\u0014À/\u001f.\u0014O\u0013V\u0012NO\u000e/\u0018O\u000e/\u0010\u001a\u0010\u0019.!Ä.\u001f£/\u001cO\u000e/\u0013.\u0011/\u0012\u0011N.\u00128\u0010\u001a.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u0016.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u0012.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u000e.\u001c¡0\u001d.\u001d¢.\u001e    /\u001e.\u0012O\u001ex/\u0012.\u0013O\u0012x0\u0013.\u001aV\u001b\u000e\u0019.\u0018OŠ/\u0010O\u000f/\u0018\u001a\u000f\u0019.\u0014O\u0012y/\u001a.\u0014À/\u001fO\u000e/\u0010\u0019.!.\u0014Å0!±Ä/\u001c\u0010N.\u0010.\u0014\\\u001b\u000e.\u0014.\u0010Ox/\u001b.\u0014O\u00110\u0019\u0012.\u0010O\u0010‚.\u0011x/\u0012.\u0019/\u0013\u0011N.\u00128\u0010\u000e.\u001c¡0\u001d.\u001d¢.\u001e /\u001e.\u0012O\u0012x/\u0012.\u0013O\u000fy0\u0013\u001b\u000e\u0019.\u0010.\u0019€\u0013.\u0010\u0019/\u0010.\u001bO\u0011W\u001b\u000e.\u0014.\u0010y/\u0013.\u0010O\u0010‚.\u0011x/\u0012\u0011N.\u00128\u0010\u001a.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u0016.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u0012.\u001c¡0\u001d.\u001d¢.\u00128\u0010\u000e.\u001c¡0\u001d.\u001d¢.\u001e    /\u001e.\u0012O\u001ex/\u0012.\u0013O\u0012y0\u0013\u001b\u000e\u0019\u0019O\u000e/\u0013.\u0018\u0012N.\u0011/\u0012\u0011N.\u0012.\u00128\u0010\u000e.\u001c¡F\u0010\u000e.\u0012.\u00128\u0010\u0012.\u001c¡F\u0010\u0012.\u0012.\u00128\u0010\u0016.\u001c¡F\u0010\u0016.\u0012.\u00128\u0010\u001a.\u001c¡F\u0010\u001a.\u0012O\u001ex/\u0012.\u0013O\u0012x0\u0013.\u001aV\u001b\u000e\u0019\u0019.\u001e.\u001fQ\u000e\u000eŽÍ £/\u001e.\u000f.\u0014y/\u0010\u0010N.\u0013.\u0014\\\u001b\u000e.\u0014.\u0013Ox/\u000f.\u0014.\u0013yO\u00110\u001a\u0012N.\u0013O\u0010‚.\u0011x/\u0012\u0011N.\u0012.\u00128\u0010\u000e.\u001c¡F\u0010\u000e.\u0012O\u0012x/\u0012.\u0013O\u000fx/\u0013.\u001aO\u000fy0\u001a\u001b\u000e\u0019\u0019.\u000fO\u0011W\u001b\u000e.\u0014.\u0013y/\u001a.\u0013O\u0010‚.\u0011x/\u0012\u0011N.\u0012.\u00128\u0010\u000e.\u001c¡F\u0010\u000e.\u0012.\u00128\u0010\u0012.\u001c¡F\u0010\u0012.\u0012.\u00128\u0010\u0016.\u001c¡F\u0010\u0016.\u0012.\u00128\u0010\u001a.\u001c¡F\u0010\u001a.\u0012O\u001ex/\u0012.\u001aO\u0012y0\u001a\u001b\u000e\u0019\u0019.\u001eŸ/\u001c\u0010N.\u0010O\u000eZ\u0012NO\u000e/\u0018\u001a\u000f\u0019.\u0015O\u0010‚/\u0019.\u0014O\u0010‚/\u001aO\u000e/\u0018.\u000e/\u0012O\u000e/\u0013\u0011N. .\u00128\u0010\u000eɯ/\".\u0012.\u001ax8\u0010\u000eÉ/#.\u00168\u0010\u000e/\u001e.\u0012.\u0011. .!±Ä.\u001c.\u0014\u001e\u000f0\u001f.\u001el\u0012.\u0017.\u0013D\u0010\u000e.\u0016.\u001fF\u0010\u000e.\u0013\u0013.\u0018\u0019/\u0018.\".#®/ .\u0012.\u0019x/\u0012.\u0013.\u0015x0\u0013.\u0010V\u001b\u000e\u0019\u0019\u0010N.\u0015O\u000fZ\u001b\u000e.\u0018.\u0015.\u0015z0\u0012x0\u000f.\u0010.\u000f.\u0010V)/\u0015O\u000e/\u000f.\u0018.\u0012y0\u0010O\u000e.\u0010O\u000eX)/\u0010\u0010N.\u0014O\u000eZ\u0012N.$/ \u001a\u000f\u0019.\u0014O\u0011/\u0013\u0010N.\u0014O\u000fyO\u0011W\u0012N.$/ \u001a\u000f\u0019.\u0010O\u0010‚.\u000ex/\u0012.$/ .\u0014OŠ0\u000f/\u001a\u0011N. .\u00128\u0010\u000eÉ®.\u00128\u0010\u0012É®.\u00128\u0010\u0016É®.\u00128\u0010\u001aÉ®/ .\u0012O\u001ex/\u0012.\u001aO\u0012y0\u001a\u001b\u000e\u0019\u0019.\u0013S\u001b\u000e.\u000f.\u0010xO\u0010‚.\u000ex/\u0012\u0011N. .\u00128\u0010\u000eÉ®/ .\u0012O\u0012x/\u0012.\u0013O\u000fy0\u0013\u001b\u000e\u0019\u0019.\u0010.\u0015\\\u001b\u000e.\u0010O\u0010‚.\u000ex/\u0012.\u0010.\u0014xO\u0010‚.\u000ex/\u0013\u0011N. .\u00128\u0010\u000eɯ/\".\u00138\u0010\u000eÉ/#.\u00168\u0010\u000e/\u001e.\u0012.\u0011. .!±Ä.\u001c.\u0014\u001e\u000f0\u001f.\u001el\u0012N.\u0017.\u0010D\u0010\u000e.\u0016.\u001fF\u0010\u000e\u0019.\".#®/ .\u0012O\u0012x/\u0012.\u0013O\u0012x/\u0013.\u0010O\u000fx0\u0010.\u0015U\u001b\u000e\u0019\u0019\u0019\u0019`;\n\nexport default class SynAudio {\n constructor(options = {}) {\n this._correlationSampleSize =\n options.correlationSampleSize > 0 ? options.correlationSampleSize : 11025;\n this._initialGranularity =\n options.initialGranularity > 0 ? options.initialGranularity : 16;\n this._correlationThreshold =\n options.correlationThreshold >= 0 ? options.correlationThreshold : 0.5;\n\n this._module = wasmModule.get(SynAudio);\n\n if (!this._module) {\n this._module = simd().then((simdSupported) =>\n simdSupported\n ? WebAssembly.compile(decode(simdWasm))\n : WebAssembly.compile(decode(scalarWasm)),\n );\n wasmModule.set(this._module);\n }\n\n this.SynAudioWorker = function SynAudioWorker(\n module,\n correlationSampleSize,\n initialGranularity,\n ) {\n this._sourceCache = new Map();\n\n // correlation sample size must not exceed the size of each audio clip\n this._getCorrelationSampleSize = (a, b) =>\n Math.min(\n a.samplesDecoded,\n b.samplesDecoded,\n this._correlationSampleSize,\n );\n\n // initial granularity must not exceed the size of each audio clip\n this._getInitialGranularity = (a, b) =>\n Math.min(a.samplesDecoded, b.samplesDecoded, this._initialGranularity);\n\n this._setAudioDataOnHeap = (input, output, heapPos) => {\n const bytesPerElement = output.BYTES_PER_ELEMENT;\n\n let floatPos = heapPos / bytesPerElement;\n\n for (let i = 0; i < input.length; i++) {\n heapPos += input[i].length * bytesPerElement;\n output.set(input[i], floatPos);\n floatPos += input[i].length;\n }\n\n return heapPos;\n };\n\n this._executeAsWorker = (functionName, params) => {\n let source = this._sourceCache.get(functionName);\n\n if (!source) {\n let type = \"text/javascript\",\n isNode,\n webworkerSourceCode =\n \"'use strict';\" +\n `(${((\n SynAudioWorker,\n functionName,\n correlationSampleSize,\n initialGranularity,\n ) => {\n self.onmessage = (msg) => {\n const worker = new SynAudioWorker(\n Promise.resolve(msg.data.module),\n correlationSampleSize,\n initialGranularity,\n );\n\n worker._workerMethods\n .get(functionName)\n .apply(null, msg.data.params)\n .then((results) => {\n self.postMessage(results);\n });\n };\n }).toString()})(${SynAudioWorker.toString()}, \"${functionName}\", ${\n this._correlationSampleSize\n }, ${this._initialGranularity})`;\n\n try {\n isNode = typeof process.versions.node !== \"undefined\";\n } catch {}\n\n source = isNode\n ? `data:${type};base64,${Buffer.from(webworkerSourceCode).toString(\n \"base64\",\n )}`\n : URL.createObjectURL(new Blob([webworkerSourceCode], { type }));\n\n this._sourceCache.set(functionName, source);\n }\n\n const worker = new (globalThis.Worker || Worker)(source, {\n name: \"SynAudio\",\n });\n\n const result = new Promise((resolve) => {\n worker.onmessage = (message) => {\n worker.terminate();\n resolve(message.data);\n };\n });\n\n this._module.then((module) => {\n worker.postMessage({\n module,\n params,\n });\n });\n\n return result;\n };\n\n this._sync = (a, b) => {\n const pageSize = 64 * 1024;\n const floatByteLength = Float32Array.BYTES_PER_ELEMENT;\n\n const correlationSampleSize = this._getCorrelationSampleSize(a, b);\n const initialGranularity = this._getInitialGranularity(a, b);\n\n const memory = new WebAssembly.Memory({\n initial:\n ((a.samplesDecoded * a.channelData.length +\n b.samplesDecoded * b.channelData.length) *\n floatByteLength) /\n pageSize +\n 4,\n });\n\n return this._module\n .then((module) =>\n WebAssembly.instantiate(module, {\n env: { memory },\n }),\n )\n .then(({ exports }) => {\n const instanceExports = new Map(Object.entries(exports));\n\n const correlate = instanceExports.get(\"correlate\");\n const dataArray = new Float32Array(memory.buffer);\n const heapView = new DataView(memory.buffer);\n\n const aPtr = instanceExports.get(\"__heap_base\").value;\n const bPtr = this._setAudioDataOnHeap(\n a.channelData,\n dataArray,\n aPtr,\n );\n const bestCorrelationPtr = this._setAudioDataOnHeap(\n b.channelData,\n dataArray,\n bPtr,\n );\n const bestSampleOffsetPtr = bestCorrelationPtr + floatByteLength;\n\n correlate(\n aPtr,\n a.samplesDecoded,\n a.channelData.length,\n bPtr,\n b.samplesDecoded,\n b.channelData.length,\n correlationSampleSize,\n initialGranularity,\n bestCorrelationPtr,\n bestSampleOffsetPtr,\n );\n\n const bestCorrelation = heapView.getFloat32(\n bestCorrelationPtr,\n true,\n );\n const bestSampleOffset = heapView.getInt32(\n bestSampleOffsetPtr,\n true,\n );\n\n return {\n correlation: bestCorrelation,\n sampleOffset: bestSampleOffset,\n };\n });\n };\n\n this._syncWorkerConcurrent = (a, b, threads) => {\n const promises = [];\n const lengths = [0];\n\n // |-----------| |-----------| \"end\"\n // \"start\" |-|---------| |-----------|\n // | |\n // | |correlationSampleSize\n\n // split a buffer into equal chunks for threads\n // overlap at the start of the buffer by correlation sample size\n // overlap at the end of the buffer by correlation sample size\n\n // initial granularity low -> high, more -> less threads\n // correlation sample low -> high, less -> more threads\n // file size low -> high, less -> more threads\n\n const correlationSampleSize = this._getCorrelationSampleSize(a, b);\n\n // rough estimate for a good max thread count for performance\n const maxThreads =\n (Math.log(a.samplesDecoded * correlationSampleSize) /\n Math.log(this._initialGranularity + 1)) *\n Math.log(correlationSampleSize / 10000 + 1);\n\n threads = Math.max(\n Math.round(\n Math.min(\n threads,\n maxThreads,\n a.samplesDecoded / correlationSampleSize / 4,\n ),\n ),\n 1,\n );\n\n const aLength = Math.ceil(a.samplesDecoded / threads);\n\n let offset = 0;\n for (let t = 0; t < threads; t++) {\n const aSplit = {\n channelData: [],\n };\n\n for (let i = 0; i < a.channelData.length; i++) {\n const cutChannel = a.channelData[i].subarray(\n offset,\n offset + aLength + correlationSampleSize,\n );\n aSplit.channelData.push(cutChannel);\n aSplit.samplesDecoded = cutChannel.length;\n }\n\n offset += aLength - correlationSampleSize;\n lengths.push(offset);\n\n promises.push(this._syncWorker(aSplit, b));\n }\n\n return Promise.all(promises).then((results) => {\n // find the result with the highest correlation and calculate the offset relative to the input data\n let bestResultIdx = 0;\n let bestCorrelation = -1;\n for (let i = 0; i < results.length; i++)\n if (results[i].correlation > bestCorrelation) {\n bestResultIdx = i;\n bestCorrelation = results[i].correlation;\n }\n\n return {\n correlation: results[bestResultIdx].correlation,\n sampleOffset:\n results[bestResultIdx].sampleOffset + lengths[bestResultIdx],\n };\n });\n };\n\n this._syncWorker = (a, b) => {\n return this._executeAsWorker(\"_sync\", [a, b]);\n };\n\n this._syncWorkerConcurrentMain = (a, b, threads) => {\n // can't serialize the webworker polyfill in nodejs\n return globalThis.Worker\n ? this._executeAsWorker(\"_syncWorkerConcurrent\", [a, b, threads])\n : this._syncWorkerConcurrent(a, b, threads);\n };\n\n // constructor\n\n // needed to serialize minified code when methods are refererenced as a string\n // prettier-ignore\n this._workerMethods = new Map([\n [\"_sync\", this._sync],\n [\"_syncWorker\", this._syncWorker],\n [\"_syncWorkerConcurrent\", this._syncWorkerConcurrent],\n ]);\n\n this._module = module;\n this._correlationSampleSize = correlationSampleSize;\n this._initialGranularity = initialGranularity;\n };\n\n this._instance = new this.SynAudioWorker(\n this._module,\n this._correlationSampleSize,\n this._initialGranularity,\n );\n }\n\n async syncWorkerConcurrent(a, b, threads) {\n return this._instance._syncWorkerConcurrentMain(\n a,\n b,\n threads >= 1 ? threads : 1,\n );\n }\n\n async syncWorker(a, b) {\n return this._instance._syncWorker(a, b);\n }\n\n async sync(a, b) {\n return this._instance._sync(a, b);\n }\n\n async syncMultiple(clips, threads) {\n threads = threads >= 1 ? threads : 8;\n\n const workers = [];\n const graph = [];\n\n let notify = () => {},\n wait = Promise.resolve(),\n runningThreads = 0;\n\n const resetNotify = () => {\n wait = new Promise((resolve) => {\n notify = resolve;\n });\n };\n\n for (let i = 0; i < clips.length; i++) graph.push({ vertex: {} });\n\n for (let v = 0; v < clips.length; v++) {\n const vertexClip = clips[v];\n const vertex = graph[v].vertex;\n\n vertex.name = vertexClip.name;\n vertex.samplesDecoded = vertexClip.data.samplesDecoded;\n vertex.edges = new Set();\n\n for (let e = 0; e < clips.length; e++) {\n if (v === e) continue;\n\n const edgeClip = clips[e];\n const edge = graph[e];\n\n runningThreads++;\n workers.push(\n this.syncWorker(vertexClip.data, edgeClip.data).then(\n (correlationResult) => {\n if (correlationResult.correlation > this._correlationThreshold) {\n vertex.edges.add({\n parent: vertex,\n vertex: edge.vertex,\n samplesDecoded: edgeClip.data.samplesDecoded,\n ...correlationResult,\n });\n }\n runningThreads--;\n notify();\n },\n ),\n );\n\n if (runningThreads >= threads) {\n resetNotify();\n await wait;\n }\n }\n }\n\n await Promise.all(workers);\n\n // prettier-ignore\n const weighResults = (a, b) => {\n if (a.parent && b.parent && a.parent.samplesDecoded !== b.parent.samplesDecoded) return a.parent.samplesDecoded > b.parent.samplesDecoded;\n if (a.correlation !== b.correlation) return a.correlation > b.correlation;\n if (a.sampleOffset !== b.sampleOffset) return a.sampleOffset > b.sampleOffset;\n return a.vertex && b.vertex && a.vertex.name.localeCompare(b.vertex.name) < 0;\n };\n\n // detect cycles and weigh for which edge to remove\n const path = new Map();\n const cycles = new Set();\n\n const detectCycle = (vertex) => {\n for (const edge of vertex.edges.values()) {\n if (path.has(vertex)) return path.get(vertex);\n\n path.set(vertex, edge);\n\n const cycleStartEdge = detectCycle(edge.vertex);\n const cycleEndEdge = edge;\n\n if (cycleStartEdge) {\n let keep, remove;\n if (weighResults(cycleStartEdge, cycleEndEdge)) {\n keep = cycleStartEdge;\n remove = cycleEndEdge;\n } else {\n keep = cycleEndEdge;\n remove = cycleStartEdge;\n }\n\n if (!remove.cycleWith) {\n remove.cycleWith = new Set();\n cycles.add(remove);\n }\n\n remove.cycleWith.add(keep);\n\n if (keep.cycleWith) {\n keep.cycleWith.delete(remove);\n }\n }\n\n path.delete(vertex);\n }\n };\n\n for (const { vertex } of graph) detectCycle(vertex);\n\n // delete any cycles\n for (const edge of cycles)\n if (edge.cycleWith.size) edge.parent.edges.delete(edge);\n\n // find the root elements\n const roots = new Set();\n for (const v of graph) roots.add(v.vertex);\n for (const v of graph)\n for (const edge of v.vertex.edges) roots.delete(edge.vertex);\n\n // build a unique sequence of matches for each root\n const traverseRoot = (path, root, edges, sampleOffsetFromRoot = 0) => {\n for (const edge of edges) {\n if (\n !(path.has(edge.vertex) && weighResults(path.get(edge.vertex), edge))\n )\n path.set(edge.vertex, {\n name: edge.vertex.name,\n correlation: edge.correlation,\n sampleOffset: sampleOffsetFromRoot + edge.sampleOffset,\n });\n\n traverseRoot(\n path,\n root,\n edge.vertex.edges,\n sampleOffsetFromRoot + edge.sampleOffset,\n );\n }\n };\n\n const results = [];\n\n for (const root of roots) {\n const path = new Map();\n path.set(root, {\n name: root.name,\n sampleOffset: 0,\n });\n traverseRoot(path, root, root.edges);\n\n results.push(\n [...path.values()].sort(\n (a, b) =>\n a.sampleOffset - b.sampleOffset ||\n (a.correlation || 0) - (b.correlation || 0) ||\n b.name.localeCompare(a.name),\n ),\n );\n }\n\n return results;\n }\n}\n","import SynAudio from \"./src/SynAudio.js\";\n\nexport default SynAudio;\n"],"names":["module","exports","Worker","t","n","e","r","Int32Array","o","s","i","c","length","Uint8Array","map","parseInt","substring","Map","forEach","set","a","l","f","g","h","p","u","DataView","buffer","getInt32","d","charCodeAt","get","m","subarray","console","error","Error","wasmModule","WeakMap","simdWasm","String","raw","scalarWasm","SynAudio","constructor","options","this","_correlationSampleSize","correlationSampleSize","_initialGranularity","initialGranularity","_correlationThreshold","correlationThreshold","_module","async","WebAssembly","validate","simd","then","simdSupported","compile","SynAudioWorker","_sourceCache","_getCorrelationSampleSize","b","Math","min","samplesDecoded","_getInitialGranularity","_setAudioDataOnHeap","input","output","heapPos","bytesPerElement","BYTES_PER_ELEMENT","floatPos","_executeAsWorker","functionName","params","source","isNode","type","webworkerSourceCode","self","onmessage","msg","Promise","resolve","data","_workerMethods","apply","results","postMessage","toString","process","versions","node","Buffer","from","URL","createObjectURL","Blob","worker","globalThis","name","result","message","terminate","_sync","floatByteLength","Float32Array","memory","Memory","initial","channelData","instantiate","env","instanceExports","Object","entries","correlate","dataArray","heapView","aPtr","value","bPtr","bestCorrelationPtr","bestSampleOffsetPtr","correlation","getFloat32","sampleOffset","_syncWorkerConcurrent","threads","promises","lengths","maxThreads","log","max","round","aLength","ceil","offset","aSplit","cutChannel","push","_syncWorker","all","bestResultIdx","bestCorrelation","_syncWorkerConcurrentMain","_instance","syncWorkerConcurrent","syncWorker","sync","syncMultiple","clips","workers","graph","notify","wait","runningThreads","vertex","v","vertexClip","edges","Set","edgeClip","edge","correlationResult","add","parent","weighResults","localeCompare","path","cycles","detectCycle","values","has","cycleStartEdge","cycleEndEdge","keep","remove","cycleWith","delete","size","roots","traverseRoot","root","sampleOffsetFromRoot","sort"],"sourceRoot":""}