Skip to content

Instantly share code, notes, and snippets.

View snuffyDev's full-sized avatar
😮‍💨
nice

snuffy snuffyDev

😮‍💨
nice
View GitHub Profile
export class FSBuffer extends Uint8Array {
private constructor(value: ArrayBufferLike) {
super(value);
// console.log(Object.getOwnPropertyDescriptors(FSBuffer));
}
/*ts a
* Creates a new Buffer instance from an existing Buffer or Uint8Array.
*
* @param buffer Buffer to use as the source for a new Buffer
const s = {
subtitle: Array.isArray((P = (v = (u = (o = t == null ? void 0 : t.musicResponsiveListItemRenderer) == null ? void 0 : o.flexColumns[1]) == null ? void 0 : u.musicResponsiveListItemFlexColumnRenderer) == null ? void 0 : v.text) == null ? void 0 : P.runs) && (()=>{
var $, ri, oi, ai, ci, li, ui, di, pi, hi, mi, yi, gi, _i, xi, fi, vi, Ii, Ti, ki, bi, Ri, Si, Pi, Mi, wi, Ci, Li, Ei, Ai, Oi, Ni, Ui, ji, Fi, zi, Qi;
let N = []
, w = (ci = (ai = (oi = (ri = ($ = t == null ? void 0 : t.musicResponsiveListItemRenderer) == null ? void 0 : $.flexColumns[1]) == null ? void 0 : ri.musicResponsiveListItemFlexColumnRenderer) == null ? void 0 : oi.text) == null ? void 0 : ai.runs) == null ? void 0 : ci.length;
for (; w--; )
N[w] = (_i = (gi = (yi = (mi = (hi = (pi = (di = (ui = (li = t == null ? void 0 : t.musicResponsiveListItemRenderer) == null ? void 0 : li.flexColumns[1]) == null ? void 0 : ui.musicResponsiveListItemFlexColumnRender
import { parseNextItem } from '$lib/parsers/parsers';
import type { Item, Nullable, Song } from '$lib/types';
import { Mutex } from '$lib/utils';
import { splice } from '$lib/utils/collections';
import { addToQueue, getSrc, notify, queryParams, type ResponseBody } from '$lib/utils/utils';
import { writable, get, type Writable } from 'svelte/store';
import { currentTitle, filterAutoPlay, key as mixListIndex, playerLoading } from './stores';
import { groupSession } from './_sessions';
import { addEvent } from "../events";
import { JSONValue } from "../types/data";
import { AllDirectives, Directive, IDirective } from "../types/directives";
import { forEach, map } from "./array";
export function buildScope(element) {
return new Proxy({}, {
})
}
export function parseAndSortDirectives<T extends Record<string, IDirective> = Record<string, IDirective>>(element: Element): Record<PropertyKey, { [PropertyKey in keyof T as string]: T[string & PropertyKey]; }> {
function fn(t, e) {
const i = t.length;
let n = -1;
for (; ++n < i; )
if (e(t[n]))
return t[n]
}
function Q(t, e) {
const i = t.length;
let n = -1;
var cn=Object.defineProperty,ln=Object.defineProperties;var un=Object.getOwnPropertyDescriptors;var $i=Object.getOwnPropertySymbols;var dn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable;var Di=(t,e,i)=>e in t?cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,E=(t,e)=>{for(var i in e||(e={}))dn.call(e,i)&&Di(t,i,e[i]);if($i)for(var i of $i(e))pn.call(e,i)&&Di(t,i,e[i]);return t},A=(t,e)=>ln(t,un(e));import{C as Gi,ag as hn,ah as mn,ai as yn,aj as F}from"./index-559377e5.js";import{w as R,d as W,_ as gn}from"./preload-helper-ac790cff.js";const _n=!0;function Kn(t){return 1-Math.sqrt(1-t*t)}function xn(t){const e=t-1;return e*e*e+1}function Xn(t){return t===0?t:Math.pow(2,10*(t-1))}function Zn(t){return t===1?t:1-Math.pow(2,-10*t)}function ts(t){return--t*t*t*t*t+1}function es(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function fn(t,e){const i=t.length;let n=-1;for(;++n<i;)if(e(t[n]))return t[n]}function Q(t,e){const i=t.length;let n=-1;for(;++n<i;
import type { Item, JSON, Nullable } from "$lib/types";
import type Peer from "peerjs";
import type { DataConnection } from "peerjs";
import { generateId } from "$lib/utils/id";
import { browser } from "$app/env";
import { Logger } from "$lib/utils/logger";
import { WritableStore } from "$lib/utils/stores";
import { every, filter, findFirst, iter } from "$lib/utils/collections";
import SessionListService, { type ISessionListProvider } from "./list";
{
"thumbnails": [
{
"url": "https://lh3.googleusercontent.com/XFCMIl6kxM18ziKOvRw-8yBGOi8Ws6yJCQW4I1mdvzkKSke_MFEoDHxBSJ9MR2lZVl63EijGxfwTt2-p=w60-h60-l90-rj",
"width": 60,
"height": 60
},
{
"url": "https://lh3.googleusercontent.com/XFCMIl6kxM18ziKOvRw-8yBGOi8Ws6yJCQW4I1mdvzkKSke_MFEoDHxBSJ9MR2lZVl63EijGxfwTt2-p=w120-h120-l90-rj",
"width": 120,