Newer
Older
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
if (this.playback_id !== "" && this.state_machine_id !== "") {
log("ignored WS message ids already found")
log(msg)
return
}
// if (this.state_machine_id === "") {
log("reading state details")
const playback_id = connection.payloads[0]?.state_machine.states.find((state) => {
return state.track_uid === this.uid
})?.state_id
// const playback_id = connection.payloads[0]?.state_machine.states[0]?.state_id
if (playback_id === undefined || playback_id === "") {
log("error missing playback_id")
log(msg)
return
// throw new ScriptException("missing playback_id")
}
const state_machine_id = connection.payloads[0]?.state_machine.state_machine_id
if (state_machine_id === undefined || state_machine_id === "") {
log("error missing state_machine_id")
log(msg)
return
// throw new ScriptException("missing state_machine_id")
}
this.playback_id = playback_id
this.state_machine_id = state_machine_id
log(msg)
// }
// payloads statemachine states state_id
// this.playback_id = "11"
// this.state_machine_id = "69"
// if (!this.start_triggered && this.transfered) {
// }
return
}
log("ignored WS message")
log(msg)
return
}
this.connection_id = connection.headers["Spotify-Connection-Id"]
// register device
log("registering device")
const register_url = "https://gue1-spclient.spotify.com/track-playback/v1/devices"
const response = local_http.POST(
register_url,
// JSON.stringify({
// connection_id: connection.headers["Spotify-Connection-Id"],
// device: {
// device_id: this.device_id,
// model: "web_player",
// name: "Web Player (Grayjay)",
// // capabilities: {
// // change_volume: false,
// // audio_podcasts: true,
// // manifest_formats: [
// // "file_ids_mp3",
// // "file_urls_mp3"
// // ]
// // },
// "capabilities":{"change_volume":true,"enable_play_token":true,"supports_file_media_type":true,"play_token_lost_behavior":"pause","disable_connect":false,"audio_podcasts":true,"video_playback":true,"manifest_formats":["file_ids_mp3","file_urls_mp3","manifest_urls_audio_ad","manifest_ids_video","file_urls_external","file_ids_mp4","file_ids_mp4_dual","manifest_urls_audio_ad"]},
// client_version: "harmony:4.42.0-2780565f",
// // brand: "spotify",
// device_type: "computer"
// }
// }),
JSON.stringify(
{ "device": { "brand": "spotify", "capabilities": { "change_volume": true, "enable_play_token": true, "supports_file_media_type": true, "play_token_lost_behavior": "pause", "disable_connect": false, "audio_podcasts": true, "video_playback": true, "manifest_formats": ["file_ids_mp3", "file_urls_mp3", "manifest_urls_audio_ad", "manifest_ids_video", "file_urls_external", "file_ids_mp4", "file_ids_mp4_dual", "manifest_urls_audio_ad"] }, "device_id": this.device_id, "device_type": "computer", "metadata": {}, "model": "web_player", "name": "Web Player (Chrome)", "platform_identifier": "web_player linux undefined;chrome 125.0.0.0;desktop", "is_group": false }, "outro_endcontent_snooping": false, "connection_id": this.connection_id, "client_version": "harmony:4.42.0-2780565f", "volume": 65535 }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false
)
log(response)
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
log("grabbing devices info")
const another_register_thing = `https://gue1-spclient.spotify.com/connect-state/v1/devices/hobs_${this.device_id.slice(0, 35)}`
const response1 = local_http.requestWithBody(
"PUT",
another_register_thing,
JSON.stringify({
"member_type": "CONNECT_STATE",
"device":
{
"device_info":
{
"capabilities": {
"can_be_player": false,
"hidden": true,
"needs_full_player_state": true
}
}
}
}),
{
Authorization: `Bearer ${local_state.bearer_token}`,
"X-Spotify-Connection-Id": this.connection_id
},
false)
const device_info = JSON.parse(response1.body)
log(device_info)
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
// this.device_active = "active_device_id" in device_info
// this.transfered = true
// this.registered = true
// payloads cluster playerstate
// payloads statemachine staemachine_id
// if (1 + 2 > 3) {
// }
// log(response.body)
// gives the list of devices
//https://gue1-spclient.spotify.com/connect-state/v1/devices/hobs_5ef1df4daf071872bfe5ae0714efafa29f2
//https://gue1-spclient.spotify.com/connect-state/v1/devices/hobs_ce5888d21908a6372f02c2c0155f3d7d1c9
// actually registers a device
//https://gue1-spclient.spotify.com/track-playback/v1/devices
},
failure: (exception) => {
log("failure")
console.log(exception)
}
})
}
override onInit(seconds: number): void {
}
override onProgress(seconds: number, is_playing: boolean): void {
//{"seq_num":15,"state_ref":{"state_machine_id":"ChQ0Jnocbbg7kDx3WOjgNutMUyLLzA","state_id":"8425aeb0fef142d597d1b578c5f31061","paused":true},"sub_state":{"playback_speed":0,"position":33535,"duration":307927,"media_type":"AUDIO","bitrate":128000,"audio_quality":"HIGH","format":10},"previous_position":33535,"debug_source":"pause"}
if (seconds - this.init_seconds > 70 && is_playing) {
this.socket.close()
this.socket_closed = true
log("done closing")
}
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
if (this.another_one) {
return
}
if (seconds - this.init_seconds > 60 && is_playing) {
log("deleting device")
const url = `https://gue1-spclient.spotify.com/connect-state/v1/devices/hobs_${this.device_id.slice(0, 35)}`
const response = local_http.request("DELETE", url, { Authorization: `Bearer ${local_state.bearer_token}` }, false)
log(response)
const url2 = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}`
const response2 = local_http.requestWithBody("DELETE", url2, JSON.stringify(
{"seq_num":this.seq_num,"state_ref":{"state_machine_id":this.state_machine_id,"state_id":this.playback_id,"paused":false},"sub_state":{"playback_speed":1,"position":40786,"duration":this.duration,"media_type":"AUDIO","bitrate":128000,"audio_quality":"HIGH","format":10},"previous_position":40786,"debug_source":"deregister"}
) ,{ Authorization: `Bearer ${local_state.bearer_token}` }, false)
log(response2)
/*
log("trigger finish")
const initial_state_machine_id = this.state_machine_id
const register_playback_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response1: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
register_playback_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": this.state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 1, "position": this.duration - 158, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "previous_position": this.duration - 158, "playback_stats": { "ms_total_est": this.duration, "ms_metadata_duration": 0, "ms_manifest_latency": 196, "ms_latency": 1188, "start_offset_ms": 14, "ms_initial_buffering": 451, "ms_initial_rebuffer": 451, "ms_seek_rebuffering": 0, "ms_stalled": 0, "max_ms_seek_rebuffering": 0, "max_ms_stalled": 0, "n_stalls": 0, "n_rendition_upgrade": 0, "n_rendition_downgrade": 0, "bps_bandwidth_max": 0, "bps_bandwidth_min": 0, "bps_bandwidth_avg": 0, "audiocodec": "mp4", "start_bitrate": 128000, "time_weighted_bitrate": 0, "key_system": "widevine", "ms_key_latency": 1796, "total_bytes": 3494928, "local_time_ms": Date.now(), "n_dropped_video_frames": 0, "n_total_video_frames": 0, "resolution_max": 0, "resolution_min": 0, "strategy": "MSE" }, "debug_source": "track_data_finalized" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response1)
this.seq_num += 1
this.state_machine_id = response1.state_machine.state_machine_id
log("triggering before play")
const before_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response2: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
before_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": initial_state_machine_id, "state_id": this.playback_id, "paused": true }, "sub_state": { "playback_speed": 1, "position": 0, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "debug_source": "before_track_load" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response2)
this.state_machine_id = response2.state_machine.state_machine_id
this.seq_num += 1
// let res = 0
// for(let i = 0; i<10000;i++){
// res = (res+1)*2/2
// }
log("speed change 1")
// const before_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response3: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
before_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": initial_state_machine_id, "state_id": this.playback_id, "paused": true }, "sub_state": { "playback_speed": 0, "position": 0, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "debug_source": "speed_changed" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response3)
this.seq_num += 1
*/
this.another_one = true
}
if (this.in_between) {
return
}
if (seconds - this.init_seconds > 50 && is_playing) {
if (!this.socket.isOpen) {
log("socket not open!")
} else {
log(`recording play of ${this.uri_id}`)
// this.socket.close()
}
const register_playback_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
register_playback_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": this.state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 1, "position": 30786, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "previous_position": 30786, "debug_source": "played_threshold_reached" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response)
this.state_machine_id = response.state_machine.state_machine_id
}
if (this.play_recorded) {
return
if (seconds - this.init_seconds > 15 && is_playing) {
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
// log(this.connection_id)
// command id is random
//t = e=>{
// const t = Math.ceil(e / 2);
// return function(e) {
// let t = "";
// for (let n = 0; n < e.length; n++) {
// const i = e[n];
// i < 16 && (t += "0"),
// t += i.toString(16)
// }
// return t
// }(gt(t))
// const un = /^[0-9a-f]{32}$/i
// , pn = ()=>ft(32)
// , mn = e=>{
// if (e && (t = e,
// !un.test(t)))
// throw new TypeError(`Invalid commandId. Expected a 32 character hex string but got: ${e}`);
// var t;
// return e || pn()
// }
const initial_state_machine_id = this.state_machine_id
log("triggering before play")
const before_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response1: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
before_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": this.state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 1, "position": 0, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "debug_source": "before_track_load" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response1)
this.state_machine_id = response1.state_machine.state_machine_id
this.seq_num += 1
// let res = 0
// for(let i = 0; i<10000;i++){
// res = (res+1)*2/2
// }
log("speed change 1")
// const before_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response3: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
before_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": initial_state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 0, "position": 0, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "debug_source": "speed_changed" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response3)
this.seq_num += 1
// this.state_machine_id = response3.state_machine.state_machine_id
// res = 0
// for(let i = 0; i<10000;i++){
// res = (res+1)*2/2
// }
log("speedchange 2")
// const before_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response4: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
before_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": this.state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 1, "position": 0, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "previous_position": 0, "debug_source": "speed_changed" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response4)
this.state_machine_id = response4.state_machine.state_machine_id
this.seq_num += 1
// res = 0
// for(let i = 0; i<10000;i++){
// res = (res+1)*2/2
// }
log("triggering play start")
const started_playling_url = `https://gue1-spclient.spotify.com/track-playback/v1/devices/${this.device_id}/state`
const response: { readonly state_machine: { readonly state_machine_id: string } } = JSON.parse(local_http.requestWithBody(
"PUT",
started_playling_url,
// JSON.stringify({
// debug_source: "played_threshold_reached",
// }),
JSON.stringify(
{ "seq_num": this.seq_num, "state_ref": { "state_machine_id": this.state_machine_id, "state_id": this.playback_id, "paused": false }, "sub_state": { "playback_speed": 1, "position": 1360, "duration": this.duration, "media_type": "AUDIO", "bitrate": 128000, "audio_quality": "HIGH", "format": 10 }, "previous_position": 1360, "debug_source": "started_playing" }
),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false).body)
log(response)
this.state_machine_id = response.state_machine.state_machine_id
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
// this.start_triggered = true
}
if (this.transfered) {
return
}
if (seconds - this.init_seconds > 5 && is_playing) {
log("transfering to device")
const transfer_url = `https://gue1-spclient.spotify.com/connect-state/v1/player/command/from/${this.device_id}/to/${this.device_id}`
const transfer_response = local_http.POST(
transfer_url,
// this.device_active ? JSON.stringify(
// { "transfer_options": { "restore_paused": "restore" }, "interaction_id": "cf075506-9bc9-4af6-a164-93778f310345", "command_id": "3bcf58bc37afa628c3d441df53efc469" }
// ) :
JSON.stringify({
"command": {
"context": {
// "uri": "spotify:track:6CbPF34njo6PpWYTFQrMZN",
// "url": "context://spotify:track:6CbPF34njo6PpWYTFQrMZN",
uri: `spotify:album:${this.album_uri_id}`,
url: `context://spotify:album:${this.album_uri_id}`,
"metadata": {}
},
"play_origin": {
"feature_identifier": "album",
// "feature_identifier": "track",
"feature_version": "web-player_2024-05-24_1716563359844_29d0a3b",
"referrer_identifier": "your_library"
},
"options": {
"license": "on-demand",
"skip_to": {
track_index: this.track_album_index,
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
},
"player_options_override": {}
},
"logging_params": {
"page_instance_ids": [
"54d854fb-fcb4-4e1f-a600-4fd9cbfaac2e"
],
"interaction_ids": [
"d3697919-e8be-425d-98bc-1ea70e28963a"
],
"command_id": "46b1903536f6eda76783840368982c5e"
},
"endpoint": "play"
}
}),
// JSON.stringify({
// command: {
// endpoint: "play",
// context: {
// metadata: {},
// uri: "spotify:track:7aohwSiTDju51QmC54AUba",
// url: "context://spotify:track:7aohwSiTDju51QmC54AUba"
// },
// "logging_params": { "page_instance_ids": ["5616d9d6-c44f-4cda-a7c2-167890dd2beb"], "interaction_ids": ["72ab0dbb-7a83-4644-8bad-550d65ff8e77"], "command_id": "0f85a8b2347ff239207f32344d7da9d6" },
// "options": {
// "license": "on-demand", "skip_to": {}, "player_options_override": {}
// },
// "play_origin": { "feature_identifier": "track", "feature_version": "web-player_2024-05-23_1716493666036_b53deef", "referrer_identifier": "your_library" },
// }
// // command_id: "1ec91233c1cd60f69f5de11f513b2887",
// // transfer_options: {
// // restore_paused: "pause"
// // }
// }),
{ Authorization: `Bearer ${local_state.bearer_token}` },
false
)
log(transfer_response)
this.transfered = true
function url_from_image_uri(image_uri: string) {
const match_result = image_uri.match(/^spotify:(image|mosaic):([0-9a-zA-Z:]*)$/)
if (match_result === null) {
if (/^https:\/\//.test(image_uri)) {
return image_uri
}
throw new ScriptException("regex error")
}
const image_type: "image" | "mosaic" = match_result[1] as "image" | "mosaic"
if (image_type === undefined) {
throw new ScriptException("regex error")
}
const uri_id = match_result[2]
if (uri_id === undefined) {
throw new ScriptException("regex error")
}
switch (image_type) {
case "image":
return `https://i.scdn.co/image/${uri_id}`
case "mosaic":
return `https://mosaic.scdn.co/300/${uri_id.split(":").join("")}`
default:
throw assert_exhaustive(image_type)
}
}
function id_from_uri(uri: string): string {
return parse_uri(uri).uri_id
}
function parse_uri(uri: string) {
const match_result = uri.match(/^spotify:(show|album|track|artist|playlist|section|episode|user|genre|collection):([0-9a-zA-Z]*|tracks|your-episodes)$/)
throw new ScriptException("regex error")
}
const maybe_type = match_result[1]
if (maybe_type === undefined) {
throw new ScriptException("regex error")
}
const uri_type: UriType = maybe_type as UriType
const uri_id = match_result[2]
if (uri_id === undefined) {
throw new ScriptException("regex error")
}
/**
* Converts seconds to the timestamp format used in WebVTT
* @param seconds
* @returns
*/
function milliseconds_to_WebVTT_timestamp(milliseconds: number) {
return new Date(milliseconds).toISOString().substring(11, 23)
}
function assert_never(value: never) {
log(value)
}
function log_passthrough<T>(value: T): T {
log(value)
return value
}
function assert_exhaustive(value: never): void
function assert_exhaustive(value: never, exception_message: string): ScriptException
function assert_exhaustive(value: never, exception_message?: string): ScriptException | undefined {
log(["Spotify log:", value])
if (exception_message !== undefined) {
return new ScriptException(exception_message)
}
return
}
//#endregion
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
// https://open.spotifycdn.com/cdn/build/web-player/vendor~web-player.391a2438.js
const Z = "0123456789abcdef"
const Q = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const ee: string[] = []
ee.length = 256
for (let ke = 0; ke < 256; ke++)
// @ts-expect-error
ee[ke] = Z[ke >> 4] + Z[15 & ke]
const te: number[] = []
te.length = 128
for (let ke = 0; ke < Q.length; ++ke)
te[Q.charCodeAt(ke)] = ke
function get_gid(song_uri_id: string) {
return 22 === song_uri_id.length ? function (e) {
if (22 !== e.length)
return null
const t = 2.3283064365386963e-10
, n = 4294967296
, i = 238328
let o, r, a, s, c
// @ts-expect-error
return o = 56800235584 * te[e.charCodeAt(0)] + 916132832 * te[e.charCodeAt(1)] + 14776336 * te[e.charCodeAt(2)] + 238328 * te[e.charCodeAt(3)] + 3844 * te[e.charCodeAt(4)] + 62 * te[e.charCodeAt(5)] + te[e.charCodeAt(6)],
r = o * t | 0,
o -= r * n,
// @ts-expect-error
c = 3844 * te[e.charCodeAt(7)] + 62 * te[e.charCodeAt(8)] + te[e.charCodeAt(9)],
o = o * i + c,
o -= (c = o * t | 0) * n,
r = r * i + c,
// @ts-expect-error
c = 3844 * te[e.charCodeAt(10)] + 62 * te[e.charCodeAt(11)] + te[e.charCodeAt(12)],
o = o * i + c,
o -= (c = o * t | 0) * n,
r = r * i + c,
r -= (c = r * t | 0) * n,
a = c,
// @ts-expect-error
c = 3844 * te[e.charCodeAt(13)] + 62 * te[e.charCodeAt(14)] + te[e.charCodeAt(15)],
o = o * i + c,
o -= (c = o * t | 0) * n,
r = r * i + c,
r -= (c = r * t | 0) * n,
a = a * i + c,
// @ts-expect-error
c = 3844 * te[e.charCodeAt(16)] + 62 * te[e.charCodeAt(17)] + te[e.charCodeAt(18)],
o = o * i + c,
o -= (c = o * t | 0) * n,
r = r * i + c,
r -= (c = r * t | 0) * n,
a = a * i + c,
a -= (c = a * t | 0) * n,
s = c,
// @ts-expect-error
c = 3844 * te[e.charCodeAt(19)] + 62 * te[e.charCodeAt(20)] + te[e.charCodeAt(21)],
o = o * i + c,
o -= (c = o * t | 0) * n,
r = r * i + c,
r -= (c = r * t | 0) * n,
a = a * i + c,
a -= (c = a * t | 0) * n,
s = s * i + c,
s -= (c = s * t | 0) * n,
// @ts-expect-error
c ? null : ee[s >>> 24] + ee[s >>> 16 & 255] + ee[s >>> 8 & 255] + ee[255 & s] + ee[a >>> 24] + ee[a >>> 16 & 255] + ee[a >>> 8 & 255] + ee[255 & a] + ee[r >>> 24] + ee[r >>> 16 & 255] + ee[r >>> 8 & 255] + ee[255 & r] + ee[o >>> 24] + ee[o >>> 16 & 255] + ee[o >>> 8 & 255] + ee[255 & o]
}(song_uri_id) : song_uri_id
}
// export statements are removed during build step
// used for unit testing in SpotifyScript.test.ts
export {
get_gid,
assert_never,
log_passthrough,
getPlaybackTracker