diff options
Diffstat (limited to 'dot-config/spicetify/Extracted/Raw/xpui/402.js')
| -rwxr-xr-x | dot-config/spicetify/Extracted/Raw/xpui/402.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dot-config/spicetify/Extracted/Raw/xpui/402.js b/dot-config/spicetify/Extracted/Raw/xpui/402.js new file mode 100755 index 00000000..cbec25bc --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/402.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[402],{8402:(t,r,n)=>{n.d(r,{extractColors:()=>l});var e=n(4660);const o="https://local-image.spotify.com";let i=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});var s=n(6050),a=n.n(s);var u=n(4666);const c=new function(){return a()('(()=>{"use strict";var t={1924:(t,r,n)=>{var e=n(9599),o=n(8069),i=TypeError;t.exports=function(t){if(e(t))return t;throw new i(o(t)+" is not a function")}},4282:(t,r,n)=>{var e=n(1948).has;t.exports=function(t){return e(t),t}},6857:(t,r,n)=>{var e=n(1492),o=String,i=TypeError;t.exports=function(t){if(e(t))return t;throw new i(o(t)+" is not an object")}},3103:(t,r,n)=>{var e=n(8491),o=n(3660),i=n(5956),s=function(t){return function(r,n,s){var a=e(r),u=i(a);if(0===u)return!t&&-1;var c,h=o(s,u);if(t&&n!=n){for(;u>h;)if((c=a[h++])!=c)return!0}else for(;u>h;h++)if((t||h in a)&&a[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5010:(t,r,n)=>{var e=n(6054),o=e({}.toString),i=e("".slice);t.exports=function(t){return i(o(t),8,-1)}},5818:(t,r,n)=>{var e=n(1663),o=n(581),i=n(6709),s=n(3335);t.exports=function(t,r,n){for(var a=o(r),u=s.f,c=i.f,h=0;h<a.length;h++){var f=a[h];e(t,f)||n&&e(n,f)||u(t,f,c(r,f))}}},5785:(t,r,n)=>{var e=n(3210),o=n(3335),i=n(8878);t.exports=e?function(t,r,n){return o.f(t,r,i(1,n))}:function(t,r,n){return t[r]=n,t}},8878:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5294:(t,r,n)=>{var e=n(9599),o=n(3335),i=n(1605),s=n(2723);t.exports=function(t,r,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:r;if(e(n)&&i(n,c,a),a.global)u?t[r]=n:s(r,n);else{try{a.unsafe?t[r]&&(u=!0):delete t[r]}catch(t){}u?t[r]=n:o.f(t,r,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},2723:(t,r,n)=>{var e=n(7801),o=Object.defineProperty;t.exports=function(t,r){try{o(e,t,{value:r,configurable:!0,writable:!0})}catch(n){e[t]=r}return r}},3210:(t,r,n)=>{var e=n(2005);t.exports=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7069:(t,r,n)=>{var e=n(7801),o=n(1492),i=e.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},2946:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3718:(t,r,n)=>{var e,o,i=n(7801),s=n(2946),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,h=c&&c.v8;h&&(o=(e=h.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&s&&(!(e=s.match(/Edge\\/(\\d+)/))||e[1]>=74)&&(e=s.match(/Chrome\\/(\\d+)/))&&(o=+e[1]),t.exports=o},6553:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7888:(t,r,n)=>{var e=n(7801),o=n(6709).f,i=n(5785),s=n(5294),a=n(2723),u=n(5818),c=n(6734);t.exports=function(t,r){var n,h,f,l,p,g=t.target,v=t.global,b=t.stat;if(n=v?e:b?e[g]||a(g,{}):e[g]&&e[g].prototype)for(h in r){if(l=r[h],f=t.dontCallGetSet?(p=o(n,h))&&p.value:n[h],!c(v?h:g+(b?".":"#")+h,t.forced)&&void 0!==f){if(typeof l==typeof f)continue;u(l,f)}(t.sham||f&&f.sham)&&i(l,"sham",!0),s(n,h,l,t)}}},2005:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},1206:(t,r,n)=>{var e=n(2005);t.exports=!e((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3155:(t,r,n)=>{var e=n(1206),o=Function.prototype.call;t.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},876:(t,r,n)=>{var e=n(3210),o=n(1663),i=Function.prototype,s=e&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!e||e&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5684:(t,r,n)=>{var e=n(6054),o=n(1924);t.exports=function(t,r,n){try{return e(o(Object.getOwnPropertyDescriptor(t,r)[n]))}catch(t){}}},6054:(t,r,n)=>{var e=n(1206),o=Function.prototype,i=o.call,s=e&&o.bind.bind(i,i);t.exports=e?s:function(t){return function(){return i.apply(t,arguments)}}},4589:(t,r,n)=>{var e=n(7801),o=n(9599);t.exports=function(t,r){return arguments.length<2?(n=e[t],o(n)?n:void 0):e[t]&&e[t][r];var n}},7317:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},8080:(t,r,n)=>{var e=n(1924),o=n(5619);t.exports=function(t,r){var n=t[r];return o(n)?void 0:e(n)}},6351:(t,r,n)=>{var e=n(1924),o=n(6857),i=n(3155),s=n(4313),a=n(7317),u="Invalid size",c=RangeError,h=TypeError,f=Math.max,l=function(t,r){this.set=t,this.size=f(r,0),this.has=e(t.has),this.keys=e(t.keys)};l.prototype={getIterator:function(){return a(o(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw new h(u);var n=s(r);if(n<0)throw new c(u);return new l(t,n)}},7801:function(t,r,n){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n.g&&n.g)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},1663:(t,r,n)=>{var e=n(6054),o=n(8247),i=e({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},4047:t=>{t.exports={}},8307:(t,r,n)=>{var e=n(3210),o=n(2005),i=n(7069);t.exports=!e&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9157:(t,r,n)=>{var e=n(6054),o=n(2005),i=n(5010),s=Object,a=e("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?a(t,""):s(t)}:s},3728:(t,r,n)=>{var e=n(6054),o=n(9599),i=n(4011),s=e(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},5519:(t,r,n)=>{var e,o,i,s=n(9408),a=n(7801),u=n(1492),c=n(5785),h=n(1663),f=n(4011),l=n(1717),p=n(4047),g="Object already initialized",v=a.TypeError,b=a.WeakMap;if(s||f.state){var m=f.state||(f.state=new b);m.get=m.get,m.has=m.has,m.set=m.set,e=function(t,r){if(m.has(t))throw new v(g);return r.facade=t,m.set(t,r),r},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var d=l("state");p[d]=!0,e=function(t,r){if(h(t,d))throw new v(g);return r.facade=t,c(t,d,r),r},o=function(t){return h(t,d)?t[d]:{}},i=function(t){return h(t,d)}}t.exports={set:e,get:o,has:i,enforce:function(t){return i(t)?o(t):e(t,{})},getterFor:function(t){return function(r){var n;if(!u(r)||(n=o(r)).type!==t)throw new v("Incompatible receiver, "+t+" required");return n}}}},9599:t=>{var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},6734:(t,r,n)=>{var e=n(2005),o=n(9599),i=/#|\\.prototype\\./,s=function(t,r){var n=u[a(t)];return n===h||n!==c&&(o(r)?e(r):!!r)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s},5619:t=>{t.exports=function(t){return null==t}},1492:(t,r,n)=>{var e=n(9599);t.exports=function(t){return"object"==typeof t?null!==t:e(t)}},8057:t=>{t.exports=!1},6843:(t,r,n)=>{var e=n(4589),o=n(9599),i=n(5163),s=n(5690),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var r=e("Symbol");return o(r)&&i(r.prototype,a(t))}},453:(t,r,n)=>{var e=n(3155);t.exports=function(t,r,n){for(var o,i,s=n?t:t.iterator,a=t.next;!(o=e(a,s)).done;)if(void 0!==(i=r(o.value)))return i}},4021:(t,r,n)=>{var e=n(3155),o=n(6857),i=n(8080);t.exports=function(t,r,n){var s,a;o(t);try{if(!(s=i(t,"return"))){if("throw"===r)throw n;return n}s=e(s,t)}catch(t){a=!0,s=t}if("throw"===r)throw n;if(a)throw s;return o(s),n}},5956:(t,r,n)=>{var e=n(96);t.exports=function(t){return e(t.length)}},1605:(t,r,n)=>{var e=n(6054),o=n(2005),i=n(9599),s=n(1663),a=n(3210),u=n(876).CONFIGURABLE,c=n(3728),h=n(5519),f=h.enforce,l=h.get,p=String,g=Object.defineProperty,v=e("".slice),b=e("".replace),m=e([].join),d=a&&!o((function(){return 8!==g((function(){}),"length",{value:8}).length})),w=String(String).split("String"),x=t.exports=function(t,r,n){"Symbol("===v(p(r),0,7)&&(r="["+b(p(r),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),n&&n.getter&&(r="get "+r),n&&n.setter&&(r="set "+r),(!s(t,"name")||u&&t.name!==r)&&(a?g(t,"name",{value:r,configurable:!0}):t.name=r),d&&n&&s(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var e=f(t);return s(e,"source")||(e.source=m(w,"string"==typeof r?r:"")),t};Function.prototype.toString=x((function(){return i(this)&&l(this).source||c(this)}),"toString")},1019:t=>{var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?n:r)(e)}},3335:(t,r,n)=>{var e=n(3210),o=n(8307),i=n(2980),s=n(6857),a=n(2227),u=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",p="writable";r.f=e?i?function(t,r,n){if(s(t),r=a(r),s(n),"function"==typeof t&&"prototype"===r&&"value"in n&&p in n&&!n[p]){var e=h(t,r);e&&e[p]&&(t[r]=n.value,n={configurable:l in n?n[l]:e[l],enumerable:f in n?n[f]:e[f],writable:!1})}return c(t,r,n)}:c:function(t,r,n){if(s(t),r=a(r),s(n),o)try{return c(t,r,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[r]=n.value),t}},6709:(t,r,n)=>{var e=n(3210),o=n(3155),i=n(1719),s=n(8878),a=n(8491),u=n(2227),c=n(1663),h=n(8307),f=Object.getOwnPropertyDescriptor;r.f=e?f:function(t,r){if(t=a(t),r=u(r),h)try{return f(t,r)}catch(t){}if(c(t,r))return s(!o(i.f,t,r),t[r])}},3130:(t,r,n)=>{var e=n(7938),o=n(6553).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return e(t,o)}},8591:(t,r)=>{r.f=Object.getOwnPropertySymbols},5163:(t,r,n)=>{var e=n(6054);t.exports=e({}.isPrototypeOf)},7938:(t,r,n)=>{var e=n(6054),o=n(1663),i=n(8491),s=n(3103).indexOf,a=n(4047),u=e([].push);t.exports=function(t,r){var n,e=i(t),c=0,h=[];for(n in e)!o(a,n)&&o(e,n)&&u(h,n);for(;r.length>c;)o(e,n=r[c++])&&(~s(h,n)||u(h,n));return h}},1719:(t,r)=>{var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!n.call({1:2},1);r.f=o?function(t){var r=e(this,t);return!!r&&r.enumerable}:n},2704:(t,r,n)=>{var e=n(3155),o=n(9599),i=n(1492),s=TypeError;t.exports=function(t,r){var n,a;if("string"===r&&o(n=t.toString)&&!i(a=e(n,t)))return a;if(o(n=t.valueOf)&&!i(a=e(n,t)))return a;if("string"!==r&&o(n=t.toString)&&!i(a=e(n,t)))return a;throw new s("Can\'t convert object to primitive value")}},581:(t,r,n)=>{var e=n(4589),o=n(6054),i=n(3130),s=n(8591),a=n(6857),u=o([].concat);t.exports=e("Reflect","ownKeys")||function(t){var r=i.f(a(t)),n=s.f;return n?u(r,n(t)):r}},3684:(t,r,n)=>{var e=n(5619),o=TypeError;t.exports=function(t){if(e(t))throw new o("Can\'t call method on "+t);return t}},492:(t,r,n)=>{var e=n(1948),o=n(3547),i=e.Set,s=e.add;t.exports=function(t){var r=new i;return o(t,(function(t){s(r,t)})),r}},2138:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(492),s=n(1336),a=n(6351),u=n(3547),c=n(453),h=o.has,f=o.remove;t.exports=function(t){var r=e(this),n=a(t),o=i(r);return s(r)<=n.size?u(r,(function(t){n.includes(t)&&f(o,t)})):c(n.getIterator(),(function(t){h(r,t)&&f(o,t)})),o}},1948:(t,r,n)=>{var e=n(6054),o=Set.prototype;t.exports={Set,add:e(o.add),has:e(o.has),remove:e(o.delete),proto:o}},8900:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(1336),s=n(6351),a=n(3547),u=n(453),c=o.Set,h=o.add,f=o.has;t.exports=function(t){var r=e(this),n=s(t),o=new c;return i(r)>n.size?u(n.getIterator(),(function(t){f(r,t)&&h(o,t)})):a(r,(function(t){n.includes(t)&&h(o,t)})),o}},5967:(t,r,n)=>{var e=n(4282),o=n(1948).has,i=n(1336),s=n(6351),a=n(3547),u=n(453),c=n(4021);t.exports=function(t){var r=e(this),n=s(t);if(i(r)<=n.size)return!1!==a(r,(function(t){if(n.includes(t))return!1}),!0);var h=n.getIterator();return!1!==u(h,(function(t){if(o(r,t))return c(h,"normal",!1)}))}},7380:(t,r,n)=>{var e=n(4282),o=n(1336),i=n(3547),s=n(6351);t.exports=function(t){var r=e(this),n=s(t);return!(o(r)>n.size)&&!1!==i(r,(function(t){if(!n.includes(t))return!1}),!0)}},6773:(t,r,n)=>{var e=n(4282),o=n(1948).has,i=n(1336),s=n(6351),a=n(453),u=n(4021);t.exports=function(t){var r=e(this),n=s(t);if(i(r)<n.size)return!1;var c=n.getIterator();return!1!==a(c,(function(t){if(!o(r,t))return u(c,"normal",!1)}))}},3547:(t,r,n)=>{var e=n(6054),o=n(453),i=n(1948),s=i.Set,a=i.proto,u=e(a.forEach),c=e(a.keys),h=c(new s).next;t.exports=function(t,r,n){return n?o({iterator:c(t),next:h},r):u(t,r)}},8950:(t,r,n)=>{var e=n(4589),o=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=e("Set");try{(new r)[t](o(0));try{return(new r)[t](o(-1)),!1}catch(t){return!0}}catch(t){return!1}}},1336:(t,r,n)=>{var e=n(5684),o=n(1948);t.exports=e(o.proto,"size","get")||function(t){return t.size}},6488:(t,r,n)=>{var e=n(4282),o=n(1948),i=n(492),s=n(6351),a=n(453),u=o.add,c=o.has,h=o.remove;t.exports=function(t){var r=e(this),n=s(t).getIterator(),o=i(r);return a(n,(function(t){c(r,t)?h(o,t):u(o,t)})),o}},194:(t,r,n)=>{var e=n(4282),o=n(1948).add,i=n(492),s=n(6351),a=n(453);t.exports=function(t){var r=e(this),n=s(t).getIterator(),u=i(r);return a(n,(function(t){o(u,t)})),u}},1717:(t,r,n)=>{var e=n(3275),o=n(5974),i=e("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4011:(t,r,n)=>{var e=n(8057),o=n(7801),i=n(2723),s="__core-js_shared__",a=t.exports=o[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},3275:(t,r,n)=>{var e=n(4011);t.exports=function(t,r){return e[t]||(e[t]=r||{})}},8433:(t,r,n)=>{var e=n(3718),o=n(2005),i=n(7801).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},3660:(t,r,n)=>{var e=n(4313),o=Math.max,i=Math.min;t.exports=function(t,r){var n=e(t);return n<0?o(n+r,0):i(n,r)}},8491:(t,r,n)=>{var e=n(9157),o=n(3684);t.exports=function(t){return e(o(t))}},4313:(t,r,n)=>{var e=n(1019);t.exports=function(t){var r=+t;return r!=r||0===r?0:e(r)}},96:(t,r,n)=>{var e=n(4313),o=Math.min;t.exports=function(t){var r=e(t);return r>0?o(r,9007199254740991):0}},8247:(t,r,n)=>{var e=n(3684),o=Object;t.exports=function(t){return o(e(t))}},2095:(t,r,n)=>{var e=n(3155),o=n(1492),i=n(6843),s=n(8080),a=n(2704),u=n(2069),c=TypeError,h=u("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var n,u=s(t,h);if(u){if(void 0===r&&(r="default"),n=e(u,t,r),!o(n)||i(n))return n;throw new c("Can\'t convert object to primitive value")}return void 0===r&&(r="number"),a(t,r)}},2227:(t,r,n)=>{var e=n(2095),o=n(6843);t.exports=function(t){var r=e(t,"string");return o(r)?r:r+""}},8069:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},5974:(t,r,n)=>{var e=n(6054),o=0,i=Math.random(),s=e(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},5690:(t,r,n)=>{var e=n(8433);t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},2980:(t,r,n)=>{var e=n(3210),o=n(2005);t.exports=e&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},9408:(t,r,n)=>{var e=n(7801),o=n(9599),i=e.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},2069:(t,r,n)=>{var e=n(7801),o=n(3275),i=n(1663),s=n(5974),a=n(8433),u=n(5690),c=e.Symbol,h=o("wks"),f=u?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return i(h,t)||(h[t]=a&&i(c,t)?c[t]:f("Symbol."+t)),h[t]}},6805:(t,r,n)=>{var e=n(7888),o=n(2138);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("difference")},{difference:o})},4563:(t,r,n)=>{var e=n(7888),o=n(2005),i=n(8900);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("intersection")||o((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},9606:(t,r,n)=>{var e=n(7888),o=n(5967);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isDisjointFrom")},{isDisjointFrom:o})},8211:(t,r,n)=>{var e=n(7888),o=n(7380);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isSubsetOf")},{isSubsetOf:o})},4164:(t,r,n)=>{var e=n(7888),o=n(6773);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("isSupersetOf")},{isSupersetOf:o})},9499:(t,r,n)=>{var e=n(7888),o=n(6488);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("symmetricDifference")},{symmetricDifference:o})},9271:(t,r,n)=>{var e=n(7888),o=n(194);e({target:"Set",proto:!0,real:!0,forced:!n(8950)("union")},{union:o})}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(()=>{let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function r(t,r,n=1e-6){return Math.abs(t-r)<n}function e(t){return t.toString(16).padStart(2,"0")}function o(t){return`${parseFloat((100*t).toFixed(1))}%`}function i(t){t=t.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,(function(t,r,n,e){return r+r+n+n+e+e}));const r=/^#?(?<r>[a-f\\d]{2})(?<g>[a-f\\d]{2})(?<b>[a-f\\d]{2})(?<a>[a-f\\d]{2})?$/i.exec(t),n=r?.groups?.r,e=r?.groups?.g,o=r?.groups?.b,i=r?.groups?.a;if(void 0===n||void 0===e||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r:n,g:e,b:o,a:i}}function s(t){const{a:r}=i(t);if(!r)return 1;return function(t,r,n){const e=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:r,maximumFractionDigits:n});return Number(e)}(parseInt(r,16)/255,0,2)}function a(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function u({rgb:{r:t,g:r,b:n}}){return.2126*a(t/255)+.7152*a(r/255)+.0722*a(n/255)}function c(t,r){const n=u(t),e=u(r);return(Math.max(n,e)+.05)/(Math.min(n,e)+.05)}class h{constructor(t,r,n,e=1){this.rgb=t,this.hsl=r,this.hsv=n,this.a=e}static BLACK=h.fromRGB({r:0,g:0,b:0});static WHITE=h.fromRGB({r:255,g:255,b:255});static fromRGB(t,n){if(t.r<0||t.g<0||t.b<0||t.r>255||t.g>255||t.b>255||n&&n<0||n&&n>1)throw Error(`Invalid RGB color: ${JSON.stringify(t)}, alpha: ${n}`);const e=function({r:t,g:n,b:e}){const o=t/255,i=n/255,s=e/255,a=Math.max(o,i,s),u=Math.min(o,i,s),c=a-u;let h;const f=(a+u)/2,l=a;h=r(c,0)?0:r(l,o)?60*(0+(i-s)/c):r(l,i)?60*(2+(s-o)/c):60*(4+(o-i)/c),h%=360,h<0&&(h+=360);const p=0===f||1===f?0:(l-f)/Math.min(f,1-f);return{h:Math.round(h),s:p,l:f}}(t),o=function({r:t,g:n,b:e}){const o=t/255,i=n/255,s=e/255,a=Math.max(o,i,s),u=a-Math.min(o,i,s);let c;const h=a;c=r(u,0)?0:r(h,o)?60*(0+(i-s)/u):r(h,i)?60*(2+(s-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const f=0===h?0:u/h;return{h:Math.round(c),s:f,v:h}}(t);return new h(t,e,o,n)}static fromHex(t,r){const n=function(t){const{r,g:n,b:e}=i(t);return{r:parseInt(r,16),g:parseInt(n,16),b:parseInt(e,16)}}(t),e=s(t);return h.fromRGB(n,r??e)}static fromHSV(t,r){const n=function({h:t,s:r,v:n}){const e=n*r,o=t/60,i=e*(1-Math.abs(o%2-1));let s;s=o>=0&&o<=1?[e,i,0]:o>1&&o<=2?[i,e,0]:o>2&&o<=3?[0,e,i]:o>3&&o<=4?[0,i,e]:o>4&&o<=5?[i,0,e]:o>5&&o<=6?[e,0,i]:[0,0,0];const a=n-e;return{r:Math.round(255*(s[0]+a)),g:Math.round(255*(s[1]+a)),b:Math.round(255*(s[2]+a))}}(t);return h.fromRGB(n,r)}static fromHSL(t,r){const n=function({h:t,s:r,l:n}){const e=(1-Math.abs(2*n-1))*r,o=t/60,i=e*(1-Math.abs(o%2-1));let s;s=o>=0&&o<=1?[e,i,0]:o>1&&o<=2?[i,e,0]:o>2&&o<=3?[0,e,i]:o>3&&o<=4?[0,i,e]:o>4&&o<=5?[i,0,e]:o>5&&o<=6?[e,0,i]:[0,0,0];const a=n-e/2;return{r:Math.round(255*(s[0]+a)),g:Math.round(255*(s[1]+a)),b:Math.round(255*(s[2]+a))}}(t);return h.fromRGB(n,r)}static fromInt(t,r){const n=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}}(t);return h.fromRGB(n,r)}static fromCSS(t,r){const n=function(t,r){const n=t.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/);if(n){const[t,e,o,i]=n.slice(1),s=r??parseFloat(i);return{rgb:{r:parseInt(t,10),g:parseInt(e,10),b:parseInt(o,10)},rgbAlpha:Number.isNaN(s)?void 0:s}}return null}(t,r);if(n){const{rgb:t,rgbAlpha:r}=n;return h.fromRGB(t,r)}const e=function(t){const r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r)return r[1];return null}(t);if(e)return h.fromHex(e,r);const o=function(t,r){const n=t.match(/^hsla?\\((\\d+),\\s*(\\d+)%,\\s*(\\d+)%(?:,\\s*(\\d*(?:\\.\\d+)?))?\\)$/);if(n){const[t,e,o,i]=n.slice(1),s=r??parseFloat(i);return{hsl:{h:parseInt(t,10),s:parseInt(e,10)/100,l:parseInt(o,10)/100},hslAlpha:Number.isNaN(s)?void 0:s}}return null}(t,r);if(o){const{hsl:t,hslAlpha:r}=o;return h.fromHSL(t,r)}throw new Error(`Invalid or unsupported CSS color: ${t}`)}toCSS(r){switch(r){case t.HEX:return`#${e((n=this).rgb.r)}${e(n.rgb.g)}${e(n.rgb.b)}`;case t.HEXA:return function(t){return`#${e(t.rgb.r)}${e(t.rgb.g)}${e(t.rgb.b)}${e(Math.floor(255*t.a))}`}(this);case t.RGB:return function(t){return`rgb(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b})`}(this);case t.RGBA:return function(t){return`rgba(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b}, ${t.a})`}(this);case t.HSL:return function(t){const{h:r,s:n,l:e}=t.hsl;return`hsl(${r}, ${o(n)}, ${o(e)})`}(this);case t.HSLA:return function(t){const{h:r,s:n,l:e}=t.hsl;return`hsla(${r}, ${o(n)}, ${o(e)}, ${t.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var n}contrastAdjust(t,r=4.5){let n=h.BLACK;if("light"===t&&(n=h.WHITE),n!==h.BLACK&&n!==h.WHITE)throw new Error("Only supports contrast calculation between black and white.");let e=c(this,n);if(e>=r)return this;let o=this.hsv.v,i=n===h.WHITE?-.02:.02,s=Number.MAX_VALUE,a=null;for(let t=0;t<100&&s>.07&&o>=0&&o<=1;t++){o=Math.min(o+i,1),a=h.fromHSV({h:this.hsv.h,s:this.hsl.s,v:o}),e=c(a,h.WHITE);const t=Math.round(10*Math.abs(e-r))/10;t>s&&(i*=-.5),s=t}return null===a?this:a}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(t){const{rgb:r,hsl:n,hsv:e,a:o}=JSON.parse(t);return new h(r,n,e,o)}}class f{constructor(t,r){this.color=t,this.population=r}static fromColor(t,r){return new f(t,r)}static fromRGB(t,r){return new f(h.fromRGB(t),r)}}class l{constructor(t,r=[]){this._comparator=t,this._data=r}swap(t,r){[this._data[t],this._data[r]]=[this._data[r],this._data[t]]}compare(t,r){return this._comparator(this._data[t],this._data[r])}bubbleUp(t){for(;t>0;){const r=t-1>>>1;if(this.compare(t,r)>=0)break;this.swap(t,r),t=r}}bubbleDown(t){const r=this._data.length;for(;;){const n=1+(t<<1),e=n+1;let o=t;if(n<r&&this.compare(n,o)<=0&&(o=n),e<r&&this.compare(e,o)<0&&(o=e),o===t)break;this.swap(o,t),t=o}}size(){return this._data.length}push(t){this._data.push(t),this.bubbleUp(this._data.length-1)}pop(){if(0===this._data.length)return null;this.swap(0,this._data.length-1);const t=this._data.pop();return this.bubbleDown(0),t}clone(){return new l(this._comparator,[...this._data])}*popAll(){for(;this._data.length>0;)yield this.pop()}}const p=31;function g(t){const r=(t>>>10&31)<<3,n=(t>>>5&31)<<3,e=(t>>>0&31)<<3;return h.fromRGB({r,g:n,b:e})}function v(t,r){return Math.round((t>>>3)/r)<<3}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return t*p*p+r*p+n-(e*p*p+o*p+i)}function m({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return r*p*p+t*p+n-(o*p*p+e*p+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:e,g:o,b:i}}){return n*p*p+r*p+t-(i*p*p+o*p+e)}class w{constructor(t,r){this.min=t,this.max=r}size(){return this.max-this.min+1}clampTo(t){this.min=this.max=t}extendTo(t){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}class x{_population=0;_spanR=new w(0,0);_spanG=new w(0,0);_spanB=new w(0,0);constructor(t){this._swatches=t,this.fitBox()}getVolume(){return this._spanR.size()*this._spanG.size()*this._spanB.size()}getColorCount(){return this._swatches.length}getAverageColor(){let t=0,r=0,n=0,e=0;for(const{color:o,population:i}of this._swatches)e+=i,t+=i*o.rgb.r,r+=i*o.rgb.g,n+=i*o.rgb.b;const o=v(t,e),i=v(r,e),s=v(n,e);return f.fromRGB({r:o,g:i,b:s},e)}canSplit(){return this.getColorCount()>1}split(){if(!this.canSplit())throw new Error("Can not split a box with only 1 color");const t=this.findSplitPoint(),r=new x(this._swatches.slice(t+1,this._swatches.length));return this._swatches.splice(t+1),this.fitBox(),r}fitBox(){this._population=0;for(let t=0;t<this._swatches.length;t++){const{color:r,population:n}=this._swatches[t];this._population+=n,0===t?(this._spanR.clampTo(r.rgb.r),this._spanG.clampTo(r.rgb.g),this._spanB.clampTo(r.rgb.b)):(this._spanR.extendTo(r.rgb.r),this._spanG.extendTo(r.rgb.g),this._spanB.extendTo(r.rgb.b))}}findSplitPoint(){const t=this.getLongestDimensionComparator();this._swatches.sort(((r,n)=>t(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t<this._swatches.length;t++)if(n+=this._swatches[t].population,n>=r)return Math.min(this._swatches.length-1,t);return 0}getLongestDimensionComparator(){const t=this._spanR.size(),r=this._spanG.size(),n=this._spanB.size();return t>=r&&t>=n?b:r>=t&&r>=n?m:d}}class y{queue=new l(((t,r)=>r.getVolume()-t.getVolume()));_swatches=[];constructor(t){this._options=t}static fromPixels(t,r){return new y(r).quantize(t)}quantize(t){const r=new Array(32768).fill(0);let n=0,e=0,o=0;for(let e=t.next();!e.done;e=t.next()){n++;r[((i=e.value)>>>0&255)>>3<<10|(i>>>8&255)>>3<<5|(i>>>16&255)>>3]++}var i;for(let t=0;t<r.length;t++){const n=r[t];if(0===n)continue;const i=g(t);(void 0===this._options.filter||this._options.filter(i))&&(e++,o+=i.hsv.s,this._swatches.push(f.fromColor(i,n)))}return this._swatches.length>this._options.maxColors&&(this._swatches=this.quantizePixels(this._options.maxColors)),{swatches:this._swatches,totalPixels:n,totalColors:e,totalSaturationFromHSV:o}}quantizePixels(t){this.queue.push(new x(this._swatches)),this.splitBoxes(t);const r=Array.from(this.queue.popAll()).map((t=>t.getAverageColor())),n=this._options.filter;return void 0!==n?r.filter((t=>n(t.color))):r}splitBoxes(t){for(;this.queue.size()<t;){const t=this.queue.pop();if(null===t||!t.canSplit())return;this.queue.push(t.split()),this.queue.push(t)}}}n(6805),n(4563),n(9606),n(8211),n(4164),n(9499),n(9271);function S(t,r){return t.reduce(((t,n)=>null!==t&&r(t)>r(n)?t:n),null)}const _=30,M=80,O=2,I=.0016,E=.3,R=.1,A=45,j=.4,B=.6,P=.1,C=.02;function $(t,r,n){return(t-r)/(n-r)}function G(t){return(t%=360)<0?360+t:t}function z(t,r){const n=function(t){let r=Number.MAX_VALUE;for(const n of t)r=Math.min(r,n);r=-1*Math.abs(r);let n=0,e=360;for(const o of t){const t=G(o+r);t<180&&t>n&&(n=t),t>=180&&t<e&&(e=t)}return n=G(n-r),e=G(e-r),{hue1:Math.min(n,e),hue2:Math.max(n,e)}}(t);let e=0;return r>=n.hue1&&r<=n.hue2?$(G(r),n.hue1,n.hue2):(e=360-n.hue2,$(G(r+e),0,G(n.hue1+e)))}function L(t,r){const n=t.map((t=>t.color.hsv.h)),e=function(t){let r=0,n=0;for(const e of t)r+=Math.cos(e/180*Math.PI),n+=Math.sin(e/180*Math.PI);const e=r/t.length,o=n/t.length,i=180*Math.atan2(o,e)/Math.PI%360;return i>=0?i:360-Math.abs(i)}(n),o=z(n,e);return o>j||o<B?t.filter((t=>{return t.population/r>C||(n=t.color.hsv.h,o=e,i=A,Math.min(Math.abs(o-n),360-Math.abs(o-n))<i);var n,o,i})):t}function T({color:{hsv:t},population:r},n,e){return(n?1:function(t){const r=function(t,r,n){const e=(n-r)/2+r-r,o=t-r,i=(e-Math.abs(e-o))/e;return Math.max(0,Math.min(i,1))}(t,_,M);return-1*Math.abs(r*O)}(t.h))+r/e+t.s*t.v}function F(t,r,n,e){const o=e/n;if(o<R)return null;const i=t.filter((t=>t.population/r>=I)).filter((t=>!(o>=R+P)||function({hsv:t}){return(t.v>.85||t.v<.15)&&t.s<.2||t.v<.15||t.s<.2||t.s<.2&&t.v<.4?0:(t.v+t.s)/2}(t.color)>=E));if(0===i.length)return null;const s=L(i,r),a=function(t){return t.map((t=>t.color.hsv.h)).every((t=>t>=_&&t<=M))}(s);return S(s,(t=>T(t,a,r)))}const H={min:.3,target:.5,max:.7},k={min:0,target:.26,max:.45},D={min:.55,target:.74,max:1},N={min:.35,target:1,max:1},q={min:0,target:.3,max:.4},V={saturation:.24,luminance:.52,population:.24},U={vibrantLight:{lightness:D,saturation:N,weights:V},vibrant:{lightness:H,saturation:N,weights:V},vibrantDark:{lightness:k,saturation:N,weights:V},mutedLight:{lightness:D,saturation:q,weights:V},muted:{lightness:H,saturation:q,weights:V},mutedDark:{lightness:k,saturation:q,weights:V}},X=f.fromRGB({r:83,g:83,b:83},1),W=f.fromRGB({r:83,g:83,b:83},1),J=f.fromRGB({r:127,g:127,b:127},1);function K(t,r){const{color:{hsl:n}}=t;return n.s>=r.saturation.min&&n.s<=r.saturation.max&&n.l>=r.lightness.min&&n.l<=r.lightness.max}function Y(t,r,n){const{color:{hsl:e}}=t;let o=0,i=0,s=0;return r.weights.saturation>0&&(o=r.weights.saturation*(1-Math.abs(e.s-r.saturation.target))),r.weights.luminance>0&&(i=r.weights.luminance*(1-Math.abs(e.l-r.lightness.target))),r.weights.population>0&&(s=r.weights.population*(t.population/n)),o+i+s}let Q=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});const Z=self;const tt=t=>!function({hsl:t}){return t.l<=.05}(t)&&!function({hsl:t}){return t.l>=.95}(t)&&!function({hsl:t}){return t.h>=10&&t.h<=37&&t.s<=.82}(t)&&function({hsv:t}){return t.v>.2}(t);Z.addEventListener("message",(t=>{const[r,n]=t.data,e=function(t){if(t.source===Q.IMAGE_BITMAP){const r=t.data,n=new OffscreenCanvas(r.width,r.height).getContext("2d");return n.drawImage(r,0,0,r.width,r.height),n.getImageData(0,0,r.width,r.height).data.buffer}return t.data}(n),o=function*(t,r){const n=new Uint32Array(t),e=Math.ceil(n.length/r);for(let t=0;t<n.length;t+=e)yield n[t]}(e,2e4),i=y.fromPixels(o,{maxColors:16,filter:tt}),{visRefSwatch:s,visRefDarkSwatch:a,visRefLightSwatch:u}=function(t,r,n,e,o=U){const i=new Set,s=S(t,(t=>t.population)),a={};for(const[r,n]of Object.entries(o)){const e=S(t.filter((t=>!i.has(t.color.toString()))).filter((t=>K(t,n))),(t=>Y(t,n,s?.population||1)));null!==e&&(a[r]=e,i.add(e.color.toString()))}const u=F(Object.values(a),r,n,e),c=u?f.fromColor(u.color.contrastAdjust("dark"),1):null,h=u?f.fromColor(u.color.contrastAdjust("light"),1):null;return{dominantSwatch:s,visRefSwatch:u||X,visRefDarkSwatch:c||W,visRefLightSwatch:h||J,visRefIsFallback:null===u,targetSwatches:a}}(i.swatches,i.totalPixels,i.totalColors,i.totalSaturationFromHSV);Z.postMessage([r,{colorRawJson:s.color.stringify(),colorLightJson:u.color.stringify(),colorDarkJson:a.color.stringify()}])}))})()})();\n',"Worker",void 0,void 0)};let h=0;async function f(t){const r=h++,n=new Promise(((t,n)=>{c.addEventListener("message",(n=>{const[o,i]=n.data;o===r&&t({colorRaw:e.Q.parse(i.colorRawJson),colorDark:e.Q.parse(i.colorDarkJson),colorLight:e.Q.parse(i.colorLightJson)})})),c.addEventListener("error",n)}));return c.postMessage([r,t],[t.data]),await n}async function l(t){let r;try{r=await async function(t){const r=new Image;return r.crossOrigin="anonymous",function(t){const r=0===t.indexOf("spotify:image:"),n=0===t.indexOf("spotify:mosaic:"),e=0===t.indexOf("spotify:localfileimage:");return r||n||e}(t)?r.src=`${o}?uri=${encodeURIComponent(t)}`:r.src=t,await r.decode(),r}(t)}catch(t){return Promise.resolve(u.A)}const n=r.naturalWidth,e=r.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const t=await window.createImageBitmap(r);return await async function(t){return await f({source:i.IMAGE_BITMAP,data:t})}(t)}const s=document.createElement("canvas"),a=s.getContext("2d");return s.width=n,s.height=e,a.drawImage(r,0,0,n,e),await async function(t){return await f({source:i.ARRAY_BUFFER,data:t.data.buffer})}(a.getImageData(0,0,n,e))}}}]); +//# sourceMappingURL=402.js.map
\ No newline at end of file |
