From ce122b22e6bf134b04710bf41cc333cdca0c48d4 Mon Sep 17 00:00:00 2001 From: SuperSaltyGamer Date: Fri, 21 Jul 2023 00:35:51 +0300 Subject: [PATCH] Update everything --- README.md | 1 + dist/applemusic.user.js | 4 ++-- dist/musicbrainz.user.js | 15 +++++++++++++++ dist/vgmdb.user.js | 36 ++++++++++++++++++++++++++++++------ 4 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 dist/musicbrainz.user.js diff --git a/README.md b/README.md index d873f26..41f62d4 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Various userscripts for the music hoarding community. Install [ViolentMonkey](https://violentmonkey.github.io) or [TamperMonkey](https://tampermonkey.net) then proceed to installing any of the following userscripts: * [Apple Music](https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/applemusic.user.js) +* [MusicBrainz](https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/musicbrainz.user.js) * [VGMdb](https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/vgmdb.user.js) ### References diff --git a/dist/applemusic.user.js b/dist/applemusic.user.js index c1a69c1..b327b0e 100644 --- a/dist/applemusic.user.js +++ b/dist/applemusic.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @namespace ame-applemusic // @name Ame (Apple Music) -// @version 1.6.1 +// @version 1.6.2 // @author SuperSaltyGamer // @run-at document-start // @match https://music.apple.com/* @@ -225,7 +225,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
- `);const o=vr.querySelector("#ame-dock-title"),i=vr.querySelector("#ame-dock-control-storefront"),a=vr.querySelector("#ame-dock-control-isrc2mb"),l=vr.querySelector("#ame-dock-table");o.addEventListener("click",()=>{sp()}),a.addEventListener("click",async()=>{if(!t)return;const h=t.attributes.upc.replace(/^0+/,""),y=await(await ko(`https://beta.musicbrainz.org/ws/2/release/?fmt=json&query=barcode:${h}%20AND%20format:digitalmedia`)).json(),g=new URLSearchParams;y.releases.length&&g.set("mbid",y.releases[0].id),t.relationships.tracks.data.forEach((b,C)=>{g.set(`isrc${C+1}`,b.attributes.isrc)}),open(`https://magicisrc.kepstin.ca/?${g.toString()}`,"_blank")});let s=JSON.parse(localStorage.getItem("ame-info-columns")||"[]");s.length!==_A.length&&(s=_A),document.body.appendChild(vr);const u=new dr(l,{licenseKey:"non-commercial-and-evaluation",data:[],rowHeaders:!0,columns:s.map(h=>({data:h,title:CA[h]})),editor:!1,manualColumnMove:!0,height:Math.max(320,Math.floor(innerHeight/3)),stretchH:"all",wordWrap:!1,renderer(h,d,y,g,b,C,T){const A=h.getSourceDataAtRow(y);switch(y%2&&d.classList.add("ame-table-band"),s[g]){case"trackDate":A.albumDate!==A.trackDate&&(d.style.textDecoration="underline"),d.innerText=C;break;default:d.innerText=C;break}},afterColumnMove(h,d,y,g,b){if(!b)return;const C=Array.from({length:u.countCols()},(T,A)=>hce[u.getColHeader(A)]);localStorage.setItem("ame-info-columns",JSON.stringify(C))}}),c=document.querySelector(".app-container");c.style.paddingBottom=vr.clientHeight+"px";async function f(){const h=await Ks(e,r);if(!h)return;t=h,console.log("Album Info:",h);let d="Album Info";h.attributes.isComplete||(d+=` (Incomplete - ${h.relationships.tracks.data.length}/${h.attributes.trackCount})`),o.innerText=d,a.style.display=h.attributes.isComplete?"":"none";const y=h.relationships.tracks.data.map(g=>({id:g.id,discNumber:g.attributes.discNumber,trackNumber:g.attributes.trackNumber,duration:vce(g.attributes.durationInMillis),isrc:g.attributes.isrc,upc:h.attributes.upc,albumDate:h.attributes.releaseDate,trackDate:g.attributes.releaseDate,locale:g.attributes.audioLocale,lyrics:g.attributes.hasLyrics?g.attributes.hasTimeSyncedLyrics?"S":"U":"",genres:g.attributes.genreNames.join("\\\\"),composer:g.attributes.composerName,artist:g.attributes.artistName,title:g.attributes.name,label:h.attributes.recordLabel,copyright:h.attributes.copyright,albumArtist:h.attributes.artistName,albumTitle:h.attributes.name}));u.updateData(y)}await f(),i.addEventListener("change",async h=>{r=h.target.value,localStorage.setItem("ame-info-country",r),await f()})}function sp(){lp=!1,vr==null||vr.remove(),vr=null;const e=document.querySelector(".app-container");e&&(e.style.paddingBottom="")}function vce(e){let t=Math.floor(e/1e3);const r=Math.floor(t/60);return t=t%60,`${r}:${t.toString().padStart(2,"0")}`}const mce=`.ame-color-primary{color:var(--systemPrimary)}.ame-color-secondary{color:var(--systemSecondary)}.ame-color-tertiary{color:var(--systemTertiary)}.ame-color-warning{color:var(--systemYellow)}.upsell-banner,.banner-container{display:none!important}.navigation__scrollable-container+.navigation__native-cta{display:none!important}.navigation-items[data-ame]{padding-top:9px}.navigation-items__header[data-ame]{border-radius:6px;font-size:10px;font-weight:600;letter-spacing:0;line-height:1.3;margin:0 20px -3px;padding:4px 6px;color:var(--systemSecondary)}.navigation-items__list[data-ame]{font-size:15px;padding:0 25px 9px;font-weight:400;letter-spacing:0}.navigation-item[data-ame]{margin-bottom:1px;height:32px;padding:4px;position:relative;--linkHoverTextDecoration: none;border-radius:6px}.navigation-item__link[data-ame]{align-items:center;border-radius:6px;box-sizing:content-box;-moz-column-gap:8px;column-gap:8px;display:flex;height:100%;margin:-3px;padding:3px;width:100%;font-size:.8rem}.navigation-item__link[data-ame] svg{width:24px;height:24px;fill:var(--systemSecondary);background-color:transparent;display:inline-block;flex-shrink:0}nav{padding-bottom:.5em;grid-template-rows:min-content min-content minmax(0,min-content) min-content min-content min-content min-content min-content min-content min-content min-content!important}.navigation__scrollable-container{margin-bottom:.5em}.navigation__native-cta{display:contents}.native-cta{padding-top:8px!important;padding-bottom:8px!important;border-top:none!important}.native-cta__button svg,.native-cta__button .native-cta__label{transition:50ms linear color,50ms linear fill}.native-cta__button:active svg,.native-cta__button:active .native-cta__label{color:#fff!important;fill:#fff!important}.page-error{width:100%!important;max-width:900px!important}.page-error__title+.button button{padding-left:1em;padding-right:1em}div[slot=artwork]{height:fit-content}.container-detail-header,.headings,.headings *,.headings__subtitles *,dialog *,.section-content,.tracklist-footer,.tracklist-footer *{user-select:text!important;-moz-user-select:text!important;-webkit-user-select:text!important}.headings__metadata-bottom{user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.songs-list-row__song-name{width:min-content;user-select:all!important;-moz-user-select:all!important;-webkit-user-select:all!important}.headings__metadata:last-child{margin-bottom:48px}.ame-album-badges-container>svg{margin-right:1em;margin-top:1em;fill:#999}.ame-album-countries-header{margin:0 var(--bodyGutter);font-size:1.1em}.ame-album-countries-container{margin:0 var(--bodyGutter);margin-bottom:var(--bodyGutter);padding:1em 0;line-height:2.2;text-align:justify;user-select:text}.ame-album-countries-container *{user-select:text}.ame-album-countries-container div:not(:empty){padding:.5em 0}.ame-table-band{background-color:#eee!important}#ame-dock{z-index:999999;position:fixed;left:0;bottom:0;width:100%;background-color:#fff}#ame-dock-title{width:100%;padding:.5rem;background-color:var(--keyColorBG);color:#fff;font-weight:700;cursor:pointer}#ame-dock-control{padding:.5rem;background-color:var(--pageBG)}#ame-dock-control input,#ame-dock-control select{padding:.1rem}#ame-dock-control button{padding:.1rem .25rem} + `);const o=vr.querySelector("#ame-dock-title"),i=vr.querySelector("#ame-dock-control-storefront"),a=vr.querySelector("#ame-dock-control-isrc2mb"),l=vr.querySelector("#ame-dock-table");o.addEventListener("click",()=>{sp()}),a.addEventListener("click",async()=>{if(!t)return;const h=t.attributes.upc.replace(/^0+/,""),y=await(await ko(`https://musicbrainz.org/ws/2/release/?fmt=json&query=barcode:${h}%20AND%20format:digitalmedia`)).json(),g=new URLSearchParams;y.releases.length&&g.set("mbid",y.releases[0].id),t.relationships.tracks.data.forEach((b,C)=>{g.set(`isrc${C+1}`,b.attributes.isrc)}),open(`https://magicisrc.kepstin.ca/?${g.toString()}`,"_blank")});let s=JSON.parse(localStorage.getItem("ame-info-columns")||"[]");s.length!==_A.length&&(s=_A),document.body.appendChild(vr);const u=new dr(l,{licenseKey:"non-commercial-and-evaluation",data:[],rowHeaders:!0,columns:s.map(h=>({data:h,title:CA[h]})),editor:!1,manualColumnMove:!0,height:Math.max(320,Math.floor(innerHeight/3)),stretchH:"all",wordWrap:!1,renderer(h,d,y,g,b,C,T){const A=h.getSourceDataAtRow(y);switch(y%2&&d.classList.add("ame-table-band"),s[g]){case"trackDate":A.albumDate!==A.trackDate&&(d.style.textDecoration="underline"),d.innerText=C;break;default:d.innerText=C;break}},afterColumnMove(h,d,y,g,b){if(!b)return;const C=Array.from({length:u.countCols()},(T,A)=>hce[u.getColHeader(A)]);localStorage.setItem("ame-info-columns",JSON.stringify(C))}}),c=document.querySelector(".app-container");c.style.paddingBottom=vr.clientHeight+"px";async function f(){const h=await Ks(e,r);if(!h)return;t=h,console.log("Album Info:",h);let d="Album Info";h.attributes.isComplete||(d+=` (Incomplete - ${h.relationships.tracks.data.length}/${h.attributes.trackCount})`),o.innerText=d,a.style.display=h.attributes.isComplete?"":"none";const y=h.relationships.tracks.data.map(g=>({id:g.id,discNumber:g.attributes.discNumber,trackNumber:g.attributes.trackNumber,duration:vce(g.attributes.durationInMillis),isrc:g.attributes.isrc,upc:h.attributes.upc,albumDate:h.attributes.releaseDate,trackDate:g.attributes.releaseDate,locale:g.attributes.audioLocale,lyrics:g.attributes.hasLyrics?g.attributes.hasTimeSyncedLyrics?"S":"U":"",genres:g.attributes.genreNames.join("\\\\"),composer:g.attributes.composerName,artist:g.attributes.artistName,title:g.attributes.name,label:h.attributes.recordLabel,copyright:h.attributes.copyright,albumArtist:h.attributes.artistName,albumTitle:h.attributes.name}));u.updateData(y)}await f(),i.addEventListener("change",async h=>{r=h.target.value,localStorage.setItem("ame-info-country",r),await f()})}function sp(){lp=!1,vr==null||vr.remove(),vr=null;const e=document.querySelector(".app-container");e&&(e.style.paddingBottom="")}function vce(e){let t=Math.floor(e/1e3);const r=Math.floor(t/60);return t=t%60,`${r}:${t.toString().padStart(2,"0")}`}const mce=`.ame-color-primary{color:var(--systemPrimary)}.ame-color-secondary{color:var(--systemSecondary)}.ame-color-tertiary{color:var(--systemTertiary)}.ame-color-warning{color:var(--systemYellow)}.upsell-banner,.banner-container{display:none!important}.navigation__scrollable-container+.navigation__native-cta{display:none!important}.navigation-items[data-ame]{padding-top:9px}.navigation-items__header[data-ame]{border-radius:6px;font-size:10px;font-weight:600;letter-spacing:0;line-height:1.3;margin:0 20px -3px;padding:4px 6px;color:var(--systemSecondary)}.navigation-items__list[data-ame]{font-size:15px;padding:0 25px 9px;font-weight:400;letter-spacing:0}.navigation-item[data-ame]{margin-bottom:1px;height:32px;padding:4px;position:relative;--linkHoverTextDecoration: none;border-radius:6px}.navigation-item__link[data-ame]{align-items:center;border-radius:6px;box-sizing:content-box;-moz-column-gap:8px;column-gap:8px;display:flex;height:100%;margin:-3px;padding:3px;width:100%;font-size:.8rem}.navigation-item__link[data-ame] svg{width:24px;height:24px;fill:var(--systemSecondary);background-color:transparent;display:inline-block;flex-shrink:0}nav{padding-bottom:.5em;grid-template-rows:min-content min-content minmax(0,min-content) min-content min-content min-content min-content min-content min-content min-content min-content!important}.navigation__scrollable-container{margin-bottom:.5em}.navigation__native-cta{display:contents}.native-cta{padding-top:8px!important;padding-bottom:8px!important;border-top:none!important}.native-cta__button svg,.native-cta__button .native-cta__label{transition:50ms linear color,50ms linear fill}.native-cta__button:active svg,.native-cta__button:active .native-cta__label{color:#fff!important;fill:#fff!important}.page-error{width:100%!important;max-width:900px!important}.page-error__title+.button button{padding-left:1em;padding-right:1em}div[slot=artwork]{height:fit-content}.container-detail-header,.headings,.headings *,.headings__subtitles *,dialog *,.section-content,.tracklist-footer,.tracklist-footer *{user-select:text!important;-moz-user-select:text!important;-webkit-user-select:text!important}.headings__metadata-bottom{user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important}.songs-list-row__song-name{width:min-content;user-select:all!important;-moz-user-select:all!important;-webkit-user-select:all!important}.headings__metadata:last-child{margin-bottom:48px}.ame-album-badges-container>svg{margin-right:1em;margin-top:1em;fill:#999}.ame-album-countries-header{margin:0 var(--bodyGutter);font-size:1.1em}.ame-album-countries-container{margin:0 var(--bodyGutter);margin-bottom:var(--bodyGutter);padding:1em 0;line-height:2.2;text-align:justify;user-select:text}.ame-album-countries-container *{user-select:text}.ame-album-countries-container div:not(:empty){padding:.5em 0}.ame-table-band{background-color:#eee!important}#ame-dock{z-index:999999;position:fixed;left:0;bottom:0;width:100%;background-color:#fff}#ame-dock-title{width:100%;padding:.5rem;background-color:var(--keyColorBG);color:#fff;font-weight:700;cursor:pointer}#ame-dock-control{padding:.5rem;background-color:var(--pageBG)}#ame-dock-control input,#ame-dock-control select{padding:.1rem}#ame-dock-control button{padding:.1rem .25rem} `,yce=`@charset "UTF-8";/*! * Copyright (c) HANDSONCODE sp. z o. o. * diff --git a/dist/musicbrainz.user.js b/dist/musicbrainz.user.js new file mode 100644 index 0000000..c3100e7 --- /dev/null +++ b/dist/musicbrainz.user.js @@ -0,0 +1,15 @@ +// ==UserScript== +// @namespace ame-musicbrainz +// @name Ame (MusicBrainz) +// @version 1.0.0 +// @author SuperSaltyGamer +// @run-at document-end +// @match https://musicbrainz.org/* +// @match https://beta.musicbrainz.org/* +// @grant GM.addStyle +// @grant GM.xmlHttpRequest +// @downloadURL https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/musicbrainz.user.js +// @updateURL https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/musicbrainz.user.js +// ==/UserScript== + +(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict";const n=/(\d+) +\| +([0-9:.]+) +\| +([0-9:.]+) +\| +(\d+) +\| +(\d+)/g,a=document.querySelector("form[action='/search']"),i=document.querySelector("#headerid-query");i.placeholder="Enhanced search",a.addEventListener("submit",e=>{const r=new FormData(a).get("query").trim(),t=s(r);if(t!=="other")switch(e.preventDefault(),t){case"catalog":const o=r.split("~")[0];location.href=`https://musicbrainz.org/search?type=release&method=advanced&query=catno:${encodeURIComponent(o)}`;break;case"barcode":location.href=`https://musicbrainz.org/search?type=release&method=advanced&query=barcode:${encodeURIComponent(r)}`;break;case"isrc":location.href=`https://musicbrainz.org/search?type=recording&method=advanced&query=isrc:${encodeURIComponent(r)}`;break;case"log-eac":case"log-xld":location.href=`https://musicbrainz.org/cdtoc/attach?toc=${d(r)}`;break}});function s(e){return e.match(/^(\d{8}|\d{12}|\d{13}|\d{14})$/i)?"barcode":e.match(/^[a-z]{5}[0-9]{7}$/i)?"isrc":e===e.toUpperCase()&&e.match(/\d/i)&&e.match(/[a-z]/i)&&e.match(/[ ~-]/i)?"catalog":e.includes("TOC of the extracted CD")&&e.includes("EAC extraction logfile")?"log-eac":e.includes("TOC of the extracted CD")&&e.includes("XLD extraction logfile")?"log-xld":"other"}function d(e){const c=[];let r=0;for(const t of e.matchAll(n)){const o=Number(t[1]);if(r>o)break;r=o,c.push({no:o,start:t[2],length:t[3],startSector:Number(t[4]),endSector:Number(t[5])})}return[1,c.length,c[c.length-1].endSector+150+1].concat(c.map(t=>t.startSector+150)).join("%20")}const h="";GM.addStyle(h)}); diff --git a/dist/vgmdb.user.js b/dist/vgmdb.user.js index d926eae..b153ab2 100644 --- a/dist/vgmdb.user.js +++ b/dist/vgmdb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @namespace ame-vgmdb // @name Ame (VGMdb) -// @version 1.0.1 +// @version 1.1.0 // @author SuperSaltyGamer // @run-at document-end // @match https://vgmdb.net/* @@ -11,7 +11,7 @@ // @updateURL https://notabug.org/SuperSaltyGamer/ame/raw/main/dist/vgmdb.user.js // ==/UserScript== -(function(ge){typeof define=="function"&&define.amd?define(ge):ge()})(function(){"use strict";var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function we(U){throw new Error('Could not dynamically require "'+U+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Se={},Be={get exports(){return Se},set exports(U){Se=U}};/*! +(function(ge){typeof define=="function"&&define.amd?define(ge):ge()})(function(){"use strict";var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function we(z){throw new Error('Could not dynamically require "'+z+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xe={},Ne={get exports(){return xe},set exports(z){xe=z}};/*! JSZip v3.9.1 - A JavaScript class for generating and reading zip files @@ -21,7 +21,31 @@ JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE - */(function(U,K){(function(o){U.exports=o()})(function(){return function o(z,v,a){function h(_,y){if(!v[_]){if(!z[_]){var m=typeof we=="function"&&we;if(!y&&m)return m(_,!0);if(t)return t(_,!0);var b=new Error("Cannot find module '"+_+"'");throw b.code="MODULE_NOT_FOUND",b}var i=v[_]={exports:{}};z[_][0].call(i.exports,function(d){var p=z[_][1][d];return h(p||d)},i,i.exports,o,z,v,a)}return v[_].exports}for(var t=typeof we=="function"&&we,l=0;l>2,i=(3&_)<<4|y>>4,d=1>6:64,p=2>4,y=(15&b)<<4|(i=t.indexOf(l.charAt(p++)))>>2,m=(3&i)<<6|(d=t.indexOf(l.charAt(p++))),f[n++]=_,i!==64&&(f[n++]=y),d!==64&&(f[n++]=m);return f}},{"./support":30,"./utils":32}],2:[function(o,z,v){var a=o("./external"),h=o("./stream/DataWorker"),t=o("./stream/Crc32Probe"),l=o("./stream/DataLengthProbe");function _(y,m,b,i,d){this.compressedSize=y,this.uncompressedSize=m,this.crc32=b,this.compression=i,this.compressedContent=d}_.prototype={getContentWorker:function(){var y=new h(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),m=this;return y.on("end",function(){if(this.streamInfo.data_length!==m.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new h(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},_.createWorkerFrom=function(y,m,b){return y.pipe(new t).pipe(new l("uncompressedSize")).pipe(m.compressWorker(b)).pipe(new l("compressedSize")).withStreamInfo("compression",m)},z.exports=_},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,z,v){var a=o("./stream/GenericWorker");v.STORE={magic:"\0\0",compressWorker:function(h){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},v.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,z,v){var a=o("./utils"),h=function(){for(var t,l=[],_=0;_<256;_++){t=_;for(var y=0;y<8;y++)t=1&t?3988292384^t>>>1:t>>>1;l[_]=t}return l}();z.exports=function(t,l){return t!==void 0&&t.length?a.getTypeOf(t)!=="string"?function(_,y,m,b){var i=h,d=b+m;_^=-1;for(var p=b;p>>8^i[255&(_^y[p])];return-1^_}(0|l,t,t.length,0):function(_,y,m,b){var i=h,d=b+m;_^=-1;for(var p=b;p>>8^i[255&(_^y.charCodeAt(p))];return-1^_}(0|l,t,t.length,0):0}},{"./utils":32}],5:[function(o,z,v){v.base64=!1,v.binary=!1,v.dir=!1,v.createFolders=!0,v.date=null,v.compression=null,v.compressionOptions=null,v.comment=null,v.unixPermissions=null,v.dosPermissions=null},{}],6:[function(o,z,v){var a=null;a=typeof Promise<"u"?Promise:o("lie"),z.exports={Promise:a}},{lie:37}],7:[function(o,z,v){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",h=o("pako"),t=o("./utils"),l=o("./stream/GenericWorker"),_=a?"uint8array":"array";function y(m,b){l.call(this,"FlateWorker/"+m),this._pako=null,this._pakoAction=m,this._pakoOptions=b,this.meta={}}v.magic="\b\0",t.inherits(y,l),y.prototype.processChunk=function(m){this.meta=m.meta,this._pako===null&&this._createPako(),this._pako.push(t.transformTo(_,m.data),!1)},y.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new h[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var m=this;this._pako.onData=function(b){m.push({data:b,meta:m.meta})}},v.compressWorker=function(m){return new y("Deflate",m)},v.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,z,v){function a(i,d){var p,n="";for(p=0;p>>=8;return n}function h(i,d,p,n,s,f){var w,E,x=i.file,D=i.compression,R=f!==_.utf8encode,j=t.transformTo("string",f(x.name)),O=t.transformTo("string",_.utf8encode(x.name)),Z=x.comment,J=t.transformTo("string",f(Z)),g=t.transformTo("string",_.utf8encode(Z)),T=O.length!==x.name.length,r=g.length!==Z.length,F="",Q="",L="",ee=x.dir,W=x.date,$={crc32:0,compressedSize:0,uncompressedSize:0};d&&!p||($.crc32=i.crc32,$.compressedSize=i.compressedSize,$.uncompressedSize=i.uncompressedSize);var A=0;d&&(A|=8),R||!T&&!r||(A|=2048);var C=0,V=0;ee&&(C|=16),s==="UNIX"?(V=798,C|=function(G,ae){var he=G;return G||(he=ae?16893:33204),(65535&he)<<16}(x.unixPermissions,ee)):(V=20,C|=function(G){return 63&(G||0)}(x.dosPermissions)),w=W.getUTCHours(),w<<=6,w|=W.getUTCMinutes(),w<<=5,w|=W.getUTCSeconds()/2,E=W.getUTCFullYear()-1980,E<<=4,E|=W.getUTCMonth()+1,E<<=5,E|=W.getUTCDate(),T&&(Q=a(1,1)+a(y(j),4)+O,F+="up"+a(Q.length,2)+Q),r&&(L=a(1,1)+a(y(J),4)+g,F+="uc"+a(L.length,2)+L);var q="";return q+=` -\0`,q+=a(A,2),q+=D.magic,q+=a(w,2),q+=a(E,2),q+=a($.crc32,4),q+=a($.compressedSize,4),q+=a($.uncompressedSize,4),q+=a(j.length,2),q+=a(F.length,2),{fileRecord:m.LOCAL_FILE_HEADER+q+j+F,dirRecord:m.CENTRAL_FILE_HEADER+a(V,2)+q+a(J.length,2)+"\0\0\0\0"+a(C,4)+a(n,4)+j+F+J}}var t=o("../utils"),l=o("../stream/GenericWorker"),_=o("../utf8"),y=o("../crc32"),m=o("../signature");function b(i,d,p,n){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=p,this.encodeFileName=n,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}t.inherits(b,l),b.prototype.push=function(i){var d=i.meta.percent||0,p=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,l.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:p?(d+100*(p-n-1))/p:100}}))},b.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var d=this.streamFiles&&!i.file.dir;if(d){var p=h(i,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},b.prototype.closedSource=function(i){this.accumulate=!1;var d=this.streamFiles&&!i.file.dir,p=h(i,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),d)this.push({data:function(n){return m.DATA_DESCRIPTOR+a(n.crc32,4)+a(n.compressedSize,4)+a(n.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},b.prototype.flush=function(){for(var i=this.bytesWritten,d=0;d=this.index;l--)_=(_<<8)+this.byteAt(l);return this.index+=t,_},readString:function(t){return a.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},z.exports=h},{"../utils":32}],19:[function(o,z,v){var a=o("./Uint8ArrayReader");function h(t){a.call(this,t)}o("../utils").inherits(h,a),h.prototype.readData=function(t){this.checkOffset(t);var l=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,l},z.exports=h},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,z,v){var a=o("./DataReader");function h(t){a.call(this,t)}o("../utils").inherits(h,a),h.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},h.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},h.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},h.prototype.readData=function(t){this.checkOffset(t);var l=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,l},z.exports=h},{"../utils":32,"./DataReader":18}],21:[function(o,z,v){var a=o("./ArrayReader");function h(t){a.call(this,t)}o("../utils").inherits(h,a),h.prototype.readData=function(t){if(this.checkOffset(t),t===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,l},z.exports=h},{"../utils":32,"./ArrayReader":17}],22:[function(o,z,v){var a=o("../utils"),h=o("../support"),t=o("./ArrayReader"),l=o("./StringReader"),_=o("./NodeBufferReader"),y=o("./Uint8ArrayReader");z.exports=function(m){var b=a.getTypeOf(m);return a.checkSupport(b),b!=="string"||h.uint8array?b==="nodebuffer"?new _(m):h.uint8array?new y(a.transformTo("uint8array",m)):new t(a.transformTo("array",m)):new l(m)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,z,v){v.LOCAL_FILE_HEADER="PK",v.CENTRAL_FILE_HEADER="PK",v.CENTRAL_DIRECTORY_END="PK",v.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",v.ZIP64_CENTRAL_DIRECTORY_END="PK",v.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,z,v){var a=o("./GenericWorker"),h=o("../utils");function t(l){a.call(this,"ConvertWorker to "+l),this.destType=l}h.inherits(t,a),t.prototype.processChunk=function(l){this.push({data:h.transformTo(this.destType,l.data),meta:l.meta})},z.exports=t},{"../utils":32,"./GenericWorker":28}],25:[function(o,z,v){var a=o("./GenericWorker"),h=o("../crc32");function t(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(t,a),t.prototype.processChunk=function(l){this.streamInfo.crc32=h(l.data,this.streamInfo.crc32||0),this.push(l)},z.exports=t},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,z,v){var a=o("../utils"),h=o("./GenericWorker");function t(l){h.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}a.inherits(t,h),t.prototype.processChunk=function(l){if(l){var _=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=_+l.data.length}h.prototype.processChunk.call(this,l)},z.exports=t},{"../utils":32,"./GenericWorker":28}],27:[function(o,z,v){var a=o("../utils"),h=o("./GenericWorker");function t(l){h.call(this,"DataWorker");var _=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(y){_.dataIsReady=!0,_.data=y,_.max=y&&y.length||0,_.type=a.getTypeOf(y),_.isPaused||_._tickAndRepeat()},function(y){_.error(y)})}a.inherits(t,h),t.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this.data=null},t.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},t.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},t.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,_=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,_);break;case"uint8array":l=this.data.subarray(this.index,_);break;case"array":case"nodebuffer":l=this.data.slice(this.index,_)}return this.index=_,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},z.exports=t},{"../utils":32,"./GenericWorker":28}],28:[function(o,z,v){function a(h){this.name=h||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(h){this.emit("data",h)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(h){this.emit("error",h)}return!0},error:function(h){return!this.isFinished&&(this.isPaused?this.generatedError=h:(this.isFinished=!0,this.emit("error",h),this.previous&&this.previous.error(h),this.cleanUp()),!0)},on:function(h,t){return this._listeners[h].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(h,t){if(this._listeners[h])for(var l=0;l "+h:h}},z.exports=a},{}],29:[function(o,z,v){var a=o("../utils"),h=o("./ConvertWorker"),t=o("./GenericWorker"),l=o("../base64"),_=o("../support"),y=o("../external"),m=null;if(_.nodestream)try{m=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function b(d,p){return new y.Promise(function(n,s){var f=[],w=d._internalType,E=d._outputType,x=d._mimeType;d.on("data",function(D,R){f.push(D),p&&p(R)}).on("error",function(D){f=[],s(D)}).on("end",function(){try{var D=function(R,j,O){switch(R){case"blob":return a.newBlob(a.transformTo("arraybuffer",j),O);case"base64":return l.encode(j);default:return a.transformTo(R,j)}}(E,function(R,j){var O,Z=0,J=null,g=0;for(O=0;O"u")v.blob=!1;else{var a=new ArrayBuffer(0);try{v.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var h=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);h.append(a),v.blob=h.getBlob("application/zip").size===0}catch{v.blob=!1}}}try{v.nodestream=!!o("readable-stream").Readable}catch{v.nodestream=!1}},{"readable-stream":16}],31:[function(o,z,v){for(var a=o("./utils"),h=o("./support"),t=o("./nodejsUtils"),l=o("./stream/GenericWorker"),_=new Array(256),y=0;y<256;y++)_[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;_[254]=_[254]=1;function m(){l.call(this,"utf-8 decode"),this.leftOver=null}function b(){l.call(this,"utf-8 encode")}v.utf8encode=function(i){return h.nodebuffer?t.newBufferFrom(i,"utf-8"):function(d){var p,n,s,f,w,E=d.length,x=0;for(f=0;f>>6:(n<65536?p[w++]=224|n>>>12:(p[w++]=240|n>>>18,p[w++]=128|n>>>12&63),p[w++]=128|n>>>6&63),p[w++]=128|63&n);return p}(i)},v.utf8decode=function(i){return h.nodebuffer?a.transformTo("nodebuffer",i).toString("utf-8"):function(d){var p,n,s,f,w=d.length,E=new Array(2*w);for(p=n=0;p>10&1023,E[n++]=56320|1023&s)}return E.length!==n&&(E.subarray?E=E.subarray(0,n):E.length=n),a.applyFromCharCode(E)}(i=a.transformTo(h.uint8array?"uint8array":"array",i))},a.inherits(m,l),m.prototype.processChunk=function(i){var d=a.transformTo(h.uint8array?"uint8array":"array",i.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var p=d;(d=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),d.set(p,this.leftOver.length)}else d=this.leftOver.concat(d);this.leftOver=null}var n=function(f,w){var E;for((w=w||f.length)>f.length&&(w=f.length),E=w-1;0<=E&&(192&f[E])==128;)E--;return E<0||E===0?w:E+_[f[E]]>w?E:w}(d),s=d;n!==d.length&&(h.uint8array?(s=d.subarray(0,n),this.leftOver=d.subarray(n,d.length)):(s=d.slice(0,n),this.leftOver=d.slice(n,d.length))),this.push({data:v.utf8decode(s),meta:i.meta})},m.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:v.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},v.Utf8DecodeWorker=m,a.inherits(b,l),b.prototype.processChunk=function(i){this.push({data:v.utf8encode(i.data),meta:i.meta})},v.Utf8EncodeWorker=b},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,z,v){var a=o("./support"),h=o("./base64"),t=o("./nodejsUtils"),l=o("set-immediate-shim"),_=o("./external");function y(n){return n}function m(n,s){for(var f=0;f>8;this.dir=!!(16&this.externalFileAttributes),i==0&&(this.dosPermissions=63&this.externalFileAttributes),i==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(i){if(this.extraFields[1]){var d=a(this.extraFields[1].value);this.uncompressedSize===h.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===h.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===h.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===h.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(i){var d,p,n,s=i.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});i.index+4>>6:(i<65536?b[n++]=224|i>>>12:(b[n++]=240|i>>>18,b[n++]=128|i>>>12&63),b[n++]=128|i>>>6&63),b[n++]=128|63&i);return b},v.buf2binstring=function(m){return y(m,m.length)},v.binstring2buf=function(m){for(var b=new a.Buf8(m.length),i=0,d=b.length;i>10&1023,f[d++]=56320|1023&p)}return y(f,d)},v.utf8border=function(m,b){var i;for((b=b||m.length)>m.length&&(b=m.length),i=b-1;0<=i&&(192&m[i])==128;)i--;return i<0||i===0?b:i+l[m[i]]>b?i:b}},{"./common":41}],43:[function(o,z,v){z.exports=function(a,h,t,l){for(var _=65535&a|0,y=a>>>16&65535|0,m=0;t!==0;){for(t-=m=2e3>>1:h>>>1;t[l]=h}return t}();z.exports=function(h,t,l,_){var y=a,m=_+l;h^=-1;for(var b=_;b>>8^y[255&(h^t[b])];return-1^h}},{}],46:[function(o,z,v){var a,h=o("../utils/common"),t=o("./trees"),l=o("./adler32"),_=o("./crc32"),y=o("./messages"),m=0,b=4,i=0,d=-2,p=-1,n=4,s=2,f=8,w=9,E=286,x=30,D=19,R=2*E+1,j=15,O=3,Z=258,J=Z+O+1,g=42,T=113,r=1,F=2,Q=3,L=4;function ee(e,B){return e.msg=y[B],B}function W(e){return(e<<1)-(4e.avail_out&&(I=e.avail_out),I!==0&&(h.arraySet(e.output,B.pending_buf,B.pending_out,I,e.next_out),e.next_out+=I,B.pending_out+=I,e.total_out+=I,e.avail_out-=I,B.pending-=I,B.pending===0&&(B.pending_out=0))}function C(e,B){t._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,B),e.block_start=e.strstart,A(e.strm)}function V(e,B){e.pending_buf[e.pending++]=B}function q(e,B){e.pending_buf[e.pending++]=B>>>8&255,e.pending_buf[e.pending++]=255&B}function G(e,B){var I,c,u=e.max_chain_length,k=e.strstart,N=e.prev_length,P=e.nice_match,S=e.strstart>e.w_size-J?e.strstart-(e.w_size-J):0,M=e.window,Y=e.w_mask,H=e.prev,X=e.strstart+Z,ie=M[k+N-1],te=M[k+N];e.prev_length>=e.good_match&&(u>>=2),P>e.lookahead&&(P=e.lookahead);do if(M[(I=B)+N]===te&&M[I+N-1]===ie&&M[I]===M[k]&&M[++I]===M[k+1]){k+=2,I++;do;while(M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&M[++k]===M[++I]&&kS&&--u!=0);return N<=e.lookahead?N:e.lookahead}function ae(e){var B,I,c,u,k,N,P,S,M,Y,H=e.w_size;do{if(u=e.window_size-e.lookahead-e.strstart,e.strstart>=H+(H-J)){for(h.arraySet(e.window,e.window,H,H,0),e.match_start-=H,e.strstart-=H,e.block_start-=H,B=I=e.hash_size;c=e.head[--B],e.head[B]=H<=c?c-H:0,--I;);for(B=I=H;c=e.prev[--B],e.prev[B]=H<=c?c-H:0,--I;);u+=H}if(e.strm.avail_in===0)break;if(N=e.strm,P=e.window,S=e.strstart+e.lookahead,M=u,Y=void 0,Y=N.avail_in,M=O)for(k=e.strstart-e.insert,e.ins_h=e.window[k],e.ins_h=(e.ins_h<=O&&(e.ins_h=(e.ins_h<=O)if(c=t._tr_tally(e,e.strstart-e.match_start,e.match_length-O),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=O){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=O&&(e.ins_h=(e.ins_h<=O&&e.match_length<=e.prev_length){for(u=e.strstart+e.lookahead-O,c=t._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-O),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=u&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(I=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),e.lookahead===0&&B===m)return r;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var c=e.block_start+I;if((e.strstart===0||e.strstart>=c)&&(e.lookahead=e.strstart-c,e.strstart=c,C(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-J&&(C(e,!1),e.strm.avail_out===0))return r}return e.insert=0,B===b?(C(e,!0),e.strm.avail_out===0?Q:L):(e.strstart>e.block_start&&(C(e,!1),e.strm.avail_out),r)}),new ne(4,4,8,4,he),new ne(4,5,16,8,he),new ne(4,6,32,32,he),new ne(4,4,16,16,re),new ne(8,16,32,32,re),new ne(8,16,128,128,re),new ne(8,32,128,256,re),new ne(32,128,258,1024,re),new ne(32,258,258,4096,re)],v.deflateInit=function(e,B){return fe(e,B,f,15,8,0)},v.deflateInit2=fe,v.deflateReset=ce,v.deflateResetKeep=se,v.deflateSetHeader=function(e,B){return e&&e.state?e.state.wrap!==2?d:(e.state.gzhead=B,i):d},v.deflate=function(e,B){var I,c,u,k;if(!e||!e.state||5>8&255),V(c,c.gzhead.time>>16&255),V(c,c.gzhead.time>>24&255),V(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),V(c,255&c.gzhead.os),c.gzhead.extra&&c.gzhead.extra.length&&(V(c,255&c.gzhead.extra.length),V(c,c.gzhead.extra.length>>8&255)),c.gzhead.hcrc&&(e.adler=_(e.adler,c.pending_buf,c.pending,0)),c.gzindex=0,c.status=69):(V(c,0),V(c,0),V(c,0),V(c,0),V(c,0),V(c,c.level===9?2:2<=c.strategy||c.level<2?4:0),V(c,3),c.status=T);else{var N=f+(c.w_bits-8<<4)<<8;N|=(2<=c.strategy||c.level<2?0:c.level<6?1:c.level===6?2:3)<<6,c.strstart!==0&&(N|=32),N+=31-N%31,c.status=T,q(c,N),c.strstart!==0&&(q(c,e.adler>>>16),q(c,65535&e.adler)),e.adler=1}if(c.status===69)if(c.gzhead.extra){for(u=c.pending;c.gzindex<(65535&c.gzhead.extra.length)&&(c.pending!==c.pending_buf_size||(c.gzhead.hcrc&&c.pending>u&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),A(e),u=c.pending,c.pending!==c.pending_buf_size));)V(c,255&c.gzhead.extra[c.gzindex]),c.gzindex++;c.gzhead.hcrc&&c.pending>u&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),c.gzindex===c.gzhead.extra.length&&(c.gzindex=0,c.status=73)}else c.status=73;if(c.status===73)if(c.gzhead.name){u=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>u&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),A(e),u=c.pending,c.pending===c.pending_buf_size)){k=1;break}k=c.gzindexu&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),k===0&&(c.gzindex=0,c.status=91)}else c.status=91;if(c.status===91)if(c.gzhead.comment){u=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>u&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),A(e),u=c.pending,c.pending===c.pending_buf_size)){k=1;break}k=c.gzindexu&&(e.adler=_(e.adler,c.pending_buf,c.pending-u,u)),k===0&&(c.status=103)}else c.status=103;if(c.status===103&&(c.gzhead.hcrc?(c.pending+2>c.pending_buf_size&&A(e),c.pending+2<=c.pending_buf_size&&(V(c,255&e.adler),V(c,e.adler>>8&255),e.adler=0,c.status=T)):c.status=T),c.pending!==0){if(A(e),e.avail_out===0)return c.last_flush=-1,i}else if(e.avail_in===0&&W(B)<=W(I)&&B!==b)return ee(e,-5);if(c.status===666&&e.avail_in!==0)return ee(e,-5);if(e.avail_in!==0||c.lookahead!==0||B!==m&&c.status!==666){var P=c.strategy===2?function(S,M){for(var Y;;){if(S.lookahead===0&&(ae(S),S.lookahead===0)){if(M===m)return r;break}if(S.match_length=0,Y=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++,Y&&(C(S,!1),S.strm.avail_out===0))return r}return S.insert=0,M===b?(C(S,!0),S.strm.avail_out===0?Q:L):S.last_lit&&(C(S,!1),S.strm.avail_out===0)?r:F}(c,B):c.strategy===3?function(S,M){for(var Y,H,X,ie,te=S.window;;){if(S.lookahead<=Z){if(ae(S),S.lookahead<=Z&&M===m)return r;if(S.lookahead===0)break}if(S.match_length=0,S.lookahead>=O&&0S.lookahead&&(S.match_length=S.lookahead)}if(S.match_length>=O?(Y=t._tr_tally(S,1,S.match_length-O),S.lookahead-=S.match_length,S.strstart+=S.match_length,S.match_length=0):(Y=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++),Y&&(C(S,!1),S.strm.avail_out===0))return r}return S.insert=0,M===b?(C(S,!0),S.strm.avail_out===0?Q:L):S.last_lit&&(C(S,!1),S.strm.avail_out===0)?r:F}(c,B):a[c.level].func(c,B);if(P!==Q&&P!==L||(c.status=666),P===r||P===Q)return e.avail_out===0&&(c.last_flush=-1),i;if(P===F&&(B===1?t._tr_align(c):B!==5&&(t._tr_stored_block(c,0,0,!1),B===3&&($(c.head),c.lookahead===0&&(c.strstart=0,c.block_start=0,c.insert=0))),A(e),e.avail_out===0))return c.last_flush=-1,i}return B!==b?i:c.wrap<=0?1:(c.wrap===2?(V(c,255&e.adler),V(c,e.adler>>8&255),V(c,e.adler>>16&255),V(c,e.adler>>24&255),V(c,255&e.total_in),V(c,e.total_in>>8&255),V(c,e.total_in>>16&255),V(c,e.total_in>>24&255)):(q(c,e.adler>>>16),q(c,65535&e.adler)),A(e),0=I.w_size&&(k===0&&($(I.head),I.strstart=0,I.block_start=0,I.insert=0),M=new h.Buf8(I.w_size),h.arraySet(M,B,Y-I.w_size,I.w_size,0),B=M,Y=I.w_size),N=e.avail_in,P=e.next_in,S=e.input,e.avail_in=Y,e.next_in=0,e.input=B,ae(I);I.lookahead>=O;){for(c=I.strstart,u=I.lookahead-(O-1);I.ins_h=(I.ins_h<>>=O=j>>>24,w-=O,(O=j>>>16&255)===0)F[y++]=65535&j;else{if(!(16&O)){if(!(64&O)){j=E[(65535&j)+(f&(1<>>=O,w-=O),w<15&&(f+=r[l++]<>>=O=j>>>24,w-=O,!(16&(O=j>>>16&255))){if(!(64&O)){j=x[(65535&j)+(f&(1<>>=O,w-=O,(O=y-m)>3,f&=(1<<(w-=Z<<3))-1,a.next_in=l,a.next_out=y,a.avail_in=l<_?_-l+5:5-(l-_),a.avail_out=y>>24&255)+(g>>>8&65280)+((65280&g)<<8)+((255&g)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(g){var T;return g&&g.state?(T=g.state,g.total_in=g.total_out=T.total=0,g.msg="",T.wrap&&(g.adler=1&T.wrap),T.mode=d,T.last=0,T.havedict=0,T.dmax=32768,T.head=null,T.hold=0,T.bits=0,T.lencode=T.lendyn=new a.Buf32(p),T.distcode=T.distdyn=new a.Buf32(n),T.sane=1,T.back=-1,b):i}function E(g){var T;return g&&g.state?((T=g.state).wsize=0,T.whave=0,T.wnext=0,w(g)):i}function x(g,T){var r,F;return g&&g.state?(F=g.state,T<0?(r=0,T=-T):(r=1+(T>>4),T<48&&(T&=15)),T&&(T<8||15=L.wsize?(a.arraySet(L.window,T,r-L.wsize,L.wsize,0),L.wnext=0,L.whave=L.wsize):(F<(Q=L.wsize-L.wnext)&&(Q=F),a.arraySet(L.window,T,r-F,Q,L.wnext),(F-=Q)?(a.arraySet(L.window,T,r-F,F,0),L.wnext=F,L.whave=L.wsize):(L.wnext+=Q,L.wnext===L.wsize&&(L.wnext=0),L.whave>>8&255,r.check=t(r.check,k,2,0),C=A=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&A)<<8)+(A>>8))%31){g.msg="incorrect header check",r.mode=30;break}if((15&A)!=8){g.msg="unknown compression method",r.mode=30;break}if(C-=4,e=8+(15&(A>>>=4)),r.wbits===0)r.wbits=e;else if(e>r.wbits){g.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(k[0]=255&A,k[1]=A>>>8&255,r.check=t(r.check,k,2,0)),C=A=0,r.mode=3;case 3:for(;C<32;){if(W===0)break e;W--,A+=F[L++]<>>8&255,k[2]=A>>>16&255,k[3]=A>>>24&255,r.check=t(r.check,k,4,0)),C=A=0,r.mode=4;case 4:for(;C<16;){if(W===0)break e;W--,A+=F[L++]<>8),512&r.flags&&(k[0]=255&A,k[1]=A>>>8&255,r.check=t(r.check,k,2,0)),C=A=0,r.mode=5;case 5:if(1024&r.flags){for(;C<16;){if(W===0)break e;W--,A+=F[L++]<>>8&255,r.check=t(r.check,k,2,0)),C=A=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(W<(G=r.length)&&(G=W),G&&(r.head&&(e=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),a.arraySet(r.head.extra,F,L,G,e)),512&r.flags&&(r.check=t(r.check,F,G,L)),W-=G,L+=G,r.length-=G),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(W===0)break e;for(G=0;e=F[L+G++],r.head&&e&&r.length<65536&&(r.head.name+=String.fromCharCode(e)),e&&G>9&1,r.head.done=!0),g.adler=r.check=0,r.mode=12;break;case 10:for(;C<32;){if(W===0)break e;W--,A+=F[L++]<>>=7&C,C-=7&C,r.mode=27;break}for(;C<3;){if(W===0)break e;W--,A+=F[L++]<>>=1)){case 0:r.mode=14;break;case 1:if(Z(r),r.mode=20,T!==6)break;A>>>=2,C-=2;break e;case 2:r.mode=17;break;case 3:g.msg="invalid block type",r.mode=30}A>>>=2,C-=2;break;case 14:for(A>>>=7&C,C-=7&C;C<32;){if(W===0)break e;W--,A+=F[L++]<>>16^65535)){g.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&A,C=A=0,r.mode=15,T===6)break e;case 15:r.mode=16;case 16:if(G=r.length){if(W>>=5,C-=5,r.ndist=1+(31&A),A>>>=5,C-=5,r.ncode=4+(15&A),A>>>=4,C-=4,286>>=3,C-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},B=_(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,B){g.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,ue=65535&u,!((re=u>>>24)<=C);){if(W===0)break e;W--,A+=F[L++]<>>=re,C-=re,r.lens[r.have++]=ue;else{if(ue===16){for(c=re+2;C>>=re,C-=re,r.have===0){g.msg="invalid bit length repeat",r.mode=30;break}e=r.lens[r.have-1],G=3+(3&A),A>>>=2,C-=2}else if(ue===17){for(c=re+3;C>>=re)),A>>>=3,C-=3}else{for(c=re+7;C>>=re)),A>>>=7,C-=7}if(r.have+G>r.nlen+r.ndist){g.msg="invalid bit length repeat",r.mode=30;break}for(;G--;)r.lens[r.have++]=e}}if(r.mode===30)break;if(r.lens[256]===0){g.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,I={bits:r.lenbits},B=_(y,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,B){g.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},B=_(m,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,B){g.msg="invalid distances set",r.mode=30;break}if(r.mode=20,T===6)break e;case 20:r.mode=21;case 21:if(6<=W&&258<=$){g.next_out=ee,g.avail_out=$,g.next_in=L,g.avail_in=W,r.hold=A,r.bits=C,l(g,q),ee=g.next_out,Q=g.output,$=g.avail_out,L=g.next_in,F=g.input,W=g.avail_in,A=r.hold,C=r.bits,r.mode===12&&(r.back=-1);break}for(r.back=0;ne=(u=r.lencode[A&(1<>>16&255,ue=65535&u,!((re=u>>>24)<=C);){if(W===0)break e;W--,A+=F[L++]<>se)])>>>16&255,ue=65535&u,!(se+(re=u>>>24)<=C);){if(W===0)break e;W--,A+=F[L++]<>>=se,C-=se,r.back+=se}if(A>>>=re,C-=re,r.back+=re,r.length=ue,ne===0){r.mode=26;break}if(32&ne){r.back=-1,r.mode=12;break}if(64&ne){g.msg="invalid literal/length code",r.mode=30;break}r.extra=15&ne,r.mode=22;case 22:if(r.extra){for(c=r.extra;C>>=r.extra,C-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;ne=(u=r.distcode[A&(1<>>16&255,ue=65535&u,!((re=u>>>24)<=C);){if(W===0)break e;W--,A+=F[L++]<>se)])>>>16&255,ue=65535&u,!(se+(re=u>>>24)<=C);){if(W===0)break e;W--,A+=F[L++]<>>=se,C-=se,r.back+=se}if(A>>>=re,C-=re,r.back+=re,64&ne){g.msg="invalid distance code",r.mode=30;break}r.offset=ue,r.extra=15&ne,r.mode=24;case 24:if(r.extra){for(c=r.extra;C>>=r.extra,C-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){g.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if($===0)break e;if(G=q-$,r.offset>G){if((G=r.offset-G)>r.whave&&r.sane){g.msg="invalid distance too far back",r.mode=30;break}ae=G>r.wnext?(G-=r.wnext,r.wsize-G):r.wnext-G,G>r.length&&(G=r.length),he=r.window}else he=Q,ae=ee-r.offset,G=r.length;for($R?(O=ae[he+n[T]],C[V+n[T]]):(O=96,0),f=1<>ee)+(w-=f)]=j<<24|O<<16|Z|0,w!==0;);for(f=1<>=1;if(f!==0?(A&=f-1,A+=f):A=0,T++,--q[g]==0){if(g===F)break;g=m[b+n[T]]}if(Q>>7)]}function V(u,k){u.pending_buf[u.pending++]=255&k,u.pending_buf[u.pending++]=k>>>8&255}function q(u,k,N){u.bi_valid>s-N?(u.bi_buf|=k<>s-u.bi_valid,u.bi_valid+=N-s):(u.bi_buf|=k<>>=1,N<<=1,0<--k;);return N>>>1}function he(u,k,N){var P,S,M=new Array(n+1),Y=0;for(P=1;P<=n;P++)M[P]=Y=Y+N[P-1]<<1;for(S=0;S<=k;S++){var H=u[2*S+1];H!==0&&(u[2*S]=ae(M[H]++,H))}}function re(u){var k;for(k=0;k>1;1<=N;N--)se(u,M,N);for(S=X;N=u.heap[1],u.heap[1]=u.heap[u.heap_len--],se(u,M,1),P=u.heap[1],u.heap[--u.heap_max]=N,u.heap[--u.heap_max]=P,M[2*S]=M[2*N]+M[2*P],u.depth[S]=(u.depth[N]>=u.depth[P]?u.depth[N]:u.depth[P])+1,M[2*N+1]=M[2*P+1]=S,u.heap[1]=S++,se(u,M,1),2<=u.heap_len;);u.heap[--u.heap_max]=u.heap[1],function(te,le){var ve,de,be,oe,ke,Ce,me=le.dyn_tree,Re=le.max_code,ar=le.stat_desc.static_tree,sr=le.stat_desc.has_stree,or=le.stat_desc.extra_bits,Te=le.stat_desc.extra_base,ye=le.stat_desc.max_length,xe=0;for(oe=0;oe<=n;oe++)te.bl_count[oe]=0;for(me[2*te.heap[te.heap_max]+1]=0,ve=te.heap_max+1;ve>=7;S>>=1)if(1&ie&&H.dyn_ltree[2*X]!==0)return h;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return t;for(X=32;X>>3,(M=u.static_len+3+7>>>3)<=S&&(S=M)):S=M=N+5,N+4<=S&&k!==-1?c(u,k,N,P):u.strategy===4||M===S?(q(u,2+(P?1:0),3),ce(u,J,g)):(q(u,4+(P?1:0),3),function(H,X,ie,te){var le;for(q(H,X-257,5),q(H,ie-1,5),q(H,te-4,4),le=0;le>>8&255,u.pending_buf[u.d_buf+2*u.last_lit+1]=255&k,u.pending_buf[u.l_buf+u.last_lit]=255&N,u.last_lit++,k===0?u.dyn_ltree[2*N]++:(u.matches++,k--,u.dyn_ltree[2*(r[N]+m+1)]++,u.dyn_dtree[2*C(k)]++),u.last_lit===u.lit_bufsize-1},v._tr_align=function(u){q(u,2,3),G(u,w,J),function(k){k.bi_valid===16?(V(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):8<=k.bi_valid&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)}(u)}},{"../utils/common":41}],53:[function(o,z,v){z.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,z,v){z.exports=typeof setImmediate=="function"?setImmediate:function(){var a=[].slice.apply(arguments);a.splice(1,0,0),setTimeout.apply(null,a)}},{}]},{},[10])(10)})})(Be);const De=Se,ze=new Map;function Fe(U,K){return new Promise((o,z)=>{const v=ze.get(U);if(v){o(v.clone());return}GM.xmlHttpRequest({method:(K==null?void 0:K.method)??"GET",url:U,headers:Object.fromEntries(new Headers(K==null?void 0:K.headers)),responseType:"blob",onload(a){if(a.status!==404&&(a.status<200||a.status>299)){z(new Error(`Fetching "${U}" responded with an erroneous status code.`));return}const h=a.responseHeaders.split(`\r -`).slice(0,-1).map(l=>l.split(": ")),t=new Response(a.response,{headers:Object.fromEntries(h),status:a.status,statusText:a.statusText});Object.defineProperty(t,"url",{value:U}),ze.set(U,t.clone()),o(t)},onerror(){z(new TypeError("Network request errored."))},ontimeout(){z(new TypeError("Network request timed out."))}})})}function Ne(U){for(var K=[],o=0;o=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||h===95){v+=U[a++];continue}break}if(!v)throw new TypeError("Missing parameter name at ".concat(o));K.push({type:"NAME",index:o,value:v}),o=a;continue}if(z==="("){var t=1,l="",a=o+1;if(U[a]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a)?(?!\?)/g,z=0,v=o.exec(U.source);v;)K.push({name:v[1]||z++,prefix:"",suffix:"",modifier:"",pattern:""}),v=o.exec(U.source);return U}function We(U,K,o){var z=U.map(function(v){return Ie(v,K,o).source});return new RegExp("(?:".concat(z.join("|"),")"),Ae(o))}function Ze(U,K,o){return Me(Pe(U,o),K,o)}function Me(U,K,o){o===void 0&&(o={});for(var z=o.strict,v=z===void 0?!1:z,a=o.start,h=a===void 0?!0:a,t=o.end,l=t===void 0?!0:t,_=o.encode,y=_===void 0?function(Z){return Z}:_,m=o.delimiter,b=m===void 0?"/#?":m,i=o.endsWith,d=i===void 0?"":i,p="[".concat(_e(d),"]|$"),n="[".concat(_e(b),"]"),s=h?"^":"",f=0,w=U;f-1:j===void 0;v||(s+="(?:".concat(n,"(?=").concat(p,"))?")),O||(s+="(?=".concat(n,"|").concat(p,")"))}return new RegExp(s,Ae(o))}function Ie(U,K,o){return U instanceof RegExp?je(U,K):Array.isArray(U)?We(U,K,o):Ze(U,K,o)}let pe=unsafeWindow;pe.wrappedJSObject&&(pe=pe.wrappedJSObject);const He=typeof cloneInto=="function"?cloneInto:U=>U,Ge=typeof exportFunction=="function"?exportFunction:U=>U;function Ke(U){return He(U,pe,{cloneFunctions:!0,wrapReflectors:!0})}function qe(U){return Ge(U,pe)}function Ye(U,K){return K??(K=pe),function(...o){return U.call(K,...Ke(o))}}const Ee=[],Xe=Ye(pe.history.pushState,pe.history);pe.history.pushState=qe(Ve);function Ve(U,K,o){Xe(U,K,o),Oe()}addEventListener("popstate",()=>{Oe()});function Oe(){for(const U of Ee){const K=U.matcher(location.pathname)?U.onCallbacks:U.offCallbacks;for(const o of K)o()}}function Je(U){let K=Ee.find(o=>o.pattern===U);return K||(K={pattern:U,matcher:Ue(U),onCallbacks:[],offCallbacks:[]},Ee.push(K),K)}function $e(U,K,o=!1){const z=Je(U),v=z.matcher(location.pathname);z.onCallbacks.push(K),v&&K()}function Qe(U){return new Promise(K=>{setTimeout(K,U)})}function er(U,K){const o=URL.createObjectURL(U),z=document.createElement("a");z.style.display="none",z.download=K,z.href=o,document.body.appendChild(z),z.click(),URL.revokeObjectURL(o)}function rr(U){$e("/album/:id",U)}function tr(){var o,z,v,a;const U={},K=Array.from(document.querySelectorAll("#album_infobit_large tr"));for(const h of K){const t=(z=(o=h.firstElementChild)==null?void 0:o.textContent)==null?void 0:z.trim(),l=(a=(v=h.lastElementChild)==null?void 0:v.textContent)==null?void 0:a.trim();if(!(!t||!l))switch(t){case"Catalog Number":U.catalog=l;break;case"Barcode":U.barcode=l;break}}return U}rr(()=>{var z;(z=document.querySelector("a[rel='cover_gallery']"))==null||z.click();const U=document.querySelector("#cover_gallery"),K=document.createElement("a");K.classList.add("ame-download_button"),K.innerText="Download all scans",U.insertAdjacentElement("afterbegin",K);let o=!1;K.addEventListener("click",async()=>{if(!o){o=!0;try{K.dataset.status="loading",await nr(),K.dataset.status="success"}catch(v){K.dataset.status="error",console.error(v)}o=!1}})});async function nr(){const U=new De,K=tr(),o=`${K.catalog??K.barcode??"Scans"}`,z=Array.from(document.querySelectorAll('#cover_gallery a[href^="https://media.vgm.io"]'));for(const v of z){const a=await Fe(v.href).then(h=>h.blob());U.file(`${o}/${v.querySelector("h4").innerText.trim()}.jpg`,a),await Qe(100)}er(await U.generateAsync({type:"blob"}),`${o}.zip`)}const ir=`.ame-download_button{display:block;margin-bottom:10px;cursor:pointer}.ame-download_button[data-status=loading]{color:#006ad4;font-weight:700}.ame-download_button[data-status=success]{color:#00d46a;font-weight:700}.ame-download_button[data-status=error]{color:#d40000;font-weight:700} -`;GM.addStyle(ir)}); + */(function(z,L){(function(i){z.exports=i()})(function(){return function i(k,d,s){function n(v,b){if(!d[v]){if(!k[v]){var g=typeof we=="function"&&we;if(!b&&g)return g(v,!0);if(t)return t(v,!0);var m=new Error("Cannot find module '"+v+"'");throw m.code="MODULE_NOT_FOUND",m}var o=d[v]={exports:{}};k[v][0].call(o.exports,function(h){var p=k[v][1][h];return n(p||h)},o,o.exports,i,k,d,s)}return d[v].exports}for(var t=typeof we=="function"&&we,u=0;u>2,o=(3&v)<<4|b>>4,h=1>6:64,p=2>4,b=(15&m)<<4|(o=t.indexOf(u.charAt(p++)))>>2,g=(3&o)<<6|(h=t.indexOf(u.charAt(p++))),c[a++]=v,o!==64&&(c[a++]=b),h!==64&&(c[a++]=g);return c}},{"./support":30,"./utils":32}],2:[function(i,k,d){var s=i("./external"),n=i("./stream/DataWorker"),t=i("./stream/Crc32Probe"),u=i("./stream/DataLengthProbe");function v(b,g,m,o,h){this.compressedSize=b,this.uncompressedSize=g,this.crc32=m,this.compression=o,this.compressedContent=h}v.prototype={getContentWorker:function(){var b=new n(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),g=this;return b.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),b},getCompressedWorker:function(){return new n(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},v.createWorkerFrom=function(b,g,m){return b.pipe(new t).pipe(new u("uncompressedSize")).pipe(g.compressWorker(m)).pipe(new u("compressedSize")).withStreamInfo("compression",g)},k.exports=v},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(i,k,d){var s=i("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(n){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},d.DEFLATE=i("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(i,k,d){var s=i("./utils"),n=function(){for(var t,u=[],v=0;v<256;v++){t=v;for(var b=0;b<8;b++)t=1&t?3988292384^t>>>1:t>>>1;u[v]=t}return u}();k.exports=function(t,u){return t!==void 0&&t.length?s.getTypeOf(t)!=="string"?function(v,b,g,m){var o=n,h=m+g;v^=-1;for(var p=m;p>>8^o[255&(v^b[p])];return-1^v}(0|u,t,t.length,0):function(v,b,g,m){var o=n,h=m+g;v^=-1;for(var p=m;p>>8^o[255&(v^b.charCodeAt(p))];return-1^v}(0|u,t,t.length,0):0}},{"./utils":32}],5:[function(i,k,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(i,k,d){var s=null;s=typeof Promise<"u"?Promise:i("lie"),k.exports={Promise:s}},{lie:37}],7:[function(i,k,d){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",n=i("pako"),t=i("./utils"),u=i("./stream/GenericWorker"),v=s?"uint8array":"array";function b(g,m){u.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=m,this.meta={}}d.magic="\b\0",t.inherits(b,u),b.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(t.transformTo(v,g.data),!1)},b.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},b.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},b.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(m){g.push({data:m,meta:g.meta})}},d.compressWorker=function(g){return new b("Deflate",g)},d.uncompressWorker=function(){return new b("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,k,d){function s(o,h){var p,a="";for(p=0;p>>=8;return a}function n(o,h,p,a,A,c){var w,E,x=o.file,R=o.compression,I=c!==v.utf8encode,U=t.transformTo("string",c(x.name)),T=t.transformTo("string",v.utf8encode(x.name)),W=x.comment,Q=t.transformTo("string",c(W)),_=t.transformTo("string",v.utf8encode(W)),D=T.length!==x.name.length,r=_.length!==W.length,M="",$="",H="",ee=x.dir,F=x.date,J={crc32:0,compressedSize:0,uncompressedSize:0};h&&!p||(J.crc32=o.crc32,J.compressedSize=o.compressedSize,J.uncompressedSize=o.uncompressedSize);var P=0;h&&(P|=8),I||!D&&!r||(P|=2048);var C=0,K=0;ee&&(C|=16),A==="UNIX"?(K=798,C|=function(G,ae){var ue=G;return G||(ue=ae?16893:33204),(65535&ue)<<16}(x.unixPermissions,ee)):(K=20,C|=function(G){return 63&(G||0)}(x.dosPermissions)),w=F.getUTCHours(),w<<=6,w|=F.getUTCMinutes(),w<<=5,w|=F.getUTCSeconds()/2,E=F.getUTCFullYear()-1980,E<<=4,E|=F.getUTCMonth()+1,E<<=5,E|=F.getUTCDate(),D&&($=s(1,1)+s(b(U),4)+T,M+="up"+s($.length,2)+$),r&&(H=s(1,1)+s(b(Q),4)+_,M+="uc"+s(H.length,2)+H);var q="";return q+=` +\0`,q+=s(P,2),q+=R.magic,q+=s(w,2),q+=s(E,2),q+=s(J.crc32,4),q+=s(J.compressedSize,4),q+=s(J.uncompressedSize,4),q+=s(U.length,2),q+=s(M.length,2),{fileRecord:g.LOCAL_FILE_HEADER+q+U+M,dirRecord:g.CENTRAL_FILE_HEADER+s(K,2)+q+s(Q.length,2)+"\0\0\0\0"+s(C,4)+s(a,4)+U+M+Q}}var t=i("../utils"),u=i("../stream/GenericWorker"),v=i("../utf8"),b=i("../crc32"),g=i("../signature");function m(o,h,p,a){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=h,this.zipPlatform=p,this.encodeFileName=a,this.streamFiles=o,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}t.inherits(m,u),m.prototype.push=function(o){var h=o.meta.percent||0,p=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(o):(this.bytesWritten+=o.data.length,u.prototype.push.call(this,{data:o.data,meta:{currentFile:this.currentFile,percent:p?(h+100*(p-a-1))/p:100}}))},m.prototype.openedSource=function(o){this.currentSourceOffset=this.bytesWritten,this.currentFile=o.file.name;var h=this.streamFiles&&!o.file.dir;if(h){var p=n(o,h,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(o){this.accumulate=!1;var h=this.streamFiles&&!o.file.dir,p=n(o,h,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),h)this.push({data:function(a){return g.DATA_DESCRIPTOR+s(a.crc32,4)+s(a.compressedSize,4)+s(a.uncompressedSize,4)}(o),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var o=this.bytesWritten,h=0;h=this.index;u--)v=(v<<8)+this.byteAt(u);return this.index+=t,v},readString:function(t){return s.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},k.exports=n},{"../utils":32}],19:[function(i,k,d){var s=i("./Uint8ArrayReader");function n(t){s.call(this,t)}i("../utils").inherits(n,s),n.prototype.readData=function(t){this.checkOffset(t);var u=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,u},k.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(i,k,d){var s=i("./DataReader");function n(t){s.call(this,t)}i("../utils").inherits(n,s),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var u=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,u},k.exports=n},{"../utils":32,"./DataReader":18}],21:[function(i,k,d){var s=i("./ArrayReader");function n(t){s.call(this,t)}i("../utils").inherits(n,s),n.prototype.readData=function(t){if(this.checkOffset(t),t===0)return new Uint8Array(0);var u=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,u},k.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(i,k,d){var s=i("../utils"),n=i("../support"),t=i("./ArrayReader"),u=i("./StringReader"),v=i("./NodeBufferReader"),b=i("./Uint8ArrayReader");k.exports=function(g){var m=s.getTypeOf(g);return s.checkSupport(m),m!=="string"||n.uint8array?m==="nodebuffer"?new v(g):n.uint8array?new b(s.transformTo("uint8array",g)):new t(s.transformTo("array",g)):new u(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(i,k,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(i,k,d){var s=i("./GenericWorker"),n=i("../utils");function t(u){s.call(this,"ConvertWorker to "+u),this.destType=u}n.inherits(t,s),t.prototype.processChunk=function(u){this.push({data:n.transformTo(this.destType,u.data),meta:u.meta})},k.exports=t},{"../utils":32,"./GenericWorker":28}],25:[function(i,k,d){var s=i("./GenericWorker"),n=i("../crc32");function t(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(t,s),t.prototype.processChunk=function(u){this.streamInfo.crc32=n(u.data,this.streamInfo.crc32||0),this.push(u)},k.exports=t},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(i,k,d){var s=i("../utils"),n=i("./GenericWorker");function t(u){n.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}s.inherits(t,n),t.prototype.processChunk=function(u){if(u){var v=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=v+u.data.length}n.prototype.processChunk.call(this,u)},k.exports=t},{"../utils":32,"./GenericWorker":28}],27:[function(i,k,d){var s=i("../utils"),n=i("./GenericWorker");function t(u){n.call(this,"DataWorker");var v=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(b){v.dataIsReady=!0,v.data=b,v.max=b&&b.length||0,v.type=s.getTypeOf(b),v.isPaused||v._tickAndRepeat()},function(b){v.error(b)})}s.inherits(t,n),t.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},t.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},t.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},t.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var u=null,v=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,v);break;case"uint8array":u=this.data.subarray(this.index,v);break;case"array":case"nodebuffer":u=this.data.slice(this.index,v)}return this.index=v,this.push({data:u,meta:{percent:this.max?this.index/this.max*100:0}})},k.exports=t},{"../utils":32,"./GenericWorker":28}],28:[function(i,k,d){function s(n){this.name=n||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(n){this.emit("data",n)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(n){this.emit("error",n)}return!0},error:function(n){return!this.isFinished&&(this.isPaused?this.generatedError=n:(this.isFinished=!0,this.emit("error",n),this.previous&&this.previous.error(n),this.cleanUp()),!0)},on:function(n,t){return this._listeners[n].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(n,t){if(this._listeners[n])for(var u=0;u "+n:n}},k.exports=s},{}],29:[function(i,k,d){var s=i("../utils"),n=i("./ConvertWorker"),t=i("./GenericWorker"),u=i("../base64"),v=i("../support"),b=i("../external"),g=null;if(v.nodestream)try{g=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(h,p){return new b.Promise(function(a,A){var c=[],w=h._internalType,E=h._outputType,x=h._mimeType;h.on("data",function(R,I){c.push(R),p&&p(I)}).on("error",function(R){c=[],A(R)}).on("end",function(){try{var R=function(I,U,T){switch(I){case"blob":return s.newBlob(s.transformTo("arraybuffer",U),T);case"base64":return u.encode(U);default:return s.transformTo(I,U)}}(E,function(I,U){var T,W=0,Q=null,_=0;for(T=0;T"u")d.blob=!1;else{var s=new ArrayBuffer(0);try{d.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(s),d.blob=n.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!i("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(i,k,d){for(var s=i("./utils"),n=i("./support"),t=i("./nodejsUtils"),u=i("./stream/GenericWorker"),v=new Array(256),b=0;b<256;b++)v[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;v[254]=v[254]=1;function g(){u.call(this,"utf-8 decode"),this.leftOver=null}function m(){u.call(this,"utf-8 encode")}d.utf8encode=function(o){return n.nodebuffer?t.newBufferFrom(o,"utf-8"):function(h){var p,a,A,c,w,E=h.length,x=0;for(c=0;c>>6:(a<65536?p[w++]=224|a>>>12:(p[w++]=240|a>>>18,p[w++]=128|a>>>12&63),p[w++]=128|a>>>6&63),p[w++]=128|63&a);return p}(o)},d.utf8decode=function(o){return n.nodebuffer?s.transformTo("nodebuffer",o).toString("utf-8"):function(h){var p,a,A,c,w=h.length,E=new Array(2*w);for(p=a=0;p>10&1023,E[a++]=56320|1023&A)}return E.length!==a&&(E.subarray?E=E.subarray(0,a):E.length=a),s.applyFromCharCode(E)}(o=s.transformTo(n.uint8array?"uint8array":"array",o))},s.inherits(g,u),g.prototype.processChunk=function(o){var h=s.transformTo(n.uint8array?"uint8array":"array",o.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var p=h;(h=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),h.set(p,this.leftOver.length)}else h=this.leftOver.concat(h);this.leftOver=null}var a=function(c,w){var E;for((w=w||c.length)>c.length&&(w=c.length),E=w-1;0<=E&&(192&c[E])==128;)E--;return E<0||E===0?w:E+v[c[E]]>w?E:w}(h),A=h;a!==h.length&&(n.uint8array?(A=h.subarray(0,a),this.leftOver=h.subarray(a,h.length)):(A=h.slice(0,a),this.leftOver=h.slice(a,h.length))),this.push({data:d.utf8decode(A),meta:o.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=g,s.inherits(m,u),m.prototype.processChunk=function(o){this.push({data:d.utf8encode(o.data),meta:o.meta})},d.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(i,k,d){var s=i("./support"),n=i("./base64"),t=i("./nodejsUtils"),u=i("set-immediate-shim"),v=i("./external");function b(a){return a}function g(a,A){for(var c=0;c>8;this.dir=!!(16&this.externalFileAttributes),o==0&&(this.dosPermissions=63&this.externalFileAttributes),o==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(o){if(this.extraFields[1]){var h=s(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(o){var h,p,a,A=o.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});o.index+4>>6:(o<65536?m[a++]=224|o>>>12:(m[a++]=240|o>>>18,m[a++]=128|o>>>12&63),m[a++]=128|o>>>6&63),m[a++]=128|63&o);return m},d.buf2binstring=function(g){return b(g,g.length)},d.binstring2buf=function(g){for(var m=new s.Buf8(g.length),o=0,h=m.length;o>10&1023,c[h++]=56320|1023&p)}return b(c,h)},d.utf8border=function(g,m){var o;for((m=m||g.length)>g.length&&(m=g.length),o=m-1;0<=o&&(192&g[o])==128;)o--;return o<0||o===0?m:o+u[g[o]]>m?o:m}},{"./common":41}],43:[function(i,k,d){k.exports=function(s,n,t,u){for(var v=65535&s|0,b=s>>>16&65535|0,g=0;t!==0;){for(t-=g=2e3>>1:n>>>1;t[u]=n}return t}();k.exports=function(n,t,u,v){var b=s,g=v+u;n^=-1;for(var m=v;m>>8^b[255&(n^t[m])];return-1^n}},{}],46:[function(i,k,d){var s,n=i("../utils/common"),t=i("./trees"),u=i("./adler32"),v=i("./crc32"),b=i("./messages"),g=0,m=4,o=0,h=-2,p=-1,a=4,A=2,c=8,w=9,E=286,x=30,R=19,I=2*E+1,U=15,T=3,W=258,Q=W+T+1,_=42,D=113,r=1,M=2,$=3,H=4;function ee(e,B){return e.msg=b[B],B}function F(e){return(e<<1)-(4e.avail_out&&(O=e.avail_out),O!==0&&(n.arraySet(e.output,B.pending_buf,B.pending_out,O,e.next_out),e.next_out+=O,B.pending_out+=O,e.total_out+=O,e.avail_out-=O,B.pending-=O,B.pending===0&&(B.pending_out=0))}function C(e,B){t._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,B),e.block_start=e.strstart,P(e.strm)}function K(e,B){e.pending_buf[e.pending++]=B}function q(e,B){e.pending_buf[e.pending++]=B>>>8&255,e.pending_buf[e.pending++]=255&B}function G(e,B){var O,f,l=e.max_chain_length,y=e.strstart,j=e.prev_length,N=e.nice_match,S=e.strstart>e.w_size-Q?e.strstart-(e.w_size-Q):0,Z=e.window,V=e.w_mask,Y=e.prev,X=e.strstart+W,ie=Z[y+j-1],te=Z[y+j];e.prev_length>=e.good_match&&(l>>=2),N>e.lookahead&&(N=e.lookahead);do if(Z[(O=B)+j]===te&&Z[O+j-1]===ie&&Z[O]===Z[y]&&Z[++O]===Z[y+1]){y+=2,O++;do;while(Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&Z[++y]===Z[++O]&&yS&&--l!=0);return j<=e.lookahead?j:e.lookahead}function ae(e){var B,O,f,l,y,j,N,S,Z,V,Y=e.w_size;do{if(l=e.window_size-e.lookahead-e.strstart,e.strstart>=Y+(Y-Q)){for(n.arraySet(e.window,e.window,Y,Y,0),e.match_start-=Y,e.strstart-=Y,e.block_start-=Y,B=O=e.hash_size;f=e.head[--B],e.head[B]=Y<=f?f-Y:0,--O;);for(B=O=Y;f=e.prev[--B],e.prev[B]=Y<=f?f-Y:0,--O;);l+=Y}if(e.strm.avail_in===0)break;if(j=e.strm,N=e.window,S=e.strstart+e.lookahead,Z=l,V=void 0,V=j.avail_in,Z=T)for(y=e.strstart-e.insert,e.ins_h=e.window[y],e.ins_h=(e.ins_h<=T&&(e.ins_h=(e.ins_h<=T)if(f=t._tr_tally(e,e.strstart-e.match_start,e.match_length-T),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=T){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=T&&(e.ins_h=(e.ins_h<=T&&e.match_length<=e.prev_length){for(l=e.strstart+e.lookahead-T,f=t._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-T),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=l&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(O=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),e.lookahead===0&&B===g)return r;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var f=e.block_start+O;if((e.strstart===0||e.strstart>=f)&&(e.lookahead=e.strstart-f,e.strstart=f,C(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Q&&(C(e,!1),e.strm.avail_out===0))return r}return e.insert=0,B===m?(C(e,!0),e.strm.avail_out===0?$:H):(e.strstart>e.block_start&&(C(e,!1),e.strm.avail_out),r)}),new ne(4,4,8,4,ue),new ne(4,5,16,8,ue),new ne(4,6,32,32,ue),new ne(4,4,16,16,re),new ne(8,16,32,32,re),new ne(8,16,128,128,re),new ne(8,32,128,256,re),new ne(32,128,258,1024,re),new ne(32,258,258,4096,re)],d.deflateInit=function(e,B){return ce(e,B,c,15,8,0)},d.deflateInit2=ce,d.deflateReset=fe,d.deflateResetKeep=se,d.deflateSetHeader=function(e,B){return e&&e.state?e.state.wrap!==2?h:(e.state.gzhead=B,o):h},d.deflate=function(e,B){var O,f,l,y;if(!e||!e.state||5>8&255),K(f,f.gzhead.time>>16&255),K(f,f.gzhead.time>>24&255),K(f,f.level===9?2:2<=f.strategy||f.level<2?4:0),K(f,255&f.gzhead.os),f.gzhead.extra&&f.gzhead.extra.length&&(K(f,255&f.gzhead.extra.length),K(f,f.gzhead.extra.length>>8&255)),f.gzhead.hcrc&&(e.adler=v(e.adler,f.pending_buf,f.pending,0)),f.gzindex=0,f.status=69):(K(f,0),K(f,0),K(f,0),K(f,0),K(f,0),K(f,f.level===9?2:2<=f.strategy||f.level<2?4:0),K(f,3),f.status=D);else{var j=c+(f.w_bits-8<<4)<<8;j|=(2<=f.strategy||f.level<2?0:f.level<6?1:f.level===6?2:3)<<6,f.strstart!==0&&(j|=32),j+=31-j%31,f.status=D,q(f,j),f.strstart!==0&&(q(f,e.adler>>>16),q(f,65535&e.adler)),e.adler=1}if(f.status===69)if(f.gzhead.extra){for(l=f.pending;f.gzindex<(65535&f.gzhead.extra.length)&&(f.pending!==f.pending_buf_size||(f.gzhead.hcrc&&f.pending>l&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),P(e),l=f.pending,f.pending!==f.pending_buf_size));)K(f,255&f.gzhead.extra[f.gzindex]),f.gzindex++;f.gzhead.hcrc&&f.pending>l&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),f.gzindex===f.gzhead.extra.length&&(f.gzindex=0,f.status=73)}else f.status=73;if(f.status===73)if(f.gzhead.name){l=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>l&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),P(e),l=f.pending,f.pending===f.pending_buf_size)){y=1;break}y=f.gzindexl&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),y===0&&(f.gzindex=0,f.status=91)}else f.status=91;if(f.status===91)if(f.gzhead.comment){l=f.pending;do{if(f.pending===f.pending_buf_size&&(f.gzhead.hcrc&&f.pending>l&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),P(e),l=f.pending,f.pending===f.pending_buf_size)){y=1;break}y=f.gzindexl&&(e.adler=v(e.adler,f.pending_buf,f.pending-l,l)),y===0&&(f.status=103)}else f.status=103;if(f.status===103&&(f.gzhead.hcrc?(f.pending+2>f.pending_buf_size&&P(e),f.pending+2<=f.pending_buf_size&&(K(f,255&e.adler),K(f,e.adler>>8&255),e.adler=0,f.status=D)):f.status=D),f.pending!==0){if(P(e),e.avail_out===0)return f.last_flush=-1,o}else if(e.avail_in===0&&F(B)<=F(O)&&B!==m)return ee(e,-5);if(f.status===666&&e.avail_in!==0)return ee(e,-5);if(e.avail_in!==0||f.lookahead!==0||B!==g&&f.status!==666){var N=f.strategy===2?function(S,Z){for(var V;;){if(S.lookahead===0&&(ae(S),S.lookahead===0)){if(Z===g)return r;break}if(S.match_length=0,V=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++,V&&(C(S,!1),S.strm.avail_out===0))return r}return S.insert=0,Z===m?(C(S,!0),S.strm.avail_out===0?$:H):S.last_lit&&(C(S,!1),S.strm.avail_out===0)?r:M}(f,B):f.strategy===3?function(S,Z){for(var V,Y,X,ie,te=S.window;;){if(S.lookahead<=W){if(ae(S),S.lookahead<=W&&Z===g)return r;if(S.lookahead===0)break}if(S.match_length=0,S.lookahead>=T&&0S.lookahead&&(S.match_length=S.lookahead)}if(S.match_length>=T?(V=t._tr_tally(S,1,S.match_length-T),S.lookahead-=S.match_length,S.strstart+=S.match_length,S.match_length=0):(V=t._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++),V&&(C(S,!1),S.strm.avail_out===0))return r}return S.insert=0,Z===m?(C(S,!0),S.strm.avail_out===0?$:H):S.last_lit&&(C(S,!1),S.strm.avail_out===0)?r:M}(f,B):s[f.level].func(f,B);if(N!==$&&N!==H||(f.status=666),N===r||N===$)return e.avail_out===0&&(f.last_flush=-1),o;if(N===M&&(B===1?t._tr_align(f):B!==5&&(t._tr_stored_block(f,0,0,!1),B===3&&(J(f.head),f.lookahead===0&&(f.strstart=0,f.block_start=0,f.insert=0))),P(e),e.avail_out===0))return f.last_flush=-1,o}return B!==m?o:f.wrap<=0?1:(f.wrap===2?(K(f,255&e.adler),K(f,e.adler>>8&255),K(f,e.adler>>16&255),K(f,e.adler>>24&255),K(f,255&e.total_in),K(f,e.total_in>>8&255),K(f,e.total_in>>16&255),K(f,e.total_in>>24&255)):(q(f,e.adler>>>16),q(f,65535&e.adler)),P(e),0=O.w_size&&(y===0&&(J(O.head),O.strstart=0,O.block_start=0,O.insert=0),Z=new n.Buf8(O.w_size),n.arraySet(Z,B,V-O.w_size,O.w_size,0),B=Z,V=O.w_size),j=e.avail_in,N=e.next_in,S=e.input,e.avail_in=V,e.next_in=0,e.input=B,ae(O);O.lookahead>=T;){for(f=O.strstart,l=O.lookahead-(T-1);O.ins_h=(O.ins_h<>>=T=U>>>24,w-=T,(T=U>>>16&255)===0)M[b++]=65535&U;else{if(!(16&T)){if(!(64&T)){U=E[(65535&U)+(c&(1<>>=T,w-=T),w<15&&(c+=r[u++]<>>=T=U>>>24,w-=T,!(16&(T=U>>>16&255))){if(!(64&T)){U=x[(65535&U)+(c&(1<>>=T,w-=T,(T=b-g)>3,c&=(1<<(w-=W<<3))-1,s.next_in=u,s.next_out=b,s.avail_in=u>>24&255)+(_>>>8&65280)+((65280&_)<<8)+((255&_)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(_){var D;return _&&_.state?(D=_.state,_.total_in=_.total_out=D.total=0,_.msg="",D.wrap&&(_.adler=1&D.wrap),D.mode=h,D.last=0,D.havedict=0,D.dmax=32768,D.head=null,D.hold=0,D.bits=0,D.lencode=D.lendyn=new s.Buf32(p),D.distcode=D.distdyn=new s.Buf32(a),D.sane=1,D.back=-1,m):o}function E(_){var D;return _&&_.state?((D=_.state).wsize=0,D.whave=0,D.wnext=0,w(_)):o}function x(_,D){var r,M;return _&&_.state?(M=_.state,D<0?(r=0,D=-D):(r=1+(D>>4),D<48&&(D&=15)),D&&(D<8||15=H.wsize?(s.arraySet(H.window,D,r-H.wsize,H.wsize,0),H.wnext=0,H.whave=H.wsize):(M<($=H.wsize-H.wnext)&&($=M),s.arraySet(H.window,D,r-M,$,H.wnext),(M-=$)?(s.arraySet(H.window,D,r-M,M,0),H.wnext=M,H.whave=H.wsize):(H.wnext+=$,H.wnext===H.wsize&&(H.wnext=0),H.whave>>8&255,r.check=t(r.check,y,2,0),C=P=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&P)<<8)+(P>>8))%31){_.msg="incorrect header check",r.mode=30;break}if((15&P)!=8){_.msg="unknown compression method",r.mode=30;break}if(C-=4,e=8+(15&(P>>>=4)),r.wbits===0)r.wbits=e;else if(e>r.wbits){_.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(y[0]=255&P,y[1]=P>>>8&255,r.check=t(r.check,y,2,0)),C=P=0,r.mode=3;case 3:for(;C<32;){if(F===0)break e;F--,P+=M[H++]<>>8&255,y[2]=P>>>16&255,y[3]=P>>>24&255,r.check=t(r.check,y,4,0)),C=P=0,r.mode=4;case 4:for(;C<16;){if(F===0)break e;F--,P+=M[H++]<>8),512&r.flags&&(y[0]=255&P,y[1]=P>>>8&255,r.check=t(r.check,y,2,0)),C=P=0,r.mode=5;case 5:if(1024&r.flags){for(;C<16;){if(F===0)break e;F--,P+=M[H++]<>>8&255,r.check=t(r.check,y,2,0)),C=P=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(F<(G=r.length)&&(G=F),G&&(r.head&&(e=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),s.arraySet(r.head.extra,M,H,G,e)),512&r.flags&&(r.check=t(r.check,M,G,H)),F-=G,H+=G,r.length-=G),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(F===0)break e;for(G=0;e=M[H+G++],r.head&&e&&r.length<65536&&(r.head.name+=String.fromCharCode(e)),e&&G>9&1,r.head.done=!0),_.adler=r.check=0,r.mode=12;break;case 10:for(;C<32;){if(F===0)break e;F--,P+=M[H++]<>>=7&C,C-=7&C,r.mode=27;break}for(;C<3;){if(F===0)break e;F--,P+=M[H++]<>>=1)){case 0:r.mode=14;break;case 1:if(W(r),r.mode=20,D!==6)break;P>>>=2,C-=2;break e;case 2:r.mode=17;break;case 3:_.msg="invalid block type",r.mode=30}P>>>=2,C-=2;break;case 14:for(P>>>=7&C,C-=7&C;C<32;){if(F===0)break e;F--,P+=M[H++]<>>16^65535)){_.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&P,C=P=0,r.mode=15,D===6)break e;case 15:r.mode=16;case 16:if(G=r.length){if(F>>=5,C-=5,r.ndist=1+(31&P),P>>>=5,C-=5,r.ncode=4+(15&P),P>>>=4,C-=4,286>>=3,C-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},B=v(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,B){_.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,Ae=65535&l,!((re=l>>>24)<=C);){if(F===0)break e;F--,P+=M[H++]<>>=re,C-=re,r.lens[r.have++]=Ae;else{if(Ae===16){for(f=re+2;C>>=re,C-=re,r.have===0){_.msg="invalid bit length repeat",r.mode=30;break}e=r.lens[r.have-1],G=3+(3&P),P>>>=2,C-=2}else if(Ae===17){for(f=re+3;C>>=re)),P>>>=3,C-=3}else{for(f=re+7;C>>=re)),P>>>=7,C-=7}if(r.have+G>r.nlen+r.ndist){_.msg="invalid bit length repeat",r.mode=30;break}for(;G--;)r.lens[r.have++]=e}}if(r.mode===30)break;if(r.lens[256]===0){_.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,O={bits:r.lenbits},B=v(b,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,B){_.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},B=v(g,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,B){_.msg="invalid distances set",r.mode=30;break}if(r.mode=20,D===6)break e;case 20:r.mode=21;case 21:if(6<=F&&258<=J){_.next_out=ee,_.avail_out=J,_.next_in=H,_.avail_in=F,r.hold=P,r.bits=C,u(_,q),ee=_.next_out,$=_.output,J=_.avail_out,H=_.next_in,M=_.input,F=_.avail_in,P=r.hold,C=r.bits,r.mode===12&&(r.back=-1);break}for(r.back=0;ne=(l=r.lencode[P&(1<>>16&255,Ae=65535&l,!((re=l>>>24)<=C);){if(F===0)break e;F--,P+=M[H++]<>se)])>>>16&255,Ae=65535&l,!(se+(re=l>>>24)<=C);){if(F===0)break e;F--,P+=M[H++]<>>=se,C-=se,r.back+=se}if(P>>>=re,C-=re,r.back+=re,r.length=Ae,ne===0){r.mode=26;break}if(32&ne){r.back=-1,r.mode=12;break}if(64&ne){_.msg="invalid literal/length code",r.mode=30;break}r.extra=15&ne,r.mode=22;case 22:if(r.extra){for(f=r.extra;C>>=r.extra,C-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;ne=(l=r.distcode[P&(1<>>16&255,Ae=65535&l,!((re=l>>>24)<=C);){if(F===0)break e;F--,P+=M[H++]<>se)])>>>16&255,Ae=65535&l,!(se+(re=l>>>24)<=C);){if(F===0)break e;F--,P+=M[H++]<>>=se,C-=se,r.back+=se}if(P>>>=re,C-=re,r.back+=re,64&ne){_.msg="invalid distance code",r.mode=30;break}r.offset=Ae,r.extra=15&ne,r.mode=24;case 24:if(r.extra){for(f=r.extra;C>>=r.extra,C-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){_.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(J===0)break e;if(G=q-J,r.offset>G){if((G=r.offset-G)>r.whave&&r.sane){_.msg="invalid distance too far back",r.mode=30;break}ae=G>r.wnext?(G-=r.wnext,r.wsize-G):r.wnext-G,G>r.length&&(G=r.length),ue=r.window}else ue=$,ae=ee-r.offset,G=r.length;for(JI?(T=ae[ue+a[D]],C[K+a[D]]):(T=96,0),c=1<<_-ee,r=w=1<>ee)+(w-=c)]=U<<24|T<<16|W|0,w!==0;);for(c=1<<_-1;P&c;)c>>=1;if(c!==0?(P&=c-1,P+=c):P=0,D++,--q[_]==0){if(_===M)break;_=g[m+a[D]]}if($<_&&(P&x)!==E){for(ee===0&&(ee=$),R+=r,F=1<<(H=_-ee);H+ee>>7)]}function K(l,y){l.pending_buf[l.pending++]=255&y,l.pending_buf[l.pending++]=y>>>8&255}function q(l,y,j){l.bi_valid>A-j?(l.bi_buf|=y<>A-l.bi_valid,l.bi_valid+=j-A):(l.bi_buf|=y<>>=1,j<<=1,0<--y;);return j>>>1}function ue(l,y,j){var N,S,Z=new Array(a+1),V=0;for(N=1;N<=a;N++)Z[N]=V=V+j[N-1]<<1;for(S=0;S<=y;S++){var Y=l[2*S+1];Y!==0&&(l[2*S]=ae(Z[Y]++,Y))}}function re(l){var y;for(y=0;y>1;1<=j;j--)se(l,Z,j);for(S=X;j=l.heap[1],l.heap[1]=l.heap[l.heap_len--],se(l,Z,1),N=l.heap[1],l.heap[--l.heap_max]=j,l.heap[--l.heap_max]=N,Z[2*S]=Z[2*j]+Z[2*N],l.depth[S]=(l.depth[j]>=l.depth[N]?l.depth[j]:l.depth[N])+1,Z[2*j+1]=Z[2*N+1]=S,l.heap[1]=S++,se(l,Z,1),2<=l.heap_len;);l.heap[--l.heap_max]=l.heap[1],function(te,le){var ve,he,_e,oe,ye,Ce,pe=le.dyn_tree,je=le.max_code,vr=le.stat_desc.static_tree,_r=le.stat_desc.has_stree,br=le.stat_desc.extra_bits,Le=le.stat_desc.extra_base,be=le.stat_desc.max_length,ke=0;for(oe=0;oe<=a;oe++)te.bl_count[oe]=0;for(pe[2*te.heap[te.heap_max]+1]=0,ve=te.heap_max+1;ve>=7;S>>=1)if(1&ie&&Y.dyn_ltree[2*X]!==0)return n;if(Y.dyn_ltree[18]!==0||Y.dyn_ltree[20]!==0||Y.dyn_ltree[26]!==0)return t;for(X=32;X>>3,(Z=l.static_len+3+7>>>3)<=S&&(S=Z)):S=Z=j+5,j+4<=S&&y!==-1?f(l,y,j,N):l.strategy===4||Z===S?(q(l,2+(N?1:0),3),fe(l,Q,_)):(q(l,4+(N?1:0),3),function(Y,X,ie,te){var le;for(q(Y,X-257,5),q(Y,ie-1,5),q(Y,te-4,4),le=0;le>>8&255,l.pending_buf[l.d_buf+2*l.last_lit+1]=255&y,l.pending_buf[l.l_buf+l.last_lit]=255&j,l.last_lit++,y===0?l.dyn_ltree[2*j]++:(l.matches++,y--,l.dyn_ltree[2*(r[j]+g+1)]++,l.dyn_dtree[2*C(y)]++),l.last_lit===l.lit_bufsize-1},d._tr_align=function(l){q(l,2,3),G(l,w,Q),function(y){y.bi_valid===16?(K(y,y.bi_buf),y.bi_buf=0,y.bi_valid=0):8<=y.bi_valid&&(y.pending_buf[y.pending++]=255&y.bi_buf,y.bi_buf>>=8,y.bi_valid-=8)}(l)}},{"../utils/common":41}],53:[function(i,k,d){k.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(i,k,d){k.exports=typeof setImmediate=="function"?setImmediate:function(){var s=[].slice.apply(arguments);s.splice(1,0,0),setTimeout.apply(null,s)}},{}]},{},[10])(10)})})(Ne);const He=xe,Pe=new Map;function Oe(z,L){return new Promise((i,k)=>{const d=Pe.get(z);if(d){i(d.clone());return}GM.xmlHttpRequest({method:(L==null?void 0:L.method)??"GET",url:z,headers:Object.fromEntries(new Headers(L==null?void 0:L.headers)),responseType:"blob",onload(s){if(s.status!==404&&(s.status<200||s.status>299)){k(new Error(`Fetching "${z}" responded with an erroneous status code.`));return}const n=s.responseHeaders.split(`\r +`).slice(0,-1).map(u=>u.split(": ")),t=new Response(s.response,{headers:Object.fromEntries(n),status:s.status,statusText:s.statusText});Object.defineProperty(t,"url",{value:z}),Pe.set(z,t.clone()),i(t)},onerror(){k(new TypeError("Network request errored."))},ontimeout(){k(new TypeError("Network request timed out."))}})})}function Ue(z){for(var L=[],i=0;i=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===95){d+=z[s++];continue}break}if(!d)throw new TypeError("Missing parameter name at ".concat(i));L.push({type:"NAME",index:i,value:d}),i=s;continue}if(k==="("){var t=1,u="",s=i+1;if(z[s]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s)?(?!\?)/g,k=0,d=i.exec(z.source);d;)L.push({name:d[1]||k++,prefix:"",suffix:"",modifier:"",pattern:""}),d=i.exec(z.source);return z}function Ge(z,L,i){var k=z.map(function(d){return Ie(d,L,i).source});return new RegExp("(?:".concat(k.join("|"),")"),Te(i))}function qe(z,L,i){return Ve(Fe(z,i),L,i)}function Ve(z,L,i){i===void 0&&(i={});for(var k=i.strict,d=k===void 0?!1:k,s=i.start,n=s===void 0?!0:s,t=i.end,u=t===void 0?!0:t,v=i.encode,b=v===void 0?function(W){return W}:v,g=i.delimiter,m=g===void 0?"/#?":g,o=i.endsWith,h=o===void 0?"":o,p="[".concat(me(h),"]|$"),a="[".concat(me(m),"]"),A=n?"^":"",c=0,w=z;c-1:U===void 0;d||(A+="(?:".concat(a,"(?=").concat(p,"))?")),T||(A+="(?=".concat(a,"|").concat(p,")"))}return new RegExp(A,Te(i))}function Ie(z,L,i){return z instanceof RegExp?Ye(z,L):Array.isArray(z)?Ge(z,L,i):qe(z,L,i)}let de=unsafeWindow;de.wrappedJSObject&&(de=de.wrappedJSObject);const Xe=typeof cloneInto=="function"?cloneInto:z=>z,Ke=typeof exportFunction=="function"?exportFunction:z=>z;function Qe(z){return Xe(z,de,{cloneFunctions:!0,wrapReflectors:!0})}function Je(z){return Ke(z,de)}function $e(z,L){return L??(L=de),function(...i){return z.call(L,...Qe(i))}}const ze=[],er=$e(de.history.pushState,de.history);de.history.pushState=Je(rr);function rr(z,L,i){er(z,L,i),De()}addEventListener("popstate",()=>{De()});function De(){for(const z of ze){const L=z.matcher(location.pathname)?z.onCallbacks:z.offCallbacks;for(const i of L)i()}}function tr(z){let L=ze.find(i=>i.pattern===z);return L||(L={pattern:z,matcher:We(z),onCallbacks:[],offCallbacks:[]},ze.push(L),L)}function nr(z,L,i=!1){const k=tr(z),d=k.matcher(location.pathname);k.onCallbacks.push(L),d&&L()}function ir(z){return new Promise(L=>{setTimeout(L,z)})}function ar(z,L){const i=URL.createObjectURL(z),k=document.createElement("a");k.style.display="none",k.download=L,k.href=i,document.body.appendChild(k),k.click(),URL.revokeObjectURL(i)}function sr(z){const L=document.createElement("div");return L.innerHTML=z,L.firstElementChild}function Be(z){nr("/album/:id",z)}function Re(){var v,b,g;const z=(document.querySelector(".albumtitle[lang='ja']")??document.querySelector(".albumtitle[lang='en']")??document.querySelector(".albumtitle[lang='ja-Latn']")).innerText,[L,i]=z.includes(" / ")?z.split(" / ",2):[z,""],k={artist:i,album:L,mediums:[],urls:[],tracks:[]},d=Array.from(document.querySelectorAll("#album_infobit_large tr"));for(const m of d){const o=m.querySelector("td:first-child"),h=m.querySelector("td:last-child a")??m.querySelector("td:last-child");if(!o||!h)continue;const p=o.innerText.trim(),a=h.innerText.trim();switch(p){case"Label":k.label=a;break;case"Publish Format":k.publish=(v=a==null?void 0:a.toLowerCase())==null?void 0:v.replace(/[^a-z]/g,"");break;case"Classification":k.classification=(b=a==null?void 0:a.toLowerCase())==null?void 0:b.replace(/[^a-z]/g,"");break;case"Media Format":k.mediums=or(a);case"Release Price":a.includes("USD")?k.currency="usd":a.includes("JPY")?k.currency="jpy":a.includes("KRW")?k.currency="krw":(a.includes("RMB")||a.includes("CNY"))&&(k.currency="cny");case"Release Date":const A=(g=h.getAttribute("href"))==null?void 0:g.split("#")[1];A&&(k.date=[Number(A.slice(0,4)),Number(A.slice(4,6)),Number(A.slice(6,8))].filter(Boolean));break;case"Catalog Number":a!=="N/A"&&(k.catalog=a);break;case"Barcode":a!=="N/A"&&(k.barcode=a);break}}const s={};for(const m of Array.from(document.body.querySelectorAll("#tlnav a")))s[m.innerText.trim().toLowerCase()]=m.getAttribute("rel");let n=s.japanese??s.korean??s.english??s.chinese??s.romaji;k.currency==="jpy"?n=s.japanese??s.english??s.romaji:k.currency==="krw"?n=s.korean??s.english:k.currency==="cny"&&(n=s.chinese??s.english);const t=document.getElementById(n);if(t)for(const m of Array.from(t.querySelectorAll("tr.rolebit")))k.tracks.push({number:Number(m.children[0].textContent),title:m.children[1].textContent.trim(),duration:Ar(m.children[2].textContent.trim())});const u=Array.from(document.querySelectorAll(".smallfont a[href^='/redirect/']"));for(const m of u){const o="https://"+m.getAttribute("href").split("/").slice(3).join("/");k.urls.push(o)}return k}function Me(z){const L=z.match(/^(.+?)(\d+)~(\d+)$/);if(!L)return[z];const i=Number(L[2]),k=Number(L[2].slice(0,-L[3].length)+L[3]);return i===k?[z]:Array.from({length:k-i+1},(d,s)=>`${L[1]}${i+s}`)}function or(z){const L=[],i=z.toLowerCase().replace(/[^0-9a-z" ]/g,"").split(" + ");for(const k of i){const d=k.trim().match(/^(\d+)? *(.+)$/);if(!d){L.push("unknown");continue}const s=Number(d[1])||1;let n=d[2];n.includes("cd")?n="cd":n.includes("cassette")?n="cassette":n.includes("minidisc")?n="minidisc":n.includes("shmcd")?n="shm-cd":n.includes("cdr")?n="cd-r":n.includes("hqcd")?n="hqcd":n.includes("cd")?n="cd":n.includes("dvd")?n="dvd":n.includes("vhs")?n="vhs":n.includes("vinyl")?n.includes('7"')?n='7" vinyl':n.includes('10"')?n='10" vinyl':n.includes('12"')&&(n='12" vinyl'):n.includes("bluray")?n="bd":n.includes("digital")?n="digital media":n.includes("sacd")?n="sacd":n.includes("usb")?n="usb flash drive":n=null;for(let t=0;t\\:\*\|":]/g,"_").replace(/\.+$/,"_")}Be(()=>{var k;(k=document.querySelector("a[rel='cover_gallery']"))==null||k.click();const z=document.querySelector("#cover_gallery"),L=document.createElement("a");L.classList.add("ame-download_button"),L.innerText="Download all scans",z.insertAdjacentElement("afterbegin",L);let i=!1;L.addEventListener("click",async()=>{if(!i){i=!0;try{L.dataset.status="loading",await ur(),L.dataset.status="success"}catch(d){L.dataset.status="error",console.error(d)}i=!1}})});async function ur(){const z=new He,L=Re(),i=Se(`${L.catalog??L.barcode??"Scans"}`),k=Array.from(document.querySelectorAll('#cover_gallery a[href^="https://media.vgm.io"]'));for(const d of k){const s=await Oe(d.href).then(t=>t.blob()),n=Se(d.querySelector("h4").innerText.trim());z.file(`${i}/${n}.jpg`,s),await ir(100)}ar(await z.generateAsync({type:"blob"}),`${Se(i)}.zip`)}function Ee(z,L,i,k){let d=document.querySelector("#ame-section");for(d||(document.querySelectorAll("#rightcolumn > br")[0].insertAdjacentHTML("afterend",` +
+ +
+

Ame

+
+
+
+
+
+
+ +
+
+ `),d=document.querySelector("#ame-section"));;){const s=d.nextElementSibling;if(!s||Number(s.getAttribute("data-index"))>z)break;d=s}return d.insertAdjacentHTML("afterend",` + + ${i} + + `),d.nextElementSibling.querySelector("a")}const lr="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8B////Af///wH///8B////Af///wGPR7obj0e6MTt06kk6dOsD////Af///wH///8B////Af///wH///8B////Af///wH///8B////AY9Hug+PR7pzj0e65Y9Hunc7dOv5O3TqsTt06zM6c+sD////Af///wH///8B////Af///wH///8Bj0e6CY9HulGPR7rJj0e6+49Huv+PR7p3O3Tr/zt06/87dOrpO3Tqizp06h////8B////Af///wH///8Bj0e6M49HuqmPR7rzj0e6/49Huv+PR7r/j0e6dzt06/87dOv/O3Tr/zt06/07dOvVO3TrZzpz6g////8B////AY9HutuPR7r/j0e6/49Huv+PR7r/j0e6/49Hunc7dOv/O3Tr/zt06/87dOv/O3Tr/zt06/k7dOtZ////Af///wGPR7rvj0e6/49Huv+PR7r/j0e6/49Huv+PR7p3O3Tr/zt06/87dOv/O3Tr/zt06/87dOv/O3TrZ////wH///8Bj0e6749Huv+PR7r/j0e6/49Huv+PR7r/j0e6dzt06/87dOv/O3Tr/zt06/87dOv/O3Tr/zt062f///8B////AY9Huu+PR7r/j0e6/49Huv+PR7r/j0e6/49Hunc7dOv/O3Tr/zt06/87dOv/O3Tr/zt06/87dOtn////Af///wGPR7rvj0e6/49Huv+PR7r/j0e6/49Huv+PR7p3O3Tr/zt06/87dOv/O3Tr/zt06/87dOv/O3TrZ////wH///8Bj0e6749Huv+PR7r/j0e6/49Huv+PR7r/j0e6dzt06/87dOv/O3Tr/zt06/87dOv/O3Tr/zt062f///8B////AY9Huu+PR7r/j0e6/49Huv+PR7r/j0e6/49Hunc7dOv/O3Tr/zt06/87dOv/O3Tr/zt06/87dOtn////Af///wGPR7rbj0e6/49Huv+PR7r/j0e6/49Huv+PR7p3O3Tr/zt06/87dOv/O3Tr/zt06/87dOv5O3TrWf///wH///8Bj0e6M49HuqWPR7rzj0e6/49Huv+PR7r/j0e6dzt06/87dOv/O3Tr/zt06/07c+rTO3TrYzpz6g////8B////Af///wGPR7oJj0e5T49HusePR7r7j0e6/49Hunc7dOv/O3Tr/zt06uk7c+uHOnTqH////wH///8B////Af///wH///8B////Af///wGPR7oPj0e6b49HuuWPR7p3O3Tr+Tpz6q07dOsxOnPrA////wH///8B////Af///wH///8B////Af///wH///8B////Af///wGPR7obj0e6MTt06kk6dOsD////Af///wH///8B////Af///wH///8B//8AAP0/AADxDwAAwQcAAIEDAACBAwAAgQMAAIEDAACBAwAAgQMAAIEDAACBAwAAwQcAAPEPAAD9PwAA//8AAA==",cr="data:image/x-icon;base64,AAABAAEAQBsAAAEAIAAAHAAAFgAAACgAAABAAAAANgAAAAEAIAAAAAAAABsAABILAAASCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wf4/vINq8+BDI+2dxbP4cJHrsyOTYGuSExlmyZMPX4ATI61aIikxIevosKDrouzX66HsFeuh7BYroewWK6HsFeui7NfrqLCg66kxIevjrVoiD1+AExlmyZMga5ITK7Mjk3P4cJHj7Z3FqvPgQz4/vIN////B////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///wDw9vcA/v//CtHkviZ6qUgrqMaNZnWlO3R3pEmiha1XyWmbJ8dTiw7PZ5cr9GSWIvhckBH4V40J+FCIAfhUigb8VosJ/1aLCf9Viwb/VYsG/1aLBv9Wiwb/VYsG/1WLBv9Wiwn/VosJ/1SKBvxQiAH4V40J+FyQEfhkliL4Z5cr9FOLDs9pmyfHha1XyXekSaJ1pTt0qMaNZnqpSCvR5L4m+/z/CvL4+AD///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8B5O7XDqnHkCeGsFlTf6pRkG6eMrtunTXpWY8Q7FqOEvtYjQn/UokB/1GIAP9SiAD/UogA/0+GAP9OhgD/UIcA/1OJAv9Viwn/VosL/1iMEP9YjBD/WIwR/1eME/9XjBP/V4wT/1eME/9YjBH/WIwQ/1iMEP9Wiwv/VYsJ/1OJAv9QhwD/ToYA/0+GAP9SiAD/UogA/1GIAP9SiQH/WI0J/1qOEvtZjxDsbZwz6W2dObuDrFeQha9YU6nHkCfk7tcO////Af///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8Ax9nIAPf6+w6806Y8i7JhgXqlSMVdkRrkW48R/lOJA/9TiQD/UIcA/1GHAP9RiAH/U4kH/1+RGf9pmC//c6A7/4OqT/+XuHP/oL6E/6fDi/+3zpn/xdew/8rbuP/W48v/1uPK/9nl0P/c59b/3OfV/9zn1f/c59b/2eXQ/9bjyv/W48v/ytu4/8XXsP+3zpn/p8OL/6C+hP+XuHP/g6pP/3OgO/9pmC//X5EZ/1OJB/9RiAH/UYcA/0+GAP9TiQH/U4kD/1uPEf5dkRrkeqVIxYuyYYG806Y89/r7DsfZyAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAACav20A2+jKDpy9dVV/qVO7Zpcp81aMCv5SiAH/UYgA/1CHAf9XjA7/Z5co/36nT/+Vtm3/tMya/8vbvP/e6dL/8PXt//b59P/6/Pj//v7+/////////////////////////////////////////////////////////////////////////////////////////////////////////////v7+//r8+P/2+fT/8PXt/97p0v/L27z/tMya/5S2bf+Dqlf/Z5cp/1eMDv9QhwH/UYgA/1KIAf9WjAr+Zpcp83+oUrubvHZV2ujKDpq+bAAAAAAAAAAAAPz/8AAAAAAAxNmsRoGqUr1ckBX3U4kC/1CHAP9SiAT/YJIe/4SrVf+rxY//0N/A/+vx5f/5+/f//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////P37/+vx5v/Q38D/q8WP/4SrVf9gkh7/UokG/1CHAP9TiQL/XJAV94GqUr3D2KtGAAAAAPn/6QAABAAAeahDTGeYKuRUigb/UIcA/1uPFv+Cqlb/ts2d/+Ls2f/7/Pr////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7/Pr/4+zb/73SqP+CqVX/WI0S/1CHAP9Vigj/apox5I62ZEwAMQAAv9amUnGgQeNekR7/YpQj/5G0Z//Z5c3/+fv4////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+Pr3/9PhxP+Wt2z/Y5Uh/16RHf9xn0HjwNemUouzVKx2oj//gKlL/8XYrv/7/Pn///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////7+/f/7/fz/+/z8//3+/f//////////////////////+/z5/8bYrv9/qEv/eKNA/4uzVax2pjWtfqhD/8nasf/////////////////+/v7/uc+k/5u7dv+dvHn/nLt3/7DJlv/6/Pn/1eLE/5u7dv+dvHn/nbx5/569ev/l7tv/+fv4/6vFkP+cu3f/nbx5/5q6dv/K27v//////9zn0/+bu3n/nbx5/528ef+bunb/wdWs///////b5tH/m7t4/528ef+dvHn/m7p2/8LWrv//////v9Sn/5u6dv+dvHn/nbx5/5u7d//Y5cn/////////////////8fbt/7nPof+LsF7/eKJL/3ehSf+Fq1T/psKI/9Tiyf/4+vb/////////////////yNqw/3+pRv93pjWtnsBvqpC0Xv/m7tz//////////////////P38/4GoWP9NhQD/UYgA/06FAP9znz//9/r1/7nPnP9OhgH/UYgA/1GHAP9Vigz/1ePE//P38f9nlzH/T4YA/1GIAP9LhAD/n72C//////+/067/TYUD/1GIAP9RiAD/TIQA/5G0av//////vNGq/0yEAv9RiAD/UYgA/0yEAP+Utm7//////5O2Z/9MhAD/UYgA/1GIAP9PhgL/v9Ok////////////3+nS/3ylSf9RiAT/UYgA/1GHAP9PhgL/T4YF/0yEAv9VihD/mrp0//z9/P///////////+jv3/+QtF7/nsBvqs3etFmjwXrzwtap//v8+v////////////z9/P+Eq1j/UogA/1aLAf9TiQD/d6JB//j69f+70Z7/U4kC/1aLAf9WiwD/WY4N/9bjxf/z9/H/a5oy/1SKAP9WiwH/UYcA/6G/g///////wdSu/1KIBP9XiwH/VosB/1GIAP+Utmz//////77Tq/9SiAP/V4sB/1aLAf9RiAD/l7hv//////+WuGn/UYgA/1aLAf9WiwH/VIoE/8DVpv//////7fPp/3WhP/9RhwD/VosB/1SKAP9gkh7/r8iS/9Hfxf+zy5j/aZgs/1+SJf/p8OH///////z9+//D16r/osB488zes1n///8Izt64fLHLj/HH2a//9Pfv///////8/fz/hKtY/1KIAP9WiwH/U4kA/3eiQP/4+vX/u9Ge/1OJAv9WiwH/VosA/1mNDf/W48X/8/fx/2uZMv9UigD/VosB/1CHAP+hv4P//////8HUrv9SiAT/VosB/1aLAf9RiAD/lLZr//////++06v/UYgD/1aLAf9WiwH/UYgA/5e4b///////lrdp/1GIAP9WiwH/VosB/1SKBP/A1Kb//////7HKmf9QhwP/VosB/1aLAf9TiQX/sMmX/////////////////+Dq1f/H2bX/+vz4//P37v/J2rL/ssuP8c7euHz///8I+vz3AP///wbZ6MZJvdOfysHVpvzZ5cj/8/fv/4SrWf9SiAD/VosB/1OJAP93okD/+Pr1/7vRnv9TiQL/VosB/1aLAP9ZjQ3/1uPF//P38f9rmTL/VIoA/1aLAf9QhwD/ob+D///////B1K7/UogE/1aLAf9WiwH/UYgA/5S2a///////vtOr/1GIA/9WiwH/VosB/1GIAP+XuG///////5a3af9RiAD/VosB/1aLAf9UigT/wNWm//////+CqVj/UYgA/1aLAf9VigD/XI8Z/97o1f//////////////////////9fjx/9nmyv+906D8vdOfytnoxkn///8G+vz4AAAAAAD///8A////AO/25xbW5cNoxdmsyt7p0POFrFr/UogA/1aLAf9TiQD/d6JB//j69f+70Z7/U4kC/1aLAf9WiwD/WY0N/9bjxf/z9/H/a5ky/1SKAP9WiwH/UIcA/6G/g///////wdSu/1KIBP9WiwH/VosB/1GIAP+Utmv//////77Tq/9RiAP/VosB/1aLAf9RiAD/l7hv//////+Wt2n/UYgA/1aLAf9WiwH/VIoE/8HVpv/9/v7/fKVO/1KIAP9WiwH/VYoA/16RIf/p8OX//v7+//T48P/n797/1uTF/8rcsvHJ27HK2efHaO304xb///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAA6ffcAPX87w/0+PB/hata/1KIAP9WiwH/U4kA/3iiQv/w9ev/uM+a/1OJAv9WiwH/VosA/1mODf/X5MX/8/fy/2uZMv9UigD/VosB/1CHAP+hv4P//////8HUrv9SiAT/VosB/1aLAf9RiAD/lLZr//////++06v/UYgD/1aLAf9WiwH/UYgA/5e4cP//////lrhp/1GIAP9WiwH/VosB/1SKBP/B1ab//////4GpVf9SiAD/VosB/1WKAP9ekSH/2OXP/9/q0fvX5MX62+fM/uny3sPz+Oxt8/nsE+764wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD09/AA+Pv4aoWrWv9SiAD/VosB/1OJAP92oj//6PDg/67Ikv9SiAH/VosB/1aLAf9Wiwv/z9/A//D17P9qmS7/VIoA/1aLAf9QhwD/ob6D///////B1K7/UogE/1aLAf9WiwH/UYgA/5S2a///////vtOr/1GIA/9WiwH/VosB/1GIAP+Vt2z//////46yZP9RiAD/VosB/1aLAf9UigT/u9Gf//f69f+hv33/UIcA/1aLAf9ViwD/XZAZ/9LhxOru9eZs+/33esrbwP6fvYP41OLHzf///xz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9PfwAPj7+GqFq1r/UogA/1aLAf9VigD/YJIa/7/TqP+DqlP/UogA/1aLAf9WiwH/UogB/5W2bv+tx5H/V4wL/1aLAP9WiwH/T4YA/6fCi//7/Pn/v9Os/1KIBP9WiwH/VosB/1GIAP+TtWv/+/z5/73Sqv9RiAP/VosB/1aLAf9UiQD/cp44/8XYsP9rmi//VIkA/1aLAf9ViwD/WIwS/8nbtuv1+e+33OfQ4WeXLP9SiAD/VosB/1OJA/+oxIn1/v7/gOrx4555o0j/SIEA/5++gPf///8//P37AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPP38AD4+vhqg6pa/06FAP9SiAD/UogA/1CHAP9SiQb/U4kD/1aLAP9UigD/U4kF/12QGf9OhgT/U4kE/1WKAP9VigD/UIcA/2mYLf/a5s7T////lLvRqfFPhgT/U4kA/1KJAP9OhQD/j7Nn+vz++rG4zqTxToYD/1OJAP9SiAD/UogA/1CHAf9TiQf/VIkB/1aLAP9UiQD/UIcB/42xYvzy9vCF////Av///0C80aTcZpYr/1CHAP9SiAD/Wo4U/42xY/19pkr+UokG/06FAP9/p1H/9/r2gfD17AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD1+PIA+fv4aqTAi/99pk//gKhS/3+nUf+Ps2n/kbNp/2OUJf9ajhn/Z5co/5S2dPjV4srqlrdw+WqZLf9ajhn/Y5Qh/3+nUP/F2LHR////Mv///x3J2r3jfaZT/4CoUv+AqFP/fKVO/6zGk/X///9eyNm74n6mVP+AqFL/gKhS/3+nUf+YuHT/hKtW/16RHv9cjxr/bpwz/528ffvg6tSO////DP///wDx9ewA////P9bjzNKYuHP3dqFA/16QHP9Wixb/W44Z/3CdNP+Kr2L+xNex3/z9+2D3+fQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7+AP7//i/3+vZz9fj0cvX49HL1+PRy+Pr3cvf69XXd6NSz1+PQyd3o0p/3+vZX////J/v8+l3h69im1uPPyN7o1MHv9OmB////Lv///wD///8M/f79evf59e7d6NH/2ubM//L27/j9/v2T////KPr8+WX1+PNz9fj0cvX49HL1+PNy+vz6cvH17H7a5tG/2OTQyefu3qr9/v5g////Df///wAAAAAA////AP///wD///8a/v//Uenw4X/Z5dC+1uPPx9nl0MDg6tSA+/z7av///yb///8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8A////B////wr///8F////AAAAAAD///8A////Bv///wr///8J////Av///wD///8A////CvD17J2dvHz9X5Ea/1yQFP+Fq13/3+nZrP///wr///8AAAAAAAAAAAAAAAAAAAAAAP///wD///8B////Cf///wr///8G////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///8B////Cf///wr///8J////Av///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///zO/06rsU4kK/1WKAP9VigD/T4YA/5W2cPL///43+Pr0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///wD///9nob98/1CHAP9WiwH/VosB/1KJAP97pUP37fPlPfD16gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////N7zSpu1SiAn/VYoA/1aLAP9PhgD/krRs8/3++zn3+vQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AP///w3x9u6omrp4/WOUIv9dkBX/g6pc/9/p2rX///8N////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////F/X48nnR4MCvwtWpr+vy6Ir///8k////AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//4AAAAH////QAAAAAAv//gAAAAAAAH/4AAAAAAAAH+AAAAAAAAAHwAAAAAAAAAOAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAP4AAAAAAAAH/wAAAAAAAAf/AAAAAAAAB/8AAAAAAAAH/wAAAAAAwAf/AAAgAAHAB//8OGAfh/g/////4B/////////gH////////+Af////////4B/////////wP////8=",fr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KCTwhLS0hIEZvbnQgQXdlc29tZSBQcm8gNi4yLjAgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjIgRm9udGljb25zLCBJbmMuIC0tPgoJPHBhdGggZmlsbD0iI2RlZGVkZSIgZD0iTTUxMiAyNTUuMWMwIDEuOC0uOSAyLjctLjkgMy42LjUgMzYuNS0zMi43IDYwLjQtNjkuMiA2MC40SDM0NGMtMjYuNSAwLTQ4IDIyLjQtNDggNDguOSAwIDMuNC40IDYuNyAxIDkuOSAyLjIgMTAuMiA2LjUgMTkuMiAxMC45IDI5LjkgNiAxMy44IDEyLjEgMjcuNSAxMi4xIDQyIDAgMzEuOS0yMS42IDYwLjctNTMuNCA2Mi0zLjUuMS03LjEuMi0xMC42LjJDMTE0LjYgNTEyIDAgMzk3LjQgMCAyNTZTMTE0LjYgMCAyNTYgMHMyNTYgMTE0LjYgMjU2IDI1NnYtLjl6bS00MTYgMGMtMTcuNjcgMC0zMiAxNS4yLTMyIDMyIDAgMTguNiAxNC4zMyAzMiAzMiAzMiAxNy43IDAgMzItMTMuNCAzMi0zMiAwLTE2LjgtMTQuMy0zMi0zMi0zMnptMzItNjRjMTcuNyAwIDMyLTEzLjQgMzItMzIgMC0xNi44LTE0LjMtMzItMzItMzJzLTMyIDE1LjItMzIgMzJjMCAxOC42IDE0LjMgMzIgMzIgMzJ6bTEyOC0xMjhjLTE3LjcgMC0zMiAxNS4yMy0zMiAzMiAwIDE4LjYgMTQuMyAzMiAzMiAzMnMzMi0xMy40IDMyLTMyYzAtMTYuNzctMTQuMy0zMi0zMi0zMnptMTI4IDEyOGMxNy43IDAgMzItMTMuNCAzMi0zMiAwLTE2LjgtMTQuMy0zMi0zMi0zMnMtMzIgMTUuMi0zMiAzMmMwIDE4LjYgMTQuMyAzMiAzMiAzMnoiIC8+Cjwvc3ZnPgo=";function hr(z){const L=sr(` +
+ +
+ `);function i(n,t){const u=document.createElement("input");u.type="hidden",u.name=n,u.value=t,L.appendChild(u)}const k=`${location.origin}${location.pathname}`;if(i("name",z.album),z.artist&&i("artist_credit.names.0.name",z.artist),z.album.match(/[ㄱ-ㅎ가-힣]/)?(i("language","kor"),i("script","Kore")):z.album.match(/[一-龯]/)?(i("language","jpn"),i("script","Jpan")):(i("language","eng"),i("script","Latn")),z.publish==="bootleg"?i("status","bootleg"):i("status","official"),z.tracks.length<=6?i("type","single"):i("type","album"),z.classification&&(z.classification.includes("soundtrack")?i("type","soundtrack"):z.classification.includes("drama")?i("type","audio drama"):z.classification.includes("remix")?i("type","remix"):z.classification.includes("talk")&&i("type","spokenword")),z.date)switch(z.date.length){case 3:i("events.0.date.day",z.date[2].toString());case 2:i("events.0.date.month",z.date[1].toString());case 1:i("events.0.date.year",z.date[0].toString())}switch(z.currency){case"jpy":i("events.0.country","JP");break;case"krw":i("events.0.country","KR");break;case"cny":i("events.0.country","CN");break}z.barcode&&i("barcode",z.barcode),z.catalog&&Me(z.catalog).forEach((t,u)=>{console.log(t),i(`labels.${u}.catalog_number`,t),z.label&&u!==0&&i(`labels.${u}.name`,z.label)}),z.label&&i("labels.0.name",z.label),z.mediums.forEach((n,t)=>{n&&i(`mediums.${t}.format`,n)});let d=0,s=0;for(const n of z.tracks)n.number<=s&&d++,s=n.number,i(`mediums.${d}.track.${s-1}.name`,n.title),i(`mediums.${d}.track.${s-1}.number`,n.number.toString()),i(`mediums.${d}.track.${s-1}.length`,n.duration.toString());return i("urls.0.url",k),i("urls.0.link_type","86"),z.urls.forEach((n,t)=>{let u=null;n.includes("mora.jp/")||n.includes("ototoy.jp/")?u="74":n.includes("y.qq.com")||n.includes("open.qobuz.com")||n.includes("tidal.com")||n.includes("music.amazon.")||n.includes("music.apple.com")?u="980":(n.includes("deezer.com")||n.includes(".spotify."))&&(u="85"),u&&(i(`urls.${t+1}.url`,n),i(`urls.${t+1}.link_type`,u))}),i("edit_note",`Seeded with Ame from VGMdb at ${k}`),document.body.appendChild(L),L}Be(async()=>{const z=Re();!z.catalog&&!z.barcode||await Promise.all([dr(z),pr(z),mr(z)])});async function dr(z){let L=[];if(z.catalog)for(const k of Me(z.catalog))L.push(`catno:${k}`);z.barcode&&L.push(`barcode:${z.barcode}`),await(await Oe(`http://musicbrainz.org/ws/2/release/?fmt=json&query=${encodeURIComponent(L.join(" "))}`)).json();{let k=function(s){s.preventDefault(),hr(z).submit()};const d=Ee(100,lr,"MusicBrainz (Seed)","#");d.addEventListener("click",k),d.addEventListener("auxclick",k)}}async function pr(z){const L=z.catalog||z.barcode;L&&Ee(200,cr,"音楽の森 (Search)",`https://search.minc.or.jp/product/list/?type=search-form-diskno&dn=${L}`)}async function mr(z){Ee(300,fr,"MH Covers (Search)",`https://covers.musichoarders.xyz?artist=${encodeURIComponent(z.artist)}&album=${encodeURIComponent(z.album)}`)}const gr=`.ame-download_button{display:block;margin-bottom:10px;cursor:pointer}.ame-download_button[data-status=loading]{color:#006ad4;font-weight:700}.ame-download_button[data-status=success]{color:#00d46a;font-weight:700}.ame-download_button[data-status=error]{color:#d40000;font-weight:700} +`;GM.addStyle(gr)});