@tixyel/streamelements 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +27 -3
- package/dist/index.es.js +285 -263
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(O,M){typeof exports=="object"&&typeof module<"u"?M(exports):typeof define=="function"&&define.amd?define(["exports"],M):(O=typeof globalThis<"u"?globalThis:O||self,M(O["@tixyel/streamelements"]={}))})(this,(function(O){"use strict";class M{constructor(){this.registeredEvents={}}emit(t,...e){return(this.registeredEvents[t]||[]).map(n=>n.apply(this,e))}on(t,e){if(typeof e!="function")throw new TypeError("Callback must be a function");return this.registeredEvents[t]||(this.registeredEvents[t]=[]),this.registeredEvents[t].push(e),this}off(t,e){const a=this.registeredEvents[t]||[];return e?(this.registeredEvents[t]=a.filter(n=>n!==e),this):(this.registeredEvents[t]=[],this)}once(t,e){const a=(...n)=>{this.off(t,a),e.apply(this,n)};return this.on(t,a),this}removeAllListeners(t){return this.registeredEvents[t]=[],this}}var U=[];class G extends M{constructor(t){if(super(),this.id="default",this.loaded=!1,this.id=t.id||this.id,this.data=t.data??{},!SE_API||!SE_API.store)throw new Error("SE_API.store is not available");SE_API.store.get(this.id).then(e=>{this.data=e??this.data,this.loaded=!0,this.emit("load",this.data),JSON.stringify(this.data)!==JSON.stringify(e)&&this.emit("update",this.data)}).catch(()=>{this.loaded=!0,this.emit("load",null)}),U.push(this)}save(t=this.data){this.loaded&&(this.data=t,SE_API.store.set(this.id,this.data),this.emit("update",this.data))}update(t=this.data){this.loaded&&JSON.stringify(this.data)!==JSON.stringify(t)&&(this.data={...this.data,...t},this.save(this.data))}add(t,e){this.loaded&&(G.setByPath(this.data,t,e),this.save(this.data))}clear(){this.loaded&&(this.data={},this.save(this.data))}static setByPath(t,e,a){const n=e.split(".");let i=t;for(let d=0;d<n.length-1;d++)(typeof i[n[d]]!="object"||i[n[d]]==null)&&(i[n[d]]={}),i=i[n[d]];return i[n[n.length-1]]=a,i}on(t,e){return t==="load"&&this.loaded?(e.apply(this,[this.data]),this):(super.on(t,e),this)}}class A extends M{constructor(t){super(),this.id="default",this.fields={},this.loaded=!1,this.actions={commands:[],buttons:[]},this.cache={avatar:30,pronoun:30,emote:30},this.id=t.id||this.id,this.storage=new G({id:this.id,data:{user:{},avatar:{},pronoun:{},emote:{}}}),window.client=this}on(t,e){return t==="load"&&this.loaded?(e.apply(this,[{channel:this.details.user,currency:this.details.currency,fieldData:this.fields,recents:[],session:{data:this.session,settings:{autoReset:!1,calendar:!1,resetOnStart:!1}},overlay:this.details.overlay,emulated:!1}]),this):(super.on(t,e),this)}}var F=(m=>(m.hehim="He/Him",m.sheher="She/Her",m.theythem="They/Them",m.shethem="She/They",m.hethem="He/They",m.heshe="He/She",m.xexem="Xe/Xem",m.faefaer="Fae/Faer",m.vever="Ve/Ver",m.aeaer="Ae/Aer",m.ziehir="Zie/Hir",m.perper="Per/Per",m.eem="E/Em",m.itits="It/Its",m))(F||{});function B(m,t=L.data.emotes){const e=[];return t.forEach(a=>{const n=a.name;let i=0,d=0;for(;i<m.length;){const o=m.indexOf(n,d);if(o===-1)break;const u=o>0?m[o-1]:" ",f=o+n.length<m.length?m[o+n.length]:" ";/\s/.test(u)&&/\s/.test(f)&&e.push({...a,start:o,end:o+n.length}),d=o+1}}),e.sort((a,n)=>a.start-n.start)}function H(m,t){if(!t.length)return m;let e="",a=0;return t.forEach(n=>{e+=m.substring(a,n.start);const i=n.urls[4]||n.urls[2]||n.urls[1];e+=`<img src="${i}" alt="${n.name}" class="emote" style="width: auto; height: 1em; vertical-align: middle;" />`,a=n.end}),e+=m.substring(a),e}async function W(m=[],t="twitch"){if(!Array.isArray(m)&&typeof m=="string"&&(m=m.split(",").map(d=>d.trim())),!m||!m.length){var e=L.rand.number(1,3);for await(const d of Array.from({length:e},()=>"")){var a=L.rand.array(Object.keys(L.data.badges))[0];!m.includes(a)&&Array.isArray(m)?m.push(a):m=[a]}}var n;switch(t){case"twitch":{n={keys:Array.from(m).filter(d=>d in L.data.badges),badges:Array.from(m).slice(0,3).map(d=>L.data.badges[d]).filter(Boolean)};break}case"youtube":{var i={verified:{isVerified:!1},broadcaster:{isChatOwner:!1},host:{isChatOwner:!1},sponsor:{isChatSponsor:!1},subscriber:{isChatSponsor:!1},moderator:{isChatModerator:!1}};n=Object.entries(m).reduce((d,[o])=>(o in i&&Object.assign(d,i[o]),d),{isVerified:!1,isChatOwner:!1,isChatSponsor:!1,isChatModerator:!1});break}}return n}const q=["https://static-cdn.jtvnw.net/user-default-pictures-uv/13e5fa74-defa-11e9-809c-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/dbdc9198-def8-11e9-8681-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/998f01ae-def8-11e9-b95c-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/de130ab0-def7-11e9-b668-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/ebe4cd89-b4f4-4cd9-adac-2f30151b4209-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/215b7342-def9-11e9-9a66-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/ead5c8b2-a4c9-4724-b1dd-9f00b46cbd3d-profile_image-300x300.png"],V={"100 bits":{type:"100 bits",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/09d93036-e7ce-431c-9a9e-7044297133f2/3",description:"100 bits badge"},"no audio":{type:"no audio",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/aef2cd08-f29b-45a1-8c12-d44d7fd5e6f0/3",description:"Individuals with unreliable or no sound can select this badge"},"no video":{type:"no video",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/199a0dba-58f3-494e-a7fc-1fa0a1001fb8/3",description:"Individuals with unreliable or no video can select this badge"},bot:{type:"bot",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/df9095f6-a8a0-4cc2-bb33-d908c0adffb8/3",description:"Twitch bot"},"twitch staff":{type:"twitch staff",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/d97c37bd-a6f5-4c38-8f57-4e4bef88af34/3",description:"Twitch Staff"},admins:{type:"admins",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/9ef7e029-4cdf-4d4d-a0d5-e2b3fb2583fe/3",description:"Admins"},artist:{type:"artist",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/4300a897-03dc-4e83-8c0e-c332fee7057f/3",description:"Artist"},"game developer":{type:"game developer",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/85856a4a-eb7d-4e26-a43e-d204a977ade4/3",description:"Game Developer"},prime:{type:"prime",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/a1dd5073-19c3-4911-8cb4-c464a7bc1510/3",description:"Prime"},turbo:{type:"turbo",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/bd444ec6-8f34-4bf9-91f4-af1e3428d80f/3",description:"Turbo"},subscriber:{type:"subscriber",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/5d9f2208-5dd8-11e7-8513-2ff4adfae661/3",description:"Subscriber"},broadcaster:{type:"broadcaster",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/3",description:"Broadcaster"},verified:{type:"verified",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/d12a2e27-16f6-41d0-ab77-b780518f00a3/3",description:"Verified"},moderator:{type:"moderator",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/3267646d-33f0-4b17-b3df-f923a41db1d0/3",description:"Moderator"},vip:{type:"vip",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/b817aba4-fad8-49e2-b88a-7cc744dfa6ec/3",description:"VIP"}},J=Object.values([{type:"twitch",name:"TheIlluminati",id:"145315",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/3.0"},start:0,end:13},{type:"twitch",name:"BrainSlug",id:"115233",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/3.0"},start:14,end:23},{type:"twitch",name:"imGlitch",id:"112290",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/3.0"},start:24,end:32},{type:"twitch",name:"TakeNRG",id:"112292",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/3.0"},start:33,end:40},{type:"twitch",name:"DxCat",id:"110734",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/3.0"},start:41,end:46},{type:"twitch",name:"VoHiYo",id:"81274",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/3.0"},start:47,end:53},{type:"twitch",name:"DoritosChip",id:"102242",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/3.0"},start:54,end:65},{type:"twitch",name:"KomodoHype",id:"81273",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/3.0"},start:66,end:76},{type:"twitch",name:"duDudu",id:"62834",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/3.0"},start:77,end:83},{type:"twitch",name:"CoolCat",id:"58127",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/3.0"},start:84,end:91},{type:"twitch",name:"KappaPride",id:"55338",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/3.0"},start:92,end:102},{type:"twitch",name:"BloodTrail",id:"69",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/3.0"},start:103,end:113},{type:"twitch",name:"PunchTrees",id:"47",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/3.0"},start:114,end:124},{type:"twitch",name:"SSSsss",id:"46",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/3.0"},start:125,end:131},{type:"twitch",name:"Kappa",id:"25",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/3.0"},start:132,end:137},{type:"twitch",name:"MrDestructoid",id:"28",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/3.0"},start:138,end:151},{type:"twitch",name:"<3",id:"9",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/3.0"},start:152,end:154},{type:"twitch",name:"HSWP",id:"446979",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/3.0"},start:155,end:159},{type:"twitch",name:"Shush",id:"emotesv2_819621bcb8f44566a1bd8ea63d06c58f",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/3.0"},start:160,end:165},{type:"twitch",name:"IronmouseLuv",id:"emotesv2_54c53ae67ad746d2bc866b6fc779183c",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/3.0"},start:166,end:178},{type:"twitch",name:"KPOPTT",id:"304047269",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/3.0"},start:0,end:5},{type:"twitch",name:"FrogPonder",id:"emotesv2_a3cdcbfcae9b41bb8215b012362eea35",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/3.0"},start:7,end:16},{type:"twitch",name:"HypeCheer",id:"emotesv2_dd4f4f9cea1a4039ad3390e20900abe4",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/3.0"},start:18,end:26},{type:"twitch",name:"HypeFail",id:"emotesv2_0330a84e75ad48c1821c1d29a7dadd4d",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/3.0"},start:28,end:35},{type:"twitch",name:"HypePopcorn",id:"emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/3.0"},start:37,end:47},{type:"twitch",name:"TransgenderPride",id:"307827377",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/3.0"},start:49,end:65},{type:"twitch",name:"PansexualPride",id:"307827370",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/3.0"},start:66,end:80},{type:"twitch",name:"NonbinaryPride",id:"307827356",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/3.0"},start:81,end:95},{type:"twitch",name:"LesbianPride",id:"307827340",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/3.0"},start:96,end:108},{type:"twitch",name:"IntersexPride",id:"307827332",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/3.0"},start:109,end:122},{type:"twitch",name:"GenderFluidPride",id:"307827326",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/3.0"},start:123,end:139},{type:"twitch",name:"GayPride",id:"307827321",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/3.0"},start:140,end:148},{type:"twitch",name:"BisexualPride",id:"307827313",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/3.0"},start:149,end:162},{type:"twitch",name:"AsexualPride",id:"307827267",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/3.0"},start:163,end:175},{type:"twitch",name:"PogChamp",id:"305954156",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/3.0"},start:176,end:184},{type:"twitch",name:"GlitchCat",id:"304486301",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/3.0"},start:185,end:194},{type:"twitch",name:"SoonerLater",id:"2113050",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/3.0"},start:195,end:206},{type:"twitch",name:"FBCatch",id:"1441281",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/3.0"},start:207,end:214},{type:"twitch",name:"FBBlock",id:"1441276",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/3.0"},start:215,end:222},{type:"twitch",name:"PixelBob",id:"1547903",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/3.0"},start:223,end:231},{type:"twitch",name:"LUL",id:"425618",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/3.0"},start:232,end:235},{type:"twitch",name:"DarkMode",id:"461298",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/3.0"},start:236,end:244},{type:"twitch",name:"PopCorn",id:"724216",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/3.0"},start:245,end:252},{type:"twitch",name:"EarthDay",id:"959018",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/3.0"},start:253,end:261},{type:"twitch",name:"TwitchUnity",id:"196892",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/3.0"},start:262,end:273},{type:"twitch",name:"Squid4",id:"191767",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/3.0"},start:274,end:280},{type:"twitch",name:"Squid3",id:"191764",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/3.0"},start:281,end:287},{type:"twitch",name:"Squid2",id:"191763",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/3.0"},start:288,end:294},{type:"twitch",name:"Squid1",id:"191762",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/3.0"},start:295,end:301},{type:"twitch",name:"CrreamAwk",id:"191313",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/3.0"},start:302,end:311},{type:"twitch",name:"DinoDance",id:"emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7",gif:!0,animated:!0,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/3.0"},start:46,end:55},{type:"twitch",name:"PopNemo",id:"emotesv2_5d523adb8bbb4786821cd7091e47da21",gif:!0,animated:!0,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/3.0"},start:56,end:63},{type:"twitch",name:"TransgenderPride",id:"307827377",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/3.0"},start:0,end:15},{type:"twitch",name:"PansexualPride",id:"307827370",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/3.0"},start:17,end:30},{type:"twitch",name:"NonbinaryPride",id:"307827356",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/3.0"},start:32,end:45},{type:"twitch",name:"LesbianPride",id:"307827340",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/3.0"},start:47,end:58},{type:"twitch",name:"IntersexPride",id:"307827332",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/3.0"},start:60,end:72},{type:"twitch",name:"GenderFluidPride",id:"307827326",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/3.0"},start:74,end:89},{type:"twitch",name:"GayPride",id:"307827321",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/3.0"},start:91,end:98},{type:"twitch",name:"BisexualPride",id:"307827313",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/3.0"},start:100,end:112},{type:"twitch",name:"AsexualPride",id:"307827267",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/3.0"},start:114,end:125},{type:"twitch",name:"PogChamp",id:"305954156",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/3.0"},start:127,end:134},{type:"twitch",name:"GlitchCat",id:"304486301",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/3.0"},start:136,end:144},{type:"twitch",name:"DarkMode",id:"461298",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/3.0"},start:146,end:153},{type:"twitch",name:"LUL",id:"425618",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0"},start:155,end:157},{type:"twitch",name:"TheIlluminati",id:"145315",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/3.0"},start:159,end:171},{type:"twitch",name:"imGlitch",id:"112290",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/3.0"},start:173,end:180},{type:"twitch",name:"DoritosChip",id:"102242",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/3.0"},start:182,end:192},{type:"twitch",name:"SSSsss",id:"46",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/3.0"},start:194,end:199},{type:"twitch",name:"PunchTrees",id:"47",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/3.0"},start:201,end:210},{type:"twitch",name:"BloodTrail",id:"69",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/3.0"},start:223,end:232},{type:"7tv",name:"CookieTime",id:"635b0184ea9ce7391cbf77d6",gif:!0,animated:!0,urls:{1:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/1x.webp",2:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/2x.webp",3:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/3x.webp",4:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/4x.webp"},start:0,end:10,coords:{x:0,y:0}},{type:"bttv",name:"catJAM",id:"5f1b0186cf6d2144653d2970",gif:!0,animated:!0,urls:{1:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/1x",2:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/2x",4:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/3x"},start:0,end:6,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:":tf:",id:"54fa8f1401e468494b85b537",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/1x",2:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/2x",4:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/3x"},start:7,end:11,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"AngelThump",id:"566ca1a365dbbdab32ec055b",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/1x",2:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/2x",4:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/3x"},start:12,end:22,coords:{x:0,y:0,width:334,height:112}},{type:"bttv",name:"ariW",id:"56fa09f18eff3b595e93ac26",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/1x",2:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/2x",4:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/3x"},start:23,end:27,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"BroBalt",id:"54fbf00a01abde735115de5c",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/1x",2:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/2x",4:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/3x"},start:28,end:35,coords:{x:0,y:0,width:184,height:120}},{type:"bttv",name:"bttvNice",id:"54fab7d2633595ca4c713abf",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/1x",2:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/2x",4:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/3x"},start:36,end:44,coords:{x:0,y:0,width:168,height:112}},{type:"bttv",name:"bUrself",id:"566c9f3b65dbbdab32ec052e",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/1x",2:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/2x",4:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/3x"},start:45,end:52,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"c!",id:"6468f7acaee1f7f47567708e",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/1x",2:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/2x",4:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/3x"},start:53,end:55,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"CandianRage",id:"54fbf09c01abde735115de61",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/1x",2:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/2x",4:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/3x"},start:56,end:67,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"CiGrip",id:"54fa8fce01e468494b85b53c",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/1x",2:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/2x",4:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/3x"},start:68,end:74,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"ConcernDoge",id:"566c9f6365dbbdab32ec0532",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/1x",2:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/2x",4:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/3x"},start:75,end:86,coords:{x:0,y:0,width:101,height:112}},{type:"bttv",name:"CruW",id:"55471c2789d53f2d12781713",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/1x",2:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/2x",4:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/3x"},start:87,end:91,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"cvHazmat",id:"5e76d338d6581c3724c0f0b2",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/1x",2:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/2x",4:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/3x"},start:92,end:100,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"D:",id:"55028cd2135896936880fdd7",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/1x",2:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/2x",4:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/3x"},start:101,end:103,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"haHAA",id:"555981336ba1901877765555",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/555981336ba1901877765555/1x",2:"https://cdn.betterttv.net/emote/555981336ba1901877765555/2x",4:"https://cdn.betterttv.net/emote/555981336ba1901877765555/3x"},start:104,end:109,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"LuL",id:"567b00c61ddbe1786688a633",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/1x",2:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/2x",4:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/3x"},start:110,end:113,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"DuckerZ",id:"573d38b50ffbf6cc5cc38dc9",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/1x",2:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/2x",4:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/3x"},start:114,end:121,coords:{x:0,y:0,width:149,height:112}},{type:"ffz",name:"CatBag",id:"25927",gif:!1,animated:!1,urls:{1:"https://cdn.frankerfacez.com/emote/25927/1",2:"https://cdn.frankerfacez.com/emote/25927/2",4:"https://cdn.frankerfacez.com/emote/25927/4"},start:122,end:128,coords:{x:0,y:0,width:143,height:128}}]).reduce((m,t)=>(m.some(e=>e.name===t.name)||m.push({...t,start:0,end:0}),m),[]),K=["Hello everyone!","PogChamp","This stream is amazing!","catJAM catJAM catJAM","LUL that was funny","GG!","First time here, loving it!","DinoDance","Can we get some hype in chat?","TransgenderPride PansexualPride NonbinaryPride","POGGERS","I just followed! PogChamp","Great gameplay btw","LUL LUL LUL","This is so wholesome AngelThump","catJAM vibing","haHAA","Wait what just happened? D:","GlitchCat GlitchCat","Best stream on Twitch right now!","DarkMode gang where you at?","PogChamp PogChamp PogChamp PogChamp","Anyone else eating? DoritosChip","I love this community!","TheIlluminati confirmed","bUrself be yourself!","CookieTime nom nom","imGlitch technical difficulties","This music is fire catJAM","bttvNice","LesbianPride GayPride BisexualPride","SSSsss Minecraft time","PopNemo","Going to bed, good night everyone!","Just got here, what did I miss?",":tf: trollface","ariW wave","BroBalt nice one","AsexualPride IntersexPride GenderFluidPride","This chat is moving so fast!","CandianRage","PunchTrees PunchTrees","CiGrip","ConcernDoge hmm","CruW salute","cvHazmat stay safe","DuckerZ quack","BloodTrail hunting time","CatBag kitty!","c! poggers"],Q=["Local","Tixyel","Urie_s2","itzzcatt","BeniArts","Cupidiko","shy_madeit"],Z=["Filiz","Astrid","Tatyana","Maxim","Carmen","Ines","Cristiano","Vitoria","Ricardo","Maja","Jan","Jacek","Ewa","Ruben","Lotte","Liv","Seoyeon","Takumi","Mizuki","Giorgio","Carla","Bianca","Karl","Dora","Mathieu","Celine","Chantal","Penelope","Miguel","Mia","Enrique","Conchita","Geraint","Salli","Matthew","Kimberly","Kendra","Justin","Joey","Joanna","Ivy","Raveena","Aditi","Emma","Brian","Amy","Russell","Nicole","Vicki","Marlene","Hans","Naja","Mads","Gwyneth","Zhiyu","Tracy","Danny","Huihui","Yaoyao","Kangkang","HanHan","Zhiwei","Asaf","An","Stefanos","Filip","Ivan","Heidi","Herena","Kalpana","Hemant","Matej","Andika","Rizwan","Lado","Valluvar","Linda","Heather","Sean","Michael","Karsten","Guillaume","Pattara","Jakub","Szabolcs","Hoda","Naayf"],X=[],Y=["1000","2000","3000","prime"],s=class s{static fields(t){const e={from:"main",endsWith:[],ignore:[],replace:{},subgroup:!1,template:"• {key}",subgroupTemplate:"★ {key}",settings:{types:[[["size","width","number","gap","duration"],"number"],[["options","dropdown","weight"],"dropdown"],[["range","radius"],"slider"],[["color","background"],"colorpicker"],[["font-family","font","family"],"googleFont"]],addons:[[["slider","radius"],{step:1,min:0,max:"inherit"}],[["options","dropdown"],{options:{}}],[["weight"],{options:{100:"Thin",200:"Extra Light",300:"Light",400:"Regular",500:"Medium",600:"Semi Bold",700:"Bold",800:"Extra Bold",900:"Black"}}]],transforms:[[["size","width","number","gap","duration"],l=>parseFloat(String(l))],[["font-family","font","family"],l=>l],[["range","radius"],l=>parseFloat(String(l))],[["options","dropdown"],l=>l],[["weight"],l=>l],[["color","background"],l=>l]],labels:[[["font-size"]," • In pixels"],[["font-radius"]," • In pixels"]]}};function a(l){return{...e,...l,endsWith:Array.isArray(l.endsWith)?l.endsWith:e.endsWith,ignore:Array.isArray(l.ignore)?l.ignore:e.ignore,replace:{...e.replace,...l.replace??{}},settings:{types:Array.isArray(l.settings?.types)?l.settings.types:e.settings.types,addons:Array.isArray(l.settings?.addons)?l.settings.addons:e.settings.addons,transforms:Array.isArray(l.settings?.transforms)?l.settings.transforms:e.settings.transforms,labels:Array.isArray(l.settings?.labels)?l.settings.labels:e.settings.labels},subgroup:l.subgroup??e.subgroup,template:l.template??e.template,subgroupTemplate:l.subgroupTemplate??e.subgroupTemplate,from:l.from??e.from}}const n=a(t),d=Array.from(document.styleSheets).filter(({href:l})=>!l||l.startsWith(window.location.origin)).reduce((l,{cssRules:p})=>(p&&Array.from(p).forEach(g=>{g instanceof CSSStyleRule&&g.selectorText===n.from&&Array.from(g.style).some(y=>y.startsWith("--"))&&Array.from(g.style).filter(y=>y.startsWith("--")).forEach(y=>{l[y]=g.style.getPropertyValue(y).trim()})}),l),{}),o=Object.entries(d).filter(([l])=>n.endsWith.some(p=>l.toLowerCase().endsWith(p.toLowerCase())&&!l.includes("-options-"))).filter(([l])=>!n.ignore.some(p=>l.toLowerCase()===p.toLowerCase())).reduce((l,[p,g])=>(l[p.replace("--","")]=String(n.replace?.[p]??g),l),{});let u=[];const f=Object.entries(o).reduce((l,[p,g])=>{let y=n.settings.types.find(([v])=>v.some(b=>p.toLowerCase().includes(b)))?.[1]||"text",x=n.settings.transforms.find(([v])=>v.some(b=>p.toLowerCase().includes(b)))?.[1]||(v=>v),c={type:"text",label:n.settings.labels.find(([v])=>v.some(b=>p.toLowerCase().includes(b)))?.[1]||"",...n.settings.addons.find(([v])=>v.some(b=>p.toLowerCase().includes(b)))?.[1]||{}};["min","max","step","label","type"].forEach(v=>{const b=d[`--${p}-${v}`];b&&b.length&&(c[v]=isNaN(parseFloat(b))?String(b).replace(/^['"]|['"]$/g,""):String(parseFloat(b)))});let w=p.replace(/-(size|color|weight|width|height|gap|duration|radius|amount)$/g,"").replace(/-([a-z])/g,(v,b)=>b.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase().trim(),k=Object.keys(o).filter(v=>v.startsWith(w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)));n.subgroup&&!l[`${w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)}-subgroup`]&&k.length>1&&!u.includes(p)&&(u.push(...k),l[`${w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)}-subgroup`]={type:"hidden",label:n.subgroupTemplate.replaceAll("{key}",s.string.capitalize(w))});let E=s.string.capitalize(p.replace(/-([a-z])/g,(v,b)=>b.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase());g=x(g)??g;const S=(()=>{const v=Object.entries(d).filter(([b])=>b.startsWith(`--${p}-options-`)).reduce((b,[D,C])=>{const R=D.replace(`--${p}-options-`,"");return R&&(b[String(C)]=s.string.capitalize(R.replace(/-([a-z])/g,(P,at)=>at.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase())),b},{});return Object.keys(v).length?v:null})();return S&&(y="dropdown",c.options=S,g=String(g)),Object.entries(c).forEach(([v,b])=>{[!1,"inherit","auto",null].includes(b)&&(c[v]=g)}),l[p]={type:c.type||y,label:n.template.toString().replaceAll("{key}",s.string.capitalize(E)+c.label),value:g,min:c.min,max:c.max,step:c.step,options:c.options},l},{}),h=Object.entries(f).reduce((l,[p,g])=>{const y=g?.label?.includes("undefined"),x=!["hidden","button"].includes(g.type)&&g.value===void 0;return(y||x)&&(l[p]=g),l},{});if(Object.keys(h).length)throw I.logger.error("Simulation.fields: Detected errors in generated fields:",h),new Error("Error while processing fields");return f}static async start(){const t={fields:["fields.json","cf.json","field.json","customfields.json"].find(a=>{try{return new URL("./"+a,window.location.href),!0}catch{return!1}}),data:["data.json","fielddata.json","fd.json","DATA.json"].find(a=>{try{return new URL("./"+a,window.location.href),!0}catch{return!1}})},e=await fetch("./"+(t.data??"data.json"),{cache:"no-store"}).then(a=>a.json()).catch(()=>({}));await fetch("./"+(t.fields??"fields.json"),{cache:"no-store"}).then(a=>a.json()).then(async a=>{const n=Object.entries(a).filter(([d,{value:o}])=>o!=null).reduce((d,[o,{value:u}])=>(e&&e[o]!==void 0&&(u=e[o]),d[o]=u,d),{...e}),i=await s.generate.event.onWidgetLoad(n,await s.generate.session.get());window.dispatchEvent(new CustomEvent("onWidgetLoad",{detail:i}))})}};s.data={names:Q,messages:K,tiers:Y,avatars:q,items:X,emotes:J,badges:V,pronouns:F,tts:Z},s.color={opacity(t=100,e){e=e.length>7?e.substring(0,6):e,t=t>1?t/100:t;let a=Math.round(Math.min(Math.max(t,0),1)*255).toString(16).toLowerCase();return a=a.padStart(2,"0"),e+a},getOpacity(t){if(!t.startsWith("#")||t.length<=7)return{opacity:100,hex:t};var e=t.slice(-2),a=parseInt(e,16)/255,n=Math.round(a*100),i=t.length>7?t.slice(0,7):t;return{opacity:n,color:i}},validate(t){if(typeof t!="string"||!t.length)return!1;const e=t.trim();return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)||/^#([A-Fa-f0-9]{4}|[A-Fa-f0-9]{8})$/.test(e)?"hex":/^rgb\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)$/.test(e)?"rgb":/^rgba\(\s*(?:\d{1,3}\s*,\s*){3}(?:0|1|0?\.\d+)\s*\)$/.test(e)?"rgba":/^hsl\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*\)$/.test(e)?"hsl":/^hsla\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*,\s*(?:0|1|0?\.\d+)\s*\)$/.test(e)?"hsla":["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent"].includes(e.toLowerCase())?"css-color-name":!1}},s.rand={color(t="hex"){switch(t){default:case"hex":return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`;case"hexa":{const a=`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`,n=Math.floor(Math.random()*256).toString(16).padStart(2,"0");return a+n}case"rgb":{const a=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256);return`rgb(${a}, ${n}, ${i})`}case"rgba":{const a=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256),d=Math.random().toFixed(2);return`rgba(${a}, ${n}, ${i}, ${d})`}case"hsl":{const a=Math.floor(Math.random()*361),n=Math.floor(Math.random()*101),i=Math.floor(Math.random()*101);return`hsl(${a}, ${n}%, ${i}%)`}case"hsla":{const a=Math.floor(Math.random()*361),n=Math.floor(Math.random()*101),i=Math.floor(Math.random()*101),d=Math.random().toFixed(2);return`hsla(${a}, ${n}%, ${i}%, ${d})`}case"css-color-name":{var e=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent"];return this.array(e)[0]}}},number(t,e,a=0){t>e&&([t,e]=[e,t]);const n=Math.random()*(e-t)+t;return a?Number(n.toFixed(a)):Math.round(n)},boolean(t=.5){return Math.random()>t},string(t,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let a="";for(let n=0;n<t;n++)a+=e.charAt(Math.floor(Math.random()*e.length));return a},array(t){const e=this.number(0,t.length-1);return[t[e],e]},date(t=365){const a=Date.now()-this.number(0,t*24*60*60*1e3);return new Date(a).toISOString()},uuid(){return window.crypto&&typeof crypto?.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16))}},s.string={async replace(t,e,a){const n=[];t.replace(e,(d,...o)=>{const u=typeof a=="function"?a(d,...o):d;return n.push(Promise.resolve(u)),d});const i=await Promise.all(n);return t.replace(e,()=>i.shift()??"")},capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},compose(t,e={},a={method:"index",html:!1,modifiers:{},aliases:{}}){const{mergeSpanStyles:n}=s.element;e.skip="<br/>",e.newline="<br/>";const i=Object.entries(s.object.flatten(e)).reduce((r,[c,w])=>{if(r[c]=String(w),["username","name","nick","nickname","sender"].some(k=>c===k)){const k=r?.username||r?.name||r?.nick||r?.nickname||r?.sender;r.username=r.username||k,r.usernameAt=`@${r.username}`,r.name=r.name||k,r.nick=r.nick||k,r.nickname=r.nickname||k,r.sender=r.sender||k,r.senderAt=`@${r.sender}`}return["amount","count"].some(k=>c===k)&&(r.amount=String(o),r.count=String(r?.count||o)),r.currency=r.currency||window.client?.details.currency.symbol||"$",r.currencyCode=r.currencyCode||window.client?.details.currency.code||"USD",r},{}),d={PLACEHOLDERS:/{([^}]+)}/g,MODIFIERS:/\[(\w+)(:[^=]+)?=([^\]]+)\]/g};var o=parseFloat(i?.amount??i?.count??0);const u={COLOR:(r,c)=>n(c&&s.color.validate(c)?`color: ${c}`:"",r),WEIGHT:(r,c)=>n(c&&!isNaN(parseInt(c))?`font-weight: ${c}`:"",r),BOLD:r=>n("font-weight: bold",r),LIGHT:r=>n("font-weight: lighter",r),STRONG:r=>n("font-weight: bolder",r),ITALIC:r=>n("font-style: italic",r),UNDERLINE:r=>n("text-decoration: underline",r),STRIKETHROUGH:r=>n("text-decoration: line-through",r),SUB:r=>n("vertical-align: sub",r),SUP:r=>n("vertical-align: super",r),LARGER:r=>n("font-size: larger",r),SMALL:r=>n("font-size: smaller",r),SHADOW:(r,c)=>n(`text-shadow: ${c}`,r),SIZE:(r,c)=>n(c?`font-size: ${c}`:"",r)},h={...{BT1:r=>o>1?r:"",BT0:r=>o>0?r:"",ST1:r=>o<1?r:"",ST0:r=>o<0?r:"",UPC:r=>r.toUpperCase(),LOW:r=>r.toLowerCase(),REV:r=>r.split("").reverse().join(""),CAP:r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),FALLBACK:(r,c)=>r.length?r:c??r},...a?.html?u:{},...a.modifiers??{}},l={UPC:["UPPERCASE","UPPER","UPP"],LOW:["LOWERCASE","LOWER","LWC"],REV:["REVERSE","RVS"],CAP:["CAPITALIZE","CAPITAL"],BT1:["BIGGER_THAN_1","GREATER_THAN_1","GT1"],BT0:["BIGGER_THAN_0","GREATER_THAN_0","GT0"],ST1:["SMALLER_THAN_1","LESS_THAN_1","LT1"],ST0:["SMALLER_THAN_0","LESS_THAN_0","LT0"],COLOR:["COLOUR","CLR","HIGHLIGHT"],BOLD:["BOLDEN","B"],STRONG:["STRONGEN","STRONG"],ITALIC:["ITALICIZE","ITALIC","I"],UNDERLINE:["U","INS","INSET","I"],STRIKETHROUGH:["STRIKE","S","DELETE","D"],SUB:["SUBSCRIPT","SUBS"],SUP:["SUPERSCRIPT","SUPS"],LARGER:["LARGER","LG"],SMALL:["SMALLER","SM"],SHADOW:["SHADOW","SHD"],FALLBACK:["FALLBACK","FB"],...a.aliases??{}};function p(r,c,w){const k=Object.entries(l).find(([j,S])=>S.some(v=>v.toUpperCase()===c.toUpperCase())?!0:j.toUpperCase()===c.toUpperCase()),E=k?k[0]:c.toUpperCase();return h[E]?h[E](r,typeof w=="string"?w.trim():null,i):r}function g(r){let c=r,w;for(;(w=d.MODIFIERS.exec(c))!==null;){const[k,E,j,S]=w,v=p(g(S),E,j);c=c.replace(k,v??""),d.MODIFIERS.lastIndex=0}return c}function y(r){let c=0;const w=r.length;function k(j){let S="";for(;c<w;)if(r[c]==="\\")c+1<w?(S+=r[c+1],c+=2):c++;else if(r[c]==="["&&(!j||j!=="["))S+=E();else if(j&&r[c]===j){c++;break}else S+=r[c++];return S}function E(){c++;let j="";for(;c<w&&/[A-Za-z0-9]/.test(r[c]);)j+=r[c++];let S=null;if(r[c]===":"){c++;const b=c;for(;c<w&&r[c]!=="=";)c++;S=r.slice(b,c)}r[c]==="="&&c++;const v=k("]");return p(v,j,S)}return k()}let x=t.replace(d.PLACEHOLDERS,(r,c)=>typeof i[c]=="string"||typeof i[c]=="number"?String(i[c]):c??c);return x=a.method==="loop"?g(x):y(x),x}},s.element={mergeSpanStyles(t,e){const a=e.match(/^<span style="([^"]*)">(.*)<\/span>$/s);if(a){const n=a[1],i=a[2];return`<span style="${[n,t].filter(Boolean).join("; ").replace(/\s*;\s*/g,"; ").trim()}">${i}</span>`}else return`<span style="${t}">${e}</span>`},scale(t,e=0,a=1,n){const{return:i=!1,parent:d,base:o}=n||{},u=d||t.parentElement||document.body;if(!u){I.logger.warn("No parent element found for scaling");return}const f=u.getBoundingClientRect(),h=t.offsetWidth,l=t.offsetHeight;if(h===0||l===0){I.logger.warn("Element has zero width or height, cannot scale");return}const p=f.width*a/h,g=f.height*a/l;let y=o==="width"?p:o==="height"?g:Math.min(p,g);if(e>0){const r=f.width*e/h,c=f.height*e/l,w=Math.max(r,c);y=Math.max(w,y)}const x={width:h*y,height:l*y,scale:y};return i||(t.style.transform=`scale(${y})`,t.style.transformOrigin="center center"),x},splitTextToChars(t,e=0){const n=new DOMParser().parseFromString(t,"text/html");let i=e;function d(f){if(f.nodeType===Node.TEXT_NODE){const l=f.textContent?.split("").map(g=>{const y=document.createElement("span");return y.className="char",y.dataset.index=String(i++),y.textContent=g,i++,y.outerHTML}),p=document.createElement("span");return p.innerHTML=l?.join("")??"",p}else if(f.nodeType===Node.ELEMENT_NODE){const h=f.cloneNode(!1);return f.childNodes.forEach(l=>{const p=d(l);p instanceof Node&&Array.from(p.childNodes).forEach(g=>{h.appendChild(g)})}),h}return f.cloneNode(!0)}const o=n.body,u=document.createElement("div");return o.childNodes.forEach(f=>{const h=d(f);h instanceof Node&&u.appendChild(h)}),u.innerHTML}},s.object={flatten(t,e=""){const a={};for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const i=t[n],d=e?`${e}.${n}`:n;if(i==null){a[d]=String(i);continue}if(i instanceof Date){a[d]=i.toISOString();continue}if(i instanceof Map){i.forEach((o,u)=>{a[`${d}.${u}`]=JSON.stringify(o)});continue}if(Array.isArray(i)){i.forEach((o,u)=>{const f=`${d}:${u}`;typeof o=="object"?Object.assign(a,this.flatten(o,f)):a[f]=String(o)});continue}if(typeof i=="object"){Object.assign(a,this.flatten(i,d));continue}a[d]=String(i)}return a}},s.generate={session:{types:{name:{type:"string",options:s.data.names.filter(t=>t.length)},tier:{type:"string",options:s.data.tiers.filter(t=>t.length)},message:{type:"string",options:s.data.messages.filter(t=>t.length)},item:{type:"array",options:s.data.items},avatar:{type:"string",options:s.data.avatars.filter(t=>t.length)}},available(){const t=this.types;return{follower:{latest:{name:t.name},session:{count:{type:"int",min:50,max:200}},week:{count:{type:"int",min:200,max:1e3}},month:{count:{type:"int",min:1e3,max:3e3}},goal:{amount:{type:"int",min:3e3,max:7e3}},total:{count:{type:"int",min:7e3,max:1e4}},recent:{type:"recent",amount:25,value:{name:t.name,createdAt:{type:"date",range:400}}}},subscriber:{latest:{name:t.name,amount:{type:"int",min:10,max:30},tier:t.tier,message:t.message},"new-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message},"resub-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message},"gifted-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message,tier:t.tier,sender:t.name},session:{count:{type:"int",min:10,max:40}},"new-session":{count:{type:"int",min:10,max:40}},"resub-session":{count:{type:"int",min:10,max:40}},"gifted-session":{count:{type:"int",min:10,max:40}},week:{count:{type:"int",min:40,max:100}},month:{count:{type:"int",min:100,max:200}},goal:{amount:{type:"int",min:200,max:300}},total:{count:{type:"int",min:300,max:400}},points:{amount:{type:"int",min:100,max:400}},"alltime-gifter":{name:t.name,amount:{type:"int",min:300,max:400}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:10,max:30},tier:t.tier,createdAt:{type:"date",range:400}}}},host:{latest:{name:t.name,amount:{type:"int",min:1,max:10}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:1,max:10},createdAt:{type:"date",range:400}}}},raid:{latest:{name:t.name,amount:{type:"int",min:0,max:100}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:0,max:100},createdAt:{type:"date",range:400}}}},charityCampaignDonation:{latest:{name:t.name,amount:{type:"int",min:50,max:150}},"session-top-donation":{name:t.name,amount:{type:"int",min:50,max:200}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:200,max:500}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:500,max:800}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:800,max:1e3}},"session-top-donator":{name:t.name,amount:{type:"int",min:50,max:200}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:200,max:500}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:500,max:800}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:800,max:1e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:50,max:150},createdAt:{type:"date",range:400}}}},cheer:{latest:{name:t.name,amount:{type:"int",min:200,max:800},message:t.message},"session-top-donation":{name:t.name,amount:{type:"int",min:200,max:1e3}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:5e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:5e3,max:12e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:12e3,max:2e4}},"session-top-donator":{name:t.name,amount:{type:"int",min:200,max:1e3}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:5e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:5e3,max:12e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:12e3,max:2e4}},session:{amount:{type:"int",min:200,max:1e3}},week:{amount:{type:"int",min:1e3,max:5e3}},month:{amount:{type:"int",min:5e3,max:12e3}},goal:{amount:{type:"int",min:12e3,max:18e3}},total:{amount:{type:"int",min:18e3,max:2e4}},count:{count:{type:"int",min:200,max:1e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:200,max:800},createdAt:{type:"date",range:400}}}},cheerPurchase:{latest:{name:t.name,amount:{type:"int",min:200,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:200,max:400}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:400,max:800}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:800,max:1500}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:1500,max:2e3}},"session-top-donator":{name:t.name,amount:{type:"int",min:200,max:400}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:400,max:800}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:800,max:1500}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:1500,max:2e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:200,max:400},createdAt:{type:"date",range:400}}}},superchat:{latest:{name:t.name,amount:{type:"int",min:100,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:2e3,max:2500}},"session-top-donator":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:2e3,max:2500}},session:{amount:{type:"int",min:100,max:500}},week:{amount:{type:"int",min:500,max:1e3}},month:{amount:{type:"int",min:1e3,max:2e3}},goal:{amount:{type:"int",min:2e3,max:2300}},total:{amount:{type:"int",min:2300,max:2500}},count:{count:{type:"int",min:100,max:500}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:100,max:400},createdAt:{type:"date",range:400}}}},hypetrain:{latest:{name:t.name,amount:{type:"int",min:0,max:100},active:{type:"int",min:0,max:1},level:{type:"int",min:5,max:10},levelChanged:{type:"int",min:0,max:5},_type:{type:"array",options:["follower","subscriber","cheer","donation"]}},"level-goal":{amount:{type:"int",min:0,max:100}},"level-progress":{amount:{type:"int",min:0,max:100},percent:{type:"int",min:0,max:100}},total:{amount:{type:"int",min:0,max:100}},"latest-top-contributors":{type:"recent",amount:25,value:{name:t.name}}},"channel-points":{latest:{name:t.name,amount:{type:"int",min:0,max:100},message:t.message,redemption:{type:"array",options:["Reward 1","Reward 2","Reward 3"]}}},tip:{latest:{name:t.name,amount:{type:"int",min:100,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:2e3,max:2500}},"session-top-donator":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:2e3,max:2500}},session:{amount:{type:"int",min:100,max:500}},week:{amount:{type:"int",min:500,max:1e3}},month:{amount:{type:"int",min:1e3,max:2e3}},goal:{amount:{type:"int",min:2e3,max:2300}},total:{amount:{type:"int",min:2300,max:2500}},count:{count:{type:"int",min:100,max:500}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:100,max:400},createdAt:{type:"date",range:400}}}},merch:{latest:{name:t.name,amount:{type:"int",min:0,max:100},items:t.item},"goal-orders":{amount:{type:"int",min:0,max:100}},"goal-items":{amount:{type:"int",min:0,max:100}},"goal-total":{amount:{type:"int",min:0,max:100}},recent:{type:"recent",amount:25,value:{name:t.name}}},purchase:{latest:{name:t.name,amount:{type:"int",min:0,max:100},items:t.item,avatar:t.avatar,message:t.message}}}},async get(){const t=this.available(),e=n=>{const i=u=>{if(!u||!("amount"in u))return[];const f=[];for(let h=0;h<u.amount;h++)f.push(e(u.value));return f.sort((h,l)=>new Date(l.createdAt).getTime()-new Date(h.createdAt).getTime())},d=u=>{const f={};for(const h in u){const l=h.replace("_type","type");f[l]=e(u[h])}return f},o=u=>{if(!u)return u;switch(u.type){case"int":return s.rand.number(u.min,u.max);case"string":return s.rand.array(u.options)[0];case"date":return s.rand.date(u.range);case"array":return s.rand.array(u.options)[0];case"recent":return i(u);default:return u}};return typeof n!="object"||n===null?n:"type"in n&&typeof n.type=="string"?o(n):d(n)};var a=Object.entries(e(t)).reduce((n,[i,d])=>(Object.entries(d).forEach(([o,u])=>n[`${i}-${o}`]=u),n),{});return a}},event:{async onWidgetLoad(t,e,a="USD"){const n={BRL:{code:"BRL",name:"Brazilian Real",symbol:"R$"},USD:{code:"USD",name:"US Dollar",symbol:"$"},EUR:{code:"EUR",name:"Euro",symbol:"€"}};return{channel:{username:"local",apiToken:"",id:"",providerId:"",avatar:""},currency:n[a]??n.USD,fieldData:t,recents:[],session:{data:e,settings:{autoReset:!1,calendar:!1,resetOnStart:!1}},overlay:{isEditorMode:!0,muted:!1},emulated:!0}},async onSessionUpdate(t){return t??=await s.generate.session.get(),{session:t}},async onEventReceived(t="random",e="random",a={}){const n={twitch:["message","follower-latest","cheer-latest","raid-latest","subscriber-latest"],streamelements:["tip-latest"],youtube:["message","superchat-latest","subscriber-latest","sponsor-latest"],kick:[],facebook:[]};switch(t){default:case"random":{var i=s.rand.array(Object.keys(n).filter(v=>n[v].length))[0],d=s.rand.array(n[i])[0];return this.onEventReceived(i,d)}case"twitch":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"message":{var o=a?.name??s.rand.array(s.data.names.filter(b=>b.length))[0],u=a?.message??s.rand.array(s.data.messages.filter(b=>b.length))[0],f=await W(a?.badges??[],t),h=B(u),l=H(u,h),p=a?.color??s.rand.color("hex"),g=a?.userId??s.rand.number(1e7,99999999).toString(),y=Date.now();return{listener:"message",event:{service:t,data:{time:y,tags:{"badge-info":`${f.keys.map(b=>`${b}/${s.rand.number(1,5)}`).join(",")}`,badges:f.keys.join("/1,"),mod:f.keys.includes("moderator")?"1":"0",subscriber:f.keys.includes("subscriber")?"1":"0",turbo:f.keys.includes("turbo")?"1":"0","tmi-sent-ts":y.toString(),"user-id":g,"user-type":"",color:p,"display-name":o,emotes:"","client-nonce":s.rand.string(16),flags:"",id:s.rand.uuid(),"first-msg":"0","returning-chatter":"0"},nick:o.toLowerCase(),displayName:o,displayColor:p,channel:"local",text:u,isAction:!1,userId:g,msgId:s.rand.uuid(),badges:f.badges,emotes:h},renderedText:l}}}case"cheer":case"cheer-latest":{var x=a?.amount??s.rand.number(100,1e4),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0],u=a?.message??s.rand.array(s.data.messages.filter(C=>C.length))[0];return{listener:"cheer-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,message:u,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"cheer",originalEventName:"cheer-latest"}}}case"follower":case"follower-latest":{var r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0];return{listener:"follower-latest",event:{avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"follower",originalEventName:"follower-latest"}}}case"raid":case"raid-latest":{var x=a?.amount??s.rand.number(1,100),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"raid-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"raid",originalEventName:"raid-latest"}}}case"subscriber":case"subscriber-latest":{var c=a?.tier??s.rand.array(["1000","2000","3000"])[0],x=a?.amount??s.rand.number(1,24),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(P=>P.length))[0],w=a?.sender??s.rand.array(s.data.names.filter(P=>P.length&&P!==o))[0],u=a?.message??s.rand.array(s.data.messages.filter(P=>P.length))[0],k={default:{avatar:r,tier:c,playedAsCommunityGift:!1},gift:{sender:w,gifted:!0},community:{message:u,sender:w,bulkGifted:!0},spam:{sender:w,gifted:!0,isCommunityGift:!0}},E=["default","gift","community","spam"],j=a?.subType??s.rand.array(E)[0];return j=E.includes(j)?j:"default",{listener:"subscriber-latest",event:{amount:x,name:o.toLowerCase(),displayName:o,providerId:"",...k.default,...k[j],_id:s.rand.uuid(),sessionTop:!1,type:"subscriber",originalEventName:"subscriber-latest"}}}case"delete-message":return{listener:"delete-message",event:{msgId:a?.id??s.rand.uuid()}};case"delete-messages":return{listener:"delete-messages",event:{userId:a?.id??s.rand.number(1e7,99999999).toString()}}}case"streamelements":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"tip":case"tip-latest":{var x=a?.amount??s.rand.number(100,4e3),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"tip-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"tip",originalEventName:"tip-latest"}}}case"kvstore:update":return{listener:"kvstore:update",event:{data:{key:`customWidget.${a?.key??"sampleKey"}`,value:a?.value??"sampleValue"}}};case"bot:counter":return{listener:"bot:counter",event:{counter:a?.counter??"sampleCounter",value:a?.value??s.rand.number(0,100)}};case"mute":case"unmute":case"alertService:toggleSound":{var S=a?.muted??!client.details.overlay.muted;return{listener:"alertService:toggleSound",event:{muted:S}}}case"skip":case"event:skip":return{listener:"event:skip",event:{}}}case"youtube":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"message":{var o=a?.name??s.rand.array(s.data.names.filter(T=>T.length))[0],u=a?.message??s.rand.array(s.data.messages.filter(T=>T.length))[0];const D=await W(a?.badges??[],t);var h=B(u),l=H(u,h),p=a?.color??s.rand.color("hex"),g=a?.userId??s.rand.number(1e7,99999999).toString(),y=Date.now(),r=a?.avatar??s.rand.array(s.data.avatars)[0];return{listener:"message",event:{service:"youtube",data:{kind:"",etag:"",id:"",snippet:{type:"",liveChatId:"",authorChannelId:"local",publishedAt:new Date().toISOString(),hasDisplayContent:!0,displayMessage:u,textMessageDetails:{messageText:u}},authorDetails:{channelId:"local",channelUrl:"",displayName:o,profileImageUrl:r,...D},msgId:s.rand.uuid(),userId:s.rand.uuid(),nick:o.toLowerCase(),badges:[],displayName:o,isAction:!1,time:Date.now(),tags:[],displayColor:s.rand.color("hex"),channel:"local",text:u,avatar:r,emotes:[]},renderedText:u}}}case"subscriber":case"subscriber-latest":{var r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0];return{listener:"subscriber-latest",event:{avatar:r,displayName:o,name:o.toLowerCase(),providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"subscriber",originalEventName:"subscriber-latest"}}}case"superchat":case"superchat-latest":{var x=a?.amount??s.rand.number(100,4e3),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"superchat-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"superchat",originalEventName:"superchat-latest"}}}case"sponsor":case"sponsor-latest":{var c=a?.tier??s.rand.array(["1000","2000","3000"])[0],x=a?.amount??s.rand.number(1,24),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(T=>T.length))[0],w=a?.sender??s.rand.array(s.data.names.filter(T=>T.length&&T!==o))[0],u=a?.message??s.rand.array(s.data.messages.filter(T=>T.length))[0],k={default:{avatar:r,tier:c,playedAsCommunityGift:!1},gift:{sender:w,gifted:!0},community:{message:u,sender:w,bulkGifted:!0},spam:{sender:w,gifted:!0,isCommunityGift:!0}},E=["default","gift","community","spam"],j=a?.subType??s.rand.array(E)[0];return j=E.includes(j)?j:"default",{listener:"sponsor-latest",event:{amount:x,name:o.toLowerCase(),displayName:o,providerId:"",...k.default,...k[j],_id:s.rand.uuid(),sessionTop:!1,type:"sponsor",originalEventName:"sponsor-latest"}}}}}}}},s.emulate={twitch:{message(t={}){s.generate.event.onEventReceived("twitch","message",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},follower(t={}){s.generate.event.onEventReceived("twitch","follower-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},raid(t={}){s.generate.event.onEventReceived("twitch","raid-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},cheer(t={}){s.generate.event.onEventReceived("twitch","cheer-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},subscriber(t={}){s.generate.event.onEventReceived("twitch","subscriber-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},streamelements:{tip(t={}){s.generate.event.onEventReceived("streamelements","tip-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},youtube:{message(t={}){s.generate.event.onEventReceived("youtube","message",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},subscriber(t={}){s.generate.event.onEventReceived("youtube","subscriber-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},superchat(t={}){s.generate.event.onEventReceived("youtube","superchat-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},sponsor(t={}){s.generate.event.onEventReceived("youtube","sponsor-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},kick:{},facebook:{},send(t,e){window.dispatchEvent(new CustomEvent(t,{detail:e}))}};let L=s;class _{constructor(){this.themes=[{name:"error",color:"#721c24",background:"#f8d7da",bold:!0,italic:!1,fontSize:18,template:{before:" ✖ ",after:" "}},{name:"success",color:"#155724",background:"#d4edda",bold:!0,italic:!1,fontSize:18,template:{before:" ✔ ",after:" "}},{name:"alert",color:"#856404",background:"#fff3cd",bold:!0,italic:!1,fontSize:20,template:{before:" ⚠ ",after:" "}},{name:"warn",color:"#856404",background:"#fff3cd",bold:!0,italic:!1,fontSize:20,template:{before:" ⚠ ",after:" "}},{name:"status",color:"#0c5460",background:"#d1ecf1",bold:!0,italic:!1,fontSize:12,template:{before:" · ",after:""}},{name:"received",color:"#E6BBFF",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:" ⬇ ",after:""}},{name:"simple",color:"#f5c6cb",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:"",after:""}},{name:"info",color:"#f6c6cb",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:" ℹ ",after:""}}],this.error=()=>{},this.success=()=>{},this.alert=()=>{},this.warn=()=>{},this.status=()=>{},this.received=()=>{},this.simple=()=>{},this.info=()=>{},this.themes.forEach(t=>{const e=[];t.background&&t.background!=="transparent"&&e.push(`background-color: ${t.background}`),t.color&&e.push(`color: ${t.color}`),t.bold&&e.push("font-weight: bold"),t.italic&&e.push("font-style: italic"),t.underline&&e.push("text-decoration: underline"),t.fontSize&&e.push(`font-size: ${t.fontSize}px`);const a="%c",n=(...i)=>{const d=Array.from(i).filter(h=>typeof h=="string"||typeof h=="number"),o=Array.from(i).filter(h=>typeof h!="string"&&typeof h!="number"),u=d.length>0?e.join("; "):null,f=[d.length>0?a+(t.template?.before??"")+d.join(" ")+(t.template?.after??""):null,u,...o].filter(Boolean);return console.log(...f)};this[t.name]=n})}}class N{constructor(t){this.field="button",this.template="button",window.client instanceof A&&(this.field=t.field??this.field,this.template=t.template??this.template,this.run=t.run,window.client.actions.buttons.push(this),window.client.emit("action",this,"created"))}parse(t,e){var a=t.replace(typeof this.field=="string"?this.field:this.template.replace(/\{[^}]*\}/g,"")??"","").trim();try{this.run.apply(window.client,[a.length?a:t??t,e])}catch(n){throw new Error(`Error running button "${this.field}": ${n instanceof Error?n.message:n}`)}return this}static execute(t,e){try{if(!(window.client instanceof A))return!1;if(window.client.actions.buttons.length){const a=window.client.actions.buttons.find(n=>typeof n.field=="string"?n.field===t:typeof n.field=="function"?n.field(t,e):!1);if(a&&a instanceof N){try{a.parse(t,e),window.client.emit("action",a,"executed"),I.logger.received(`Button executed: ${t} with value: ${e}`)}catch(n){I.logger.error(`Error executing button "${t}": ${n instanceof Error?n.message:n}`)}return!0}}}catch{return!1}finally{return!1}}}class ${constructor(t){this.prefix="!",this.arguments=!1,this.test=`${this.prefix}${this.name} arg1 arg2`,this.aliases=[],this.permissions=void 0,this.admins=[],window.client instanceof A&&(this.prefix=t.prefix??this.prefix,this.name=t.name,this.description=t.description??this.description,this.arguments=t.arguments??this.arguments,this.run=t.run,this.test=t.test??this.test,this.aliases=t.aliases??this.aliases,this.permissions=t.permissions??this.permissions,this.admins=t.admins??this.admins,window.client.actions.commands.push(this),window.client.emit("action",this,"created"))}run(t,e){}verify(t,e,a){return this.arguments===!0&&(!a||!a.length)?!1:this.admins.some(n=>t.toLocaleLowerCase()===n.toLocaleLowerCase())?!0:this.permissions===!0||typeof this.permissions>"u"||Array.isArray(this.permissions)&&!this.permissions.length?!1:!!(Array.isArray(this.permissions)&&this.permissions.some(n=>e.map(i=>i.toLowerCase()).includes(n.toLowerCase())))}parse(t,e){if(!(window.client instanceof A))return!1;const a=t.replace(this.prefix,"").split(" ").slice(1).map(u=>u.trim());var n="",i=[];const d={bits:"cheer",premium:"prime"};switch(e.provider){case"twitch":{const u=e.data;n=u.event.data.nick||u.event.data.displayName,u.event.data.tags?.badges&&(i=u.event.data.tags.badges.toString().replace(/\/\d+/g,"").split(",").map(h=>h in d?d[h]:h));break}case"youtube":{const u=e.data,f={isVerified:"verified",isChatOwner:"owner",isChatSponsor:"sponsor",isChatModerator:"moderator"};n=u.event.data.nick||u.event.data.displayName,i=Object.entries(u.event.data.authorDetails).filter(([h,l])=>h.startsWith("is")&&l).map(([h])=>f[h]).filter(Boolean);break}case"kick":return!1}const o=this.verify(n,i,a);return o===!0&&this.run.apply(window.client,[a,e]),o}static execute(t){if(!(window.client instanceof A))return!1;const e=t.data;try{if(window.client.actions.commands.length&&window.client.actions.commands.some(a=>e.event.data.text.startsWith(a.prefix))){const a=window.client.actions.commands.find(n=>e.event.data.text.replace(n.prefix,"").split(" ")[0]===n.name);if(a&&a instanceof $)return a.parse(e.event.data.text,t),window.client.emit("action",a,"executed"),I.logger.received(`Command executed: ${e.event.data.text} by ${e.event.data.nick||e.event.data.displayName}`,e),!0}}catch{return!1}finally{return!1}}}class tt extends M{constructor(t){window.client instanceof A&&(super(),this.queue=[],this.priorityQueue=[],this.history=[],this.timeouts=[],this.running=!1,this.duration=void 0,this.loaded=!1,this.duration=t.duration,this.processor=t.processor,window.client.on("load",()=>{this.emit("load"),this.loaded=!0}))}enqueue(t,e={}){const a={isoDate:new Date().toISOString(),isLoop:e?.isLoop??!1,isPriority:e?.isPriority??!1,isImmediate:e?.isImmediate??!1,value:t},n=this.hasItems();return a.isPriority&&a.isImmediate?(this.cancel(),this.priorityQueue.unshift(a)):(a.isPriority?this.priorityQueue:this.queue).push(a),this.running===!1&&n===!1&&this.run(),this.emit("update",this.queue,this.priorityQueue,this.history,this.timeouts),this}async run(){if(!this.hasItems()){this.running=!1;return}this.running=!0,await this.next(),typeof this.duration=="number"&&this.duration>0?this.timeouts.push(setTimeout(()=>this.run(),this.duration)):(this.duration===0||this.duration!==-1&&this.duration!==!1)&&this.run()}async next(){const t=this.priorityQueue.length>0?this.priorityQueue.shift():this.queue.shift();if(!t){this.running=!1;return}try{await this.processor.apply(this,[t.value,this]),this.emit("process",t,this)}catch(a){I.logger.error(`Error during item processing: ${a instanceof Error?a.message:String(a)}`)}this.history.push(t);const e=t.isPriority?this.priorityQueue:this.queue;t.isLoop&&e.push(t)}resume(){return this.running&&this.cancel(),this.hasItems()&&this.run(),this}update(t){return this.queue=t.queue??this.queue,this.priorityQueue=t.priorityQueue??this.priorityQueue,this.history=t.history??this.history,this.hasItems()&&this.running===!1&&window.client?.on("load",()=>this.run()),this}cancel(){this.running&&(this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[],this.running=!1,this.emit("cancel"))}hasItems(){return this.queue.length>0||this.priorityQueue.length>0}on(t,e){return t==="load"&&this.loaded?(e.apply(this),this):(super.on(t,e),this)}}const z={getOverlayStatus:()=>({isEditorMode:!1,muted:!1}),resumeQueue:()=>{},responses:{},sendMessage(m,t){},counters:{get(m){return null}},sanitize(m){return m},cheerFilter(m){return m},setField(m,t,e){},store:{set:function(m,t){this.list[m]=t,localStorage.setItem("SE_API-STORE",JSON.stringify(z.store.list))},get:async function(m){return this.list[m]?this.list[m]:null},list:{}}};function et(){let m=localStorage.getItem("SE_API-STORE")??"",t=m?JSON.parse(m):{};return z.store.list=t,z}window.addEventListener("load",()=>{window.client instanceof A&&(L.start(),(typeof SE_API>"u"||!SE_API)&&(SE_API=et()))}),window.addEventListener("onWidgetLoad",async m=>{const{detail:t}=m;if(window.client instanceof A){const e=window.client;e.fields=t.fieldData,e.session=t.session.data,e.details={...e.details,user:t.channel,currency:t.currency,overlay:t.overlay},t.channel.id&&!t.emulated?await fetch(`https://api.streamelements.com/kappa/v2/channels/${t.channel.id}/`).then(a=>a.json()).then(a=>{if(a.provider)return e.details.provider=a.provider,a.provider;e.details.provider="local"}).catch(()=>{e.details.provider="local"}):e.details.provider="local",e.emit("load",t),e.loaded=!0,e.storage.on("load",()=>{e.storage.add(`avatar.${t.channel.providerId.toLowerCase()}`,{value:t.channel.avatar,timestamp:Date.now(),expire:Date.now()+e.cache.avatar*60*60*1e3})})}}),window.addEventListener("onSessionUpdate",m=>{const{detail:t}=m;if(window.client instanceof A){const e=window.client;e.session=t.session,e.emit("session",t.session)}}),window.addEventListener("onEventReceived",({detail:m})=>{if(window.client instanceof A){var t=m.event?.provider||m.event?.service||m.event?.data?.provider||window.client.details.provider;["kvstore:update","bot:counter","alertService:toggleSound","event:skip","tip-latest","event:test"].some(i=>i===m.listener)&&(t="streamelements");const n={provider:t,data:m};switch(n.provider){case"streamelements":{const i=n.data;switch(i.listener){case"tip-latest":{i.event;break}case"event:skip":{i.event;break}case"event:test":{switch(i.event.listener){case"widget-button":{const d=i.event;N.execute(d.field,d.value);break}case"subscriber-latest":{i.event;break}}break}case"kvstore:update":{const d=i.event;if(U.length){var e=U.find(o=>o.id===d.data.key.replace("customWidget.",""));e&&e.update(d.data.value)}break}case"bot:counter":{i.event;break}case"alertService:toggleSound":{const d=i.event;client.details.overlay.muted=!!d.muted;break}}break}case"twitch":{const i=n.data;switch(i.listener){case"delete-message":{i.event;break}case"delete-messages":{i.event;break}case"message":{i.event;break}case"follower-latest":{i.event;break}case"cheer-latest":{i.event;break}case"subscriber-latest":{(!i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&i.event.isCommunityGift||!i.event.gifted&&i.event.bulkGifted&&!i.event.isCommunityGift)&&i.event;break}case"raid-latest":{i.event;break}}break}case"youtube":{const i=n.data;switch(i.listener){case"message":{i.event,$.execute({provider:"youtube",data:i});break}case"subscriber-latest":{i.event;break}case"sponsor-latest":{i.event,(!i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&i.event.isCommunityGift||!i.event.gifted&&i.event.bulkGifted&&!i.event.isCommunityGift)&&i.event;break}case"superchat-latest":{i.event;break}}break}case"kick":{n.data;break}case"facebook":{n.data;break}}window.client.emit("event",n)}});const I={Client:A,Simulation:L,logger:new _,utils:{findEmotesInText:B,replaceEmotesWithHTML:H},modules:{Button:N,Command:$,EventProvider:M,useStorage:G,useQueue:tt}};typeof window<"u"&&(window.Tixyel=I),O.Tixyel=I,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(P,M){typeof exports=="object"&&typeof module<"u"?M(exports):typeof define=="function"&&define.amd?define(["exports"],M):(P=typeof globalThis<"u"?globalThis:P||self,M(P["@tixyel/streamelements"]={}))})(this,(function(P){"use strict";class M{constructor(){this.registeredEvents={}}emit(t,...e){return(this.registeredEvents[t]||[]).map(n=>n.apply(this,e))}on(t,e){if(typeof e!="function")throw new TypeError("Callback must be a function");return this.registeredEvents[t]||(this.registeredEvents[t]=[]),this.registeredEvents[t].push(e),this}off(t,e){const a=this.registeredEvents[t]||[];return e?(this.registeredEvents[t]=a.filter(n=>n!==e),this):(this.registeredEvents[t]=[],this)}once(t,e){const a=(...n)=>{this.off(t,a),e.apply(this,n)};return this.on(t,a),this}removeAllListeners(t){return this.registeredEvents[t]=[],this}}var U=[];class G extends M{constructor(t){super(),this.id="default",this.loaded=!1,this.SE_API=null,this.id=t.id||this.id,this.data=t.data??{},U.push(this),this.start()}start(){F?.then(t=>{this.SE_API=t,t.store.get(this.id).then(e=>{this.data=e??this.data,this.loaded=!0,this.emit("load",this.data),JSON.stringify(this.data)!==JSON.stringify(e)&&this.emit("update",this.data)}).catch(()=>{this.loaded=!0,this.emit("load",null)})})}save(t=this.data){this.loaded&&this.SE_API&&(this.data=t,this.SE_API.store.set(this.id,this.data),this.emit("update",this.data))}update(t=this.data){this.loaded&&JSON.stringify(this.data)!==JSON.stringify(t)&&(this.data={...this.data,...t},this.save(this.data))}add(t,e){this.loaded&&(G.setByPath(this.data,t,e),this.save(this.data))}clear(){this.loaded&&(this.data={},this.save(this.data))}static setByPath(t,e,a){const n=e.split(".");let i=t;for(let d=0;d<n.length-1;d++)(typeof i[n[d]]!="object"||i[n[d]]==null)&&(i[n[d]]={}),i=i[n[d]];return i[n[n.length-1]]=a,i}on(t,e){return t==="load"&&this.loaded?(e.apply(this,[this.data]),this):(super.on(t,e),this)}}class A extends M{constructor(t){super(),this.id="default",this.fields={},this.loaded=!1,this.actions={commands:[],buttons:[]},this.cache={avatar:30,pronoun:30,emote:30},this.id=t.id||this.id,this.storage=new G({id:this.id,data:{user:{},avatar:{},pronoun:{},emote:{}}}),window.client=this}on(t,e){return t==="load"&&this.loaded?(e.apply(this,[{channel:this.details.user,currency:this.details.currency,fieldData:this.fields,recents:[],session:{data:this.session,settings:{autoReset:!1,calendar:!1,resetOnStart:!1}},overlay:this.details.overlay,emulated:!1}]),this):(super.on(t,e),this)}}var W=(u=>(u.hehim="He/Him",u.sheher="She/Her",u.theythem="They/Them",u.shethem="She/They",u.hethem="He/They",u.heshe="He/She",u.xexem="Xe/Xem",u.faefaer="Fae/Faer",u.vever="Ve/Ver",u.aeaer="Ae/Aer",u.ziehir="Zie/Hir",u.perper="Per/Per",u.eem="E/Em",u.itits="It/Its",u))(W||{});function B(u,t=L.data.emotes){const e=[];return t.forEach(a=>{const n=a.name;let i=0,d=0;for(;i<u.length;){const o=u.indexOf(n,d);if(o===-1)break;const l=o>0?u[o-1]:" ",f=o+n.length<u.length?u[o+n.length]:" ";/\s/.test(l)&&/\s/.test(f)&&e.push({...a,start:o,end:o+n.length}),d=o+1}}),e.sort((a,n)=>a.start-n.start)}function H(u,t){if(!t.length)return u;let e="",a=0;return t.forEach(n=>{e+=u.substring(a,n.start);const i=n.urls[4]||n.urls[3]||n.urls[2]||n.urls[1];e+=`<img src="${i}" alt="${n.name}" class="emote" style="width: auto; height: 1em; vertical-align: middle;" />`,a=n.end}),e+=u.substring(a),e}async function q(u=[],t="twitch"){if(!Array.isArray(u)&&typeof u=="string"&&(u=u.split(",").map(d=>d.trim())),!u||!u.length){var e=L.rand.number(1,3);for await(const d of Array.from({length:e},()=>"")){var a=L.rand.array(Object.keys(L.data.badges))[0];!u.includes(a)&&Array.isArray(u)?u.push(a):u=[a]}}var n;switch(t){case"twitch":{n={keys:Array.from(u).filter(d=>d in L.data.badges),badges:Array.from(u).slice(0,3).map(d=>L.data.badges[d]).filter(Boolean)};break}case"youtube":{var i={verified:{isVerified:!1},broadcaster:{isChatOwner:!1},host:{isChatOwner:!1},sponsor:{isChatSponsor:!1},subscriber:{isChatSponsor:!1},moderator:{isChatModerator:!1}};n=Object.entries(u).reduce((d,[o])=>(o in i&&Object.assign(d,i[o]),d),{isVerified:!1,isChatOwner:!1,isChatSponsor:!1,isChatModerator:!1});break}}return n}const V=["https://static-cdn.jtvnw.net/user-default-pictures-uv/13e5fa74-defa-11e9-809c-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/dbdc9198-def8-11e9-8681-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/998f01ae-def8-11e9-b95c-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/de130ab0-def7-11e9-b668-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/ebe4cd89-b4f4-4cd9-adac-2f30151b4209-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/215b7342-def9-11e9-9a66-784f43822e80-profile_image-300x300.png","https://static-cdn.jtvnw.net/user-default-pictures-uv/ead5c8b2-a4c9-4724-b1dd-9f00b46cbd3d-profile_image-300x300.png"],J={"100 bits":{type:"100 bits",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/09d93036-e7ce-431c-9a9e-7044297133f2/3",description:"100 bits badge"},"no audio":{type:"no audio",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/aef2cd08-f29b-45a1-8c12-d44d7fd5e6f0/3",description:"Individuals with unreliable or no sound can select this badge"},"no video":{type:"no video",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/199a0dba-58f3-494e-a7fc-1fa0a1001fb8/3",description:"Individuals with unreliable or no video can select this badge"},bot:{type:"bot",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/df9095f6-a8a0-4cc2-bb33-d908c0adffb8/3",description:"Twitch bot"},"twitch staff":{type:"twitch staff",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/d97c37bd-a6f5-4c38-8f57-4e4bef88af34/3",description:"Twitch Staff"},admins:{type:"admins",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/9ef7e029-4cdf-4d4d-a0d5-e2b3fb2583fe/3",description:"Admins"},artist:{type:"artist",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/4300a897-03dc-4e83-8c0e-c332fee7057f/3",description:"Artist"},"game developer":{type:"game developer",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/85856a4a-eb7d-4e26-a43e-d204a977ade4/3",description:"Game Developer"},prime:{type:"prime",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/a1dd5073-19c3-4911-8cb4-c464a7bc1510/3",description:"Prime"},turbo:{type:"turbo",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/bd444ec6-8f34-4bf9-91f4-af1e3428d80f/3",description:"Turbo"},subscriber:{type:"subscriber",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/5d9f2208-5dd8-11e7-8513-2ff4adfae661/3",description:"Subscriber"},broadcaster:{type:"broadcaster",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/5527c58c-fb7d-422d-b71b-f309dcb85cc1/3",description:"Broadcaster"},verified:{type:"verified",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/d12a2e27-16f6-41d0-ab77-b780518f00a3/3",description:"Verified"},moderator:{type:"moderator",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/3267646d-33f0-4b17-b3df-f923a41db1d0/3",description:"Moderator"},vip:{type:"vip",version:"1",url:"https://static-cdn.jtvnw.net/badges/v1/b817aba4-fad8-49e2-b88a-7cc744dfa6ec/3",description:"VIP"}},K=Object.values([{type:"twitch",name:"TheIlluminati",id:"145315",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/145315/static/dark/3.0"},start:0,end:13},{type:"twitch",name:"BrainSlug",id:"115233",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/115233/static/dark/3.0"},start:14,end:23},{type:"twitch",name:"imGlitch",id:"112290",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112290/static/dark/3.0"},start:24,end:32},{type:"twitch",name:"TakeNRG",id:"112292",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112292/static/dark/3.0"},start:33,end:40},{type:"twitch",name:"DxCat",id:"110734",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/110734/static/dark/3.0"},start:41,end:46},{type:"twitch",name:"VoHiYo",id:"81274",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/81274/static/dark/3.0"},start:47,end:53},{type:"twitch",name:"DoritosChip",id:"102242",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/102242/static/dark/3.0"},start:54,end:65},{type:"twitch",name:"KomodoHype",id:"81273",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/81273/static/dark/3.0"},start:66,end:76},{type:"twitch",name:"duDudu",id:"62834",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/62834/static/dark/3.0"},start:77,end:83},{type:"twitch",name:"CoolCat",id:"58127",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/58127/static/dark/3.0"},start:84,end:91},{type:"twitch",name:"KappaPride",id:"55338",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/55338/static/dark/3.0"},start:92,end:102},{type:"twitch",name:"BloodTrail",id:"69",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/69/static/dark/3.0"},start:103,end:113},{type:"twitch",name:"PunchTrees",id:"47",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/47/static/dark/3.0"},start:114,end:124},{type:"twitch",name:"SSSsss",id:"46",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/46/static/dark/3.0"},start:125,end:131},{type:"twitch",name:"Kappa",id:"25",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/25/static/dark/3.0"},start:132,end:137},{type:"twitch",name:"MrDestructoid",id:"28",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/28/static/dark/3.0"},start:138,end:151},{type:"twitch",name:"<3",id:"9",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/9/static/dark/3.0"},start:152,end:154},{type:"twitch",name:"HSWP",id:"446979",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/446979/static/dark/3.0"},start:155,end:159},{type:"twitch",name:"Shush",id:"emotesv2_819621bcb8f44566a1bd8ea63d06c58f",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_819621bcb8f44566a1bd8ea63d06c58f/static/dark/3.0"},start:160,end:165},{type:"twitch",name:"IronmouseLuv",id:"emotesv2_54c53ae67ad746d2bc866b6fc779183c",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_54c53ae67ad746d2bc866b6fc779183c/static/dark/3.0"},start:166,end:178},{type:"twitch",name:"KPOPTT",id:"304047269",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304047269/default/dark/3.0"},start:0,end:5},{type:"twitch",name:"FrogPonder",id:"emotesv2_a3cdcbfcae9b41bb8215b012362eea35",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_a3cdcbfcae9b41bb8215b012362eea35/default/dark/3.0"},start:7,end:16},{type:"twitch",name:"HypeCheer",id:"emotesv2_dd4f4f9cea1a4039ad3390e20900abe4",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dd4f4f9cea1a4039ad3390e20900abe4/default/dark/3.0"},start:18,end:26},{type:"twitch",name:"HypeFail",id:"emotesv2_0330a84e75ad48c1821c1d29a7dadd4d",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_0330a84e75ad48c1821c1d29a7dadd4d/default/dark/3.0"},start:28,end:35},{type:"twitch",name:"HypePopcorn",id:"emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_7b8e74be7bd64601a2608c2ff5f6eb7a/default/dark/3.0"},start:37,end:47},{type:"twitch",name:"TransgenderPride",id:"307827377",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/static/dark/3.0"},start:49,end:65},{type:"twitch",name:"PansexualPride",id:"307827370",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/static/dark/3.0"},start:66,end:80},{type:"twitch",name:"NonbinaryPride",id:"307827356",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/static/dark/3.0"},start:81,end:95},{type:"twitch",name:"LesbianPride",id:"307827340",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/static/dark/3.0"},start:96,end:108},{type:"twitch",name:"IntersexPride",id:"307827332",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/static/dark/3.0"},start:109,end:122},{type:"twitch",name:"GenderFluidPride",id:"307827326",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/static/dark/3.0"},start:123,end:139},{type:"twitch",name:"GayPride",id:"307827321",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/static/dark/3.0"},start:140,end:148},{type:"twitch",name:"BisexualPride",id:"307827313",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/static/dark/3.0"},start:149,end:162},{type:"twitch",name:"AsexualPride",id:"307827267",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/static/dark/3.0"},start:163,end:175},{type:"twitch",name:"PogChamp",id:"305954156",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/static/dark/3.0"},start:176,end:184},{type:"twitch",name:"GlitchCat",id:"304486301",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/static/dark/3.0"},start:185,end:194},{type:"twitch",name:"SoonerLater",id:"2113050",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/2113050/static/dark/3.0"},start:195,end:206},{type:"twitch",name:"FBCatch",id:"1441281",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1441281/static/dark/3.0"},start:207,end:214},{type:"twitch",name:"FBBlock",id:"1441276",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1441276/static/dark/3.0"},start:215,end:222},{type:"twitch",name:"PixelBob",id:"1547903",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/1547903/static/dark/3.0"},start:223,end:231},{type:"twitch",name:"LUL",id:"425618",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/425618/static/dark/3.0"},start:232,end:235},{type:"twitch",name:"DarkMode",id:"461298",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/461298/static/dark/3.0"},start:236,end:244},{type:"twitch",name:"PopCorn",id:"724216",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/724216/static/dark/3.0"},start:245,end:252},{type:"twitch",name:"EarthDay",id:"959018",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/959018/static/dark/3.0"},start:253,end:261},{type:"twitch",name:"TwitchUnity",id:"196892",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/196892/static/dark/3.0"},start:262,end:273},{type:"twitch",name:"Squid4",id:"191767",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191767/static/dark/3.0"},start:274,end:280},{type:"twitch",name:"Squid3",id:"191764",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191764/static/dark/3.0"},start:281,end:287},{type:"twitch",name:"Squid2",id:"191763",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191763/static/dark/3.0"},start:288,end:294},{type:"twitch",name:"Squid1",id:"191762",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191762/static/dark/3.0"},start:295,end:301},{type:"twitch",name:"CrreamAwk",id:"191313",gif:!1,animated:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/191313/static/dark/3.0"},start:302,end:311},{type:"twitch",name:"DinoDance",id:"emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7",gif:!0,animated:!0,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dcd06b30a5c24f6eb871e8f5edbd44f7/animated/dark/3.0"},start:46,end:55},{type:"twitch",name:"PopNemo",id:"emotesv2_5d523adb8bbb4786821cd7091e47da21",gif:!0,animated:!0,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_5d523adb8bbb4786821cd7091e47da21/animated/dark/3.0"},start:56,end:63},{type:"twitch",name:"TransgenderPride",id:"307827377",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827377/default/dark/3.0"},start:0,end:15},{type:"twitch",name:"PansexualPride",id:"307827370",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827370/default/dark/3.0"},start:17,end:30},{type:"twitch",name:"NonbinaryPride",id:"307827356",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827356/default/dark/3.0"},start:32,end:45},{type:"twitch",name:"LesbianPride",id:"307827340",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827340/default/dark/3.0"},start:47,end:58},{type:"twitch",name:"IntersexPride",id:"307827332",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827332/default/dark/3.0"},start:60,end:72},{type:"twitch",name:"GenderFluidPride",id:"307827326",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827326/default/dark/3.0"},start:74,end:89},{type:"twitch",name:"GayPride",id:"307827321",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827321/default/dark/3.0"},start:91,end:98},{type:"twitch",name:"BisexualPride",id:"307827313",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827313/default/dark/3.0"},start:100,end:112},{type:"twitch",name:"AsexualPride",id:"307827267",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/307827267/default/dark/3.0"},start:114,end:125},{type:"twitch",name:"PogChamp",id:"305954156",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/305954156/default/dark/3.0"},start:127,end:134},{type:"twitch",name:"GlitchCat",id:"304486301",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/304486301/default/dark/3.0"},start:136,end:144},{type:"twitch",name:"DarkMode",id:"461298",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/461298/default/dark/3.0"},start:146,end:153},{type:"twitch",name:"LUL",id:"425618",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/425618/default/dark/3.0"},start:155,end:157},{type:"twitch",name:"TheIlluminati",id:"145315",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/145315/default/dark/3.0"},start:159,end:171},{type:"twitch",name:"imGlitch",id:"112290",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/112290/default/dark/3.0"},start:173,end:180},{type:"twitch",name:"DoritosChip",id:"102242",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/102242/default/dark/3.0"},start:182,end:192},{type:"twitch",name:"SSSsss",id:"46",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/46/default/dark/3.0"},start:194,end:199},{type:"twitch",name:"PunchTrees",id:"47",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/47/default/dark/3.0"},start:201,end:210},{type:"twitch",name:"BloodTrail",id:"69",gif:!1,urls:{1:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/1.0",2:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/2.0",4:"https://static-cdn.jtvnw.net/emoticons/v2/69/default/dark/3.0"},start:223,end:232},{type:"7tv",name:"CookieTime",id:"635b0184ea9ce7391cbf77d6",gif:!0,animated:!0,urls:{1:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/1x.webp",2:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/2x.webp",3:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/3x.webp",4:"https://cdn.7tv.app/emote/635b0184ea9ce7391cbf77d6/4x.webp"},start:0,end:10,coords:{x:0,y:0}},{type:"bttv",name:"catJAM",id:"5f1b0186cf6d2144653d2970",gif:!0,animated:!0,urls:{1:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/1x",2:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/2x",4:"https://cdn.betterttv.net/emote/5f1b0186cf6d2144653d2970/3x"},start:0,end:6,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:":tf:",id:"54fa8f1401e468494b85b537",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/1x",2:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/2x",4:"https://cdn.betterttv.net/emote/54fa8f1401e468494b85b537/3x"},start:7,end:11,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"AngelThump",id:"566ca1a365dbbdab32ec055b",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/1x",2:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/2x",4:"https://cdn.betterttv.net/emote/566ca1a365dbbdab32ec055b/3x"},start:12,end:22,coords:{x:0,y:0,width:334,height:112}},{type:"bttv",name:"ariW",id:"56fa09f18eff3b595e93ac26",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/1x",2:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/2x",4:"https://cdn.betterttv.net/emote/56fa09f18eff3b595e93ac26/3x"},start:23,end:27,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"BroBalt",id:"54fbf00a01abde735115de5c",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/1x",2:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/2x",4:"https://cdn.betterttv.net/emote/54fbf00a01abde735115de5c/3x"},start:28,end:35,coords:{x:0,y:0,width:184,height:120}},{type:"bttv",name:"bttvNice",id:"54fab7d2633595ca4c713abf",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/1x",2:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/2x",4:"https://cdn.betterttv.net/emote/54fab7d2633595ca4c713abf/3x"},start:36,end:44,coords:{x:0,y:0,width:168,height:112}},{type:"bttv",name:"bUrself",id:"566c9f3b65dbbdab32ec052e",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/1x",2:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/2x",4:"https://cdn.betterttv.net/emote/566c9f3b65dbbdab32ec052e/3x"},start:45,end:52,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"c!",id:"6468f7acaee1f7f47567708e",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/1x",2:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/2x",4:"https://cdn.betterttv.net/emote/6468f7acaee1f7f47567708e/3x"},start:53,end:55,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"CandianRage",id:"54fbf09c01abde735115de61",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/1x",2:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/2x",4:"https://cdn.betterttv.net/emote/54fbf09c01abde735115de61/3x"},start:56,end:67,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"CiGrip",id:"54fa8fce01e468494b85b53c",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/1x",2:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/2x",4:"https://cdn.betterttv.net/emote/54fa8fce01e468494b85b53c/3x"},start:68,end:74,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"ConcernDoge",id:"566c9f6365dbbdab32ec0532",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/1x",2:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/2x",4:"https://cdn.betterttv.net/emote/566c9f6365dbbdab32ec0532/3x"},start:75,end:86,coords:{x:0,y:0,width:101,height:112}},{type:"bttv",name:"CruW",id:"55471c2789d53f2d12781713",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/1x",2:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/2x",4:"https://cdn.betterttv.net/emote/55471c2789d53f2d12781713/3x"},start:87,end:91,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"cvHazmat",id:"5e76d338d6581c3724c0f0b2",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/1x",2:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/2x",4:"https://cdn.betterttv.net/emote/5e76d338d6581c3724c0f0b2/3x"},start:92,end:100,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"D:",id:"55028cd2135896936880fdd7",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/1x",2:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/2x",4:"https://cdn.betterttv.net/emote/55028cd2135896936880fdd7/3x"},start:101,end:103,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"haHAA",id:"555981336ba1901877765555",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/555981336ba1901877765555/1x",2:"https://cdn.betterttv.net/emote/555981336ba1901877765555/2x",4:"https://cdn.betterttv.net/emote/555981336ba1901877765555/3x"},start:104,end:109,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"LuL",id:"567b00c61ddbe1786688a633",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/1x",2:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/2x",4:"https://cdn.betterttv.net/emote/567b00c61ddbe1786688a633/3x"},start:110,end:113,coords:{x:0,y:0,width:112,height:112}},{type:"bttv",name:"DuckerZ",id:"573d38b50ffbf6cc5cc38dc9",gif:!1,animated:!1,urls:{1:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/1x",2:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/2x",4:"https://cdn.betterttv.net/emote/573d38b50ffbf6cc5cc38dc9/3x"},start:114,end:121,coords:{x:0,y:0,width:149,height:112}},{type:"ffz",name:"CatBag",id:"25927",gif:!1,animated:!1,urls:{1:"https://cdn.frankerfacez.com/emote/25927/1",2:"https://cdn.frankerfacez.com/emote/25927/2",4:"https://cdn.frankerfacez.com/emote/25927/4"},start:122,end:128,coords:{x:0,y:0,width:143,height:128}}]).reduce((u,t)=>(u.some(e=>e.name===t.name)||u.push({...t,start:0,end:0}),u),[]),Q=["Hello everyone!","PogChamp","This stream is amazing!","catJAM catJAM catJAM","LUL that was funny","GG!","First time here, loving it!","DinoDance","Can we get some hype in chat?","TransgenderPride PansexualPride NonbinaryPride","POGGERS","I just followed! PogChamp","Great gameplay btw","LUL LUL LUL","This is so wholesome AngelThump","catJAM vibing","haHAA","Wait what just happened? D:","GlitchCat GlitchCat","Best stream on Twitch right now!","DarkMode gang where you at?","PogChamp PogChamp PogChamp PogChamp","Anyone else eating? DoritosChip","I love this community!","TheIlluminati confirmed","bUrself be yourself!","CookieTime nom nom","imGlitch technical difficulties","This music is fire catJAM","bttvNice","LesbianPride GayPride BisexualPride","SSSsss Minecraft time","PopNemo","Going to bed, good night everyone!","Just got here, what did I miss?",":tf: trollface","ariW wave","BroBalt nice one","AsexualPride IntersexPride GenderFluidPride","This chat is moving so fast!","CandianRage","PunchTrees PunchTrees","CiGrip","ConcernDoge hmm","CruW salute","cvHazmat stay safe","DuckerZ quack","BloodTrail hunting time","CatBag kitty!","c! poggers"],Z=["Local","Tixyel","Urie_s2","itzzcatt","BeniArts","Cupidiko","shy_madeit"],X=["Filiz","Astrid","Tatyana","Maxim","Carmen","Ines","Cristiano","Vitoria","Ricardo","Maja","Jan","Jacek","Ewa","Ruben","Lotte","Liv","Seoyeon","Takumi","Mizuki","Giorgio","Carla","Bianca","Karl","Dora","Mathieu","Celine","Chantal","Penelope","Miguel","Mia","Enrique","Conchita","Geraint","Salli","Matthew","Kimberly","Kendra","Justin","Joey","Joanna","Ivy","Raveena","Aditi","Emma","Brian","Amy","Russell","Nicole","Vicki","Marlene","Hans","Naja","Mads","Gwyneth","Zhiyu","Tracy","Danny","Huihui","Yaoyao","Kangkang","HanHan","Zhiwei","Asaf","An","Stefanos","Filip","Ivan","Heidi","Herena","Kalpana","Hemant","Matej","Andika","Rizwan","Lado","Valluvar","Linda","Heather","Sean","Michael","Karsten","Guillaume","Pattara","Jakub","Szabolcs","Hoda","Naayf"],Y=[],_=["1000","2000","3000","prime"],s=class s{static fields(t){const e={from:"main",endsWith:[],ignore:[],replace:{},subgroup:!1,template:"• {key}",subgroupTemplate:"★ {key}",settings:{types:[[["size","width","number","gap","duration"],"number"],[["options","dropdown","weight"],"dropdown"],[["range","radius"],"slider"],[["color","background"],"colorpicker"],[["font-family","font","family"],"googleFont"]],addons:[[["slider","radius"],{step:1,min:0,max:"inherit"}],[["options","dropdown"],{options:{}}],[["weight"],{options:{100:"Thin",200:"Extra Light",300:"Light",400:"Regular",500:"Medium",600:"Semi Bold",700:"Bold",800:"Extra Bold",900:"Black"}}]],transforms:[[["size","width","number","gap","duration"],c=>parseFloat(String(c))],[["font-family","font","family"],c=>c],[["range","radius"],c=>parseFloat(String(c))],[["options","dropdown"],c=>c],[["weight"],c=>c],[["color","background"],c=>c]],labels:[[["font-size"]," • In pixels"],[["font-radius"]," • In pixels"]]}};function a(c){return{...e,...c,endsWith:Array.isArray(c.endsWith)?c.endsWith:e.endsWith,ignore:Array.isArray(c.ignore)?c.ignore:e.ignore,replace:{...e.replace,...c.replace??{}},settings:{types:Array.isArray(c.settings?.types)?c.settings.types:e.settings.types,addons:Array.isArray(c.settings?.addons)?c.settings.addons:e.settings.addons,transforms:Array.isArray(c.settings?.transforms)?c.settings.transforms:e.settings.transforms,labels:Array.isArray(c.settings?.labels)?c.settings.labels:e.settings.labels},subgroup:c.subgroup??e.subgroup,template:c.template??e.template,subgroupTemplate:c.subgroupTemplate??e.subgroupTemplate,from:c.from??e.from}}const n=a(t),d=Array.from(document.styleSheets).filter(({href:c})=>!c||c.startsWith(window.location.origin)).reduce((c,{cssRules:p})=>(p&&Array.from(p).forEach(v=>{v instanceof CSSStyleRule&&v.selectorText===n.from&&Array.from(v.style).some(b=>b.startsWith("--"))&&Array.from(v.style).filter(b=>b.startsWith("--")).forEach(b=>{c[b]=v.style.getPropertyValue(b).trim()})}),c),{}),o=Object.entries(d).filter(([c])=>n.endsWith.some(p=>c.toLowerCase().endsWith(p.toLowerCase())&&!c.includes("-options-"))).filter(([c])=>!n.ignore.some(p=>c.toLowerCase()===p.toLowerCase())).reduce((c,[p,v])=>(c[p.replace("--","")]=String(n.replace?.[p]??v),c),{});let l=[];const f=Object.entries(o).reduce((c,[p,v])=>{let b=n.settings.types.find(([g])=>g.some(y=>p.toLowerCase().includes(y)))?.[1]||"text",x=n.settings.transforms.find(([g])=>g.some(y=>p.toLowerCase().includes(y)))?.[1]||(g=>g),m={type:"text",label:n.settings.labels.find(([g])=>g.some(y=>p.toLowerCase().includes(y)))?.[1]||"",...n.settings.addons.find(([g])=>g.some(y=>p.toLowerCase().includes(y)))?.[1]||{}};["min","max","step","label","type"].forEach(g=>{const y=d[`--${p}-${g}`];y&&y.length&&(m[g]=isNaN(parseFloat(y))?String(y).replace(/^['"]|['"]$/g,""):String(parseFloat(y)))});let w=p.replace(/-(size|color|weight|width|height|gap|duration|radius|amount)$/g,"").replace(/-([a-z])/g,(g,y)=>y.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase().trim(),k=Object.keys(o).filter(g=>g.startsWith(w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)));n.subgroup&&!c[`${w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)}-subgroup`]&&k.length>1&&!l.includes(p)&&(l.push(...k),c[`${w.replace(/[A-Z]/g,"-$&").replaceAll(" ","-").toLowerCase().slice(1)}-subgroup`]={type:"hidden",label:n.subgroupTemplate.replaceAll("{key}",s.string.capitalize(w))});let E=s.string.capitalize(p.replace(/-([a-z])/g,(g,y)=>y.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase());v=x(v)??v;const S=(()=>{const g=Object.entries(d).filter(([y])=>y.startsWith(`--${p}-options-`)).reduce((y,[D,C])=>{const R=D.replace(`--${p}-options-`,"");return R&&(y[String(C)]=s.string.capitalize(R.replace(/-([a-z])/g,(O,nt)=>nt.toUpperCase()).replace(/[A-Z]/g," $&").toLowerCase())),y},{});return Object.keys(g).length?g:null})();return S&&(b="dropdown",m.options=S,v=String(v)),Object.entries(m).forEach(([g,y])=>{[!1,"inherit","auto",null].includes(y)&&(m[g]=v)}),c[p]={type:m.type||b,label:n.template.toString().replaceAll("{key}",s.string.capitalize(E)+m.label),value:v,min:m.min,max:m.max,step:m.step,options:m.options},c},{}),h=Object.entries(f).reduce((c,[p,v])=>{const b=v?.label?.includes("undefined"),x=!["hidden","button"].includes(v.type)&&v.value===void 0;return(b||x)&&(c[p]=v),c},{});if(Object.keys(h).length)throw I.logger.error("Simulation.fields: Detected errors in generated fields:",h),new Error("Error while processing fields");return f}static async start(){const t={fields:["fields.json","cf.json","field.json","customfields.json"].find(a=>{try{return new URL("./"+a,window.location.href),!0}catch{return!1}}),data:["data.json","fielddata.json","fd.json","DATA.json"].find(a=>{try{return new URL("./"+a,window.location.href),!0}catch{return!1}})},e=await fetch("./"+(t.data??"data.json"),{cache:"no-store"}).then(a=>a.json()).catch(()=>({}));await fetch("./"+(t.fields??"fields.json"),{cache:"no-store"}).then(a=>a.json()).then(async a=>{const n=Object.entries(a).filter(([d,{value:o}])=>o!=null).reduce((d,[o,{value:l}])=>(e&&e[o]!==void 0&&(l=e[o]),d[o]=l,d),{...e}),i=await s.generate.event.onWidgetLoad(n,await s.generate.session.get());window.dispatchEvent(new CustomEvent("onWidgetLoad",{detail:i}))})}};s.data={names:Z,messages:Q,tiers:_,avatars:V,items:Y,emotes:K,badges:J,pronouns:W,tts:X},s.color={opacity(t=100,e){e=e.length>7?e.substring(0,6):e,t=t>1?t/100:t;let a=Math.round(Math.min(Math.max(t,0),1)*255).toString(16).toLowerCase();return a=a.padStart(2,"0"),e+a},getOpacity(t){if(!t.startsWith("#")||t.length<=7)return{opacity:100,hex:t};var e=t.slice(-2),a=parseInt(e,16)/255,n=Math.round(a*100),i=t.length>7?t.slice(0,7):t;return{opacity:n,color:i}},validate(t){if(typeof t!="string"||!t.length)return!1;const e=t.trim();return/^#([A-Fa-f0-9]{3}){1,2}$/.test(e)||/^#([A-Fa-f0-9]{4}|[A-Fa-f0-9]{8})$/.test(e)?"hex":/^rgb\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)$/.test(e)?"rgb":/^rgba\(\s*(?:\d{1,3}\s*,\s*){3}(?:0|1|0?\.\d+)\s*\)$/.test(e)?"rgba":/^hsl\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*\)$/.test(e)?"hsl":/^hsla\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*,\s*(?:0|1|0?\.\d+)\s*\)$/.test(e)?"hsla":["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent"].includes(e.toLowerCase())?"css-color-name":!1}},s.rand={color(t="hex"){switch(t){default:case"hex":return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`;case"hexa":{const a=`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`,n=Math.floor(Math.random()*256).toString(16).padStart(2,"0");return a+n}case"rgb":{const a=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256);return`rgb(${a}, ${n}, ${i})`}case"rgba":{const a=Math.floor(Math.random()*256),n=Math.floor(Math.random()*256),i=Math.floor(Math.random()*256),d=Math.random().toFixed(2);return`rgba(${a}, ${n}, ${i}, ${d})`}case"hsl":{const a=Math.floor(Math.random()*361),n=Math.floor(Math.random()*101),i=Math.floor(Math.random()*101);return`hsl(${a}, ${n}%, ${i}%)`}case"hsla":{const a=Math.floor(Math.random()*361),n=Math.floor(Math.random()*101),i=Math.floor(Math.random()*101),d=Math.random().toFixed(2);return`hsla(${a}, ${n}%, ${i}%, ${d})`}case"css-color-name":{var e=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent"];return this.array(e)[0]}}},number(t,e,a=0){t>e&&([t,e]=[e,t]);const n=Math.random()*(e-t)+t;return a?Number(n.toFixed(a)):Math.round(n)},boolean(t=.5){return Math.random()>t},string(t,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let a="";for(let n=0;n<t;n++)a+=e.charAt(Math.floor(Math.random()*e.length));return a},array(t){const e=this.number(0,t.length-1);return[t[e],e]},date(t=365){const a=Date.now()-this.number(0,t*24*60*60*1e3);return new Date(a).toISOString()},uuid(){return window.crypto&&typeof crypto?.randomUUID=="function"?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+t/4).toString(16))}},s.string={async replace(t,e,a){const n=[];t.replace(e,(d,...o)=>{const l=typeof a=="function"?a(d,...o):d;return n.push(Promise.resolve(l)),d});const i=await Promise.all(n);return t.replace(e,()=>i.shift()??"")},capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},compose(t,e={},a={method:"index",html:!1,modifiers:{},aliases:{}}){const{mergeSpanStyles:n}=s.element;e.skip="<br/>",e.newline="<br/>";const i=Object.entries(s.object.flatten(e)).reduce((r,[m,w])=>{if(r[m]=String(w),["username","name","nick","nickname","sender"].some(k=>m===k)){const k=r?.username||r?.name||r?.nick||r?.nickname||r?.sender;r.username=r.username||k,r.usernameAt=`@${r.username}`,r.name=r.name||k,r.nick=r.nick||k,r.nickname=r.nickname||k,r.sender=r.sender||k,r.senderAt=`@${r.sender}`}return["amount","count"].some(k=>m===k)&&(r.amount=String(o),r.count=String(r?.count||o)),r.currency=r.currency||window.client?.details.currency.symbol||"$",r.currencyCode=r.currencyCode||window.client?.details.currency.code||"USD",r},{}),d={PLACEHOLDERS:/{([^}]+)}/g,MODIFIERS:/\[(\w+)(:[^=]+)?=([^\]]+)\]/g};var o=parseFloat(i?.amount??i?.count??0);const l={COLOR:(r,m)=>n(m&&s.color.validate(m)?`color: ${m}`:"",r),WEIGHT:(r,m)=>n(m&&!isNaN(parseInt(m))?`font-weight: ${m}`:"",r),BOLD:r=>n("font-weight: bold",r),LIGHT:r=>n("font-weight: lighter",r),STRONG:r=>n("font-weight: bolder",r),ITALIC:r=>n("font-style: italic",r),UNDERLINE:r=>n("text-decoration: underline",r),STRIKETHROUGH:r=>n("text-decoration: line-through",r),SUB:r=>n("vertical-align: sub",r),SUP:r=>n("vertical-align: super",r),LARGER:r=>n("font-size: larger",r),SMALL:r=>n("font-size: smaller",r),SHADOW:(r,m)=>n(`text-shadow: ${m}`,r),SIZE:(r,m)=>n(m?`font-size: ${m}`:"",r)},h={...{BT1:r=>o>1?r:"",BT0:r=>o>0?r:"",ST1:r=>o<1?r:"",ST0:r=>o<0?r:"",UPC:r=>r.toUpperCase(),LOW:r=>r.toLowerCase(),REV:r=>r.split("").reverse().join(""),CAP:r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),FALLBACK:(r,m)=>r.length?r:m??r},...a?.html?l:{},...a.modifiers??{}},c={UPC:["UPPERCASE","UPPER","UPP"],LOW:["LOWERCASE","LOWER","LWC"],REV:["REVERSE","RVS"],CAP:["CAPITALIZE","CAPITAL"],BT1:["BIGGER_THAN_1","GREATER_THAN_1","GT1"],BT0:["BIGGER_THAN_0","GREATER_THAN_0","GT0"],ST1:["SMALLER_THAN_1","LESS_THAN_1","LT1"],ST0:["SMALLER_THAN_0","LESS_THAN_0","LT0"],COLOR:["COLOUR","CLR","HIGHLIGHT"],BOLD:["BOLDEN","B"],STRONG:["STRONGEN","STRONG"],ITALIC:["ITALICIZE","ITALIC","I"],UNDERLINE:["U","INS","INSET","I"],STRIKETHROUGH:["STRIKE","S","DELETE","D"],SUB:["SUBSCRIPT","SUBS"],SUP:["SUPERSCRIPT","SUPS"],LARGER:["LARGER","LG"],SMALL:["SMALLER","SM"],SHADOW:["SHADOW","SHD"],FALLBACK:["FALLBACK","FB"],...a.aliases??{}};function p(r,m,w){const k=Object.entries(c).find(([j,S])=>S.some(g=>g.toUpperCase()===m.toUpperCase())?!0:j.toUpperCase()===m.toUpperCase()),E=k?k[0]:m.toUpperCase();return h[E]?h[E](r,typeof w=="string"?w.trim():null,i):r}function v(r){let m=r,w;for(;(w=d.MODIFIERS.exec(m))!==null;){const[k,E,j,S]=w,g=p(v(S),E,j);m=m.replace(k,g??""),d.MODIFIERS.lastIndex=0}return m}function b(r){let m=0;const w=r.length;function k(j){let S="";for(;m<w;)if(r[m]==="\\")m+1<w?(S+=r[m+1],m+=2):m++;else if(r[m]==="["&&(!j||j!=="["))S+=E();else if(j&&r[m]===j){m++;break}else S+=r[m++];return S}function E(){m++;let j="";for(;m<w&&/[A-Za-z0-9]/.test(r[m]);)j+=r[m++];let S=null;if(r[m]===":"){m++;const y=m;for(;m<w&&r[m]!=="=";)m++;S=r.slice(y,m)}r[m]==="="&&m++;const g=k("]");return p(g,j,S)}return k()}let x=t.replace(d.PLACEHOLDERS,(r,m)=>typeof i[m]=="string"||typeof i[m]=="number"?String(i[m]):m??m);return x=a.method==="loop"?v(x):b(x),x}},s.element={mergeSpanStyles(t,e){const a=e.match(/^<span style="([^"]*)">(.*)<\/span>$/s);if(a){const n=a[1],i=a[2];return`<span style="${[n,t].filter(Boolean).join("; ").replace(/\s*;\s*/g,"; ").trim()}">${i}</span>`}else return`<span style="${t}">${e}</span>`},scale(t,e=0,a=1,n){const{return:i=!1,parent:d,base:o}=n||{},l=d||t.parentElement||document.body;if(!l){I.logger.warn("No parent element found for scaling");return}const f=l.getBoundingClientRect(),h=t.offsetWidth,c=t.offsetHeight;if(h===0||c===0){I.logger.warn("Element has zero width or height, cannot scale");return}const p=f.width*a/h,v=f.height*a/c;let b=o==="width"?p:o==="height"?v:Math.min(p,v);if(e>0){const r=f.width*e/h,m=f.height*e/c,w=Math.max(r,m);b=Math.max(w,b)}const x={width:h*b,height:c*b,scale:b};return i||(t.style.transform=`scale(${b})`,t.style.transformOrigin="center center"),x},splitTextToChars(t,e=0){const n=new DOMParser().parseFromString(t,"text/html");let i=e;function d(f){if(f.nodeType===Node.TEXT_NODE){const c=f.textContent?.split("").map(v=>{const b=document.createElement("span");return b.className="char",b.dataset.index=String(i++),b.textContent=v,i++,b.outerHTML}),p=document.createElement("span");return p.innerHTML=c?.join("")??"",p}else if(f.nodeType===Node.ELEMENT_NODE){const h=f.cloneNode(!1);return f.childNodes.forEach(c=>{const p=d(c);p instanceof Node&&Array.from(p.childNodes).forEach(v=>{h.appendChild(v)})}),h}return f.cloneNode(!0)}const o=n.body,l=document.createElement("div");return o.childNodes.forEach(f=>{const h=d(f);h instanceof Node&&l.appendChild(h)}),l.innerHTML}},s.object={flatten(t,e=""){const a={};for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const i=t[n],d=e?`${e}.${n}`:n;if(i==null){a[d]=String(i);continue}if(i instanceof Date){a[d]=i.toISOString();continue}if(i instanceof Map){i.forEach((o,l)=>{a[`${d}.${l}`]=JSON.stringify(o)});continue}if(Array.isArray(i)){i.forEach((o,l)=>{const f=`${d}:${l}`;typeof o=="object"?Object.assign(a,this.flatten(o,f)):a[f]=String(o)});continue}if(typeof i=="object"){Object.assign(a,this.flatten(i,d));continue}a[d]=String(i)}return a}},s.generate={session:{types:{name:{type:"string",options:s.data.names.filter(t=>t.length)},tier:{type:"string",options:s.data.tiers.filter(t=>t.length)},message:{type:"string",options:s.data.messages.filter(t=>t.length)},item:{type:"array",options:s.data.items},avatar:{type:"string",options:s.data.avatars.filter(t=>t.length)}},available(){const t=this.types;return{follower:{latest:{name:t.name},session:{count:{type:"int",min:50,max:200}},week:{count:{type:"int",min:200,max:1e3}},month:{count:{type:"int",min:1e3,max:3e3}},goal:{amount:{type:"int",min:3e3,max:7e3}},total:{count:{type:"int",min:7e3,max:1e4}},recent:{type:"recent",amount:25,value:{name:t.name,createdAt:{type:"date",range:400}}}},subscriber:{latest:{name:t.name,amount:{type:"int",min:10,max:30},tier:t.tier,message:t.message},"new-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message},"resub-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message},"gifted-latest":{name:t.name,amount:{type:"int",min:10,max:30},message:t.message,tier:t.tier,sender:t.name},session:{count:{type:"int",min:10,max:40}},"new-session":{count:{type:"int",min:10,max:40}},"resub-session":{count:{type:"int",min:10,max:40}},"gifted-session":{count:{type:"int",min:10,max:40}},week:{count:{type:"int",min:40,max:100}},month:{count:{type:"int",min:100,max:200}},goal:{amount:{type:"int",min:200,max:300}},total:{count:{type:"int",min:300,max:400}},points:{amount:{type:"int",min:100,max:400}},"alltime-gifter":{name:t.name,amount:{type:"int",min:300,max:400}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:10,max:30},tier:t.tier,createdAt:{type:"date",range:400}}}},host:{latest:{name:t.name,amount:{type:"int",min:1,max:10}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:1,max:10},createdAt:{type:"date",range:400}}}},raid:{latest:{name:t.name,amount:{type:"int",min:0,max:100}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:0,max:100},createdAt:{type:"date",range:400}}}},charityCampaignDonation:{latest:{name:t.name,amount:{type:"int",min:50,max:150}},"session-top-donation":{name:t.name,amount:{type:"int",min:50,max:200}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:200,max:500}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:500,max:800}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:800,max:1e3}},"session-top-donator":{name:t.name,amount:{type:"int",min:50,max:200}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:200,max:500}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:500,max:800}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:800,max:1e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:50,max:150},createdAt:{type:"date",range:400}}}},cheer:{latest:{name:t.name,amount:{type:"int",min:200,max:800},message:t.message},"session-top-donation":{name:t.name,amount:{type:"int",min:200,max:1e3}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:5e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:5e3,max:12e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:12e3,max:2e4}},"session-top-donator":{name:t.name,amount:{type:"int",min:200,max:1e3}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:5e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:5e3,max:12e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:12e3,max:2e4}},session:{amount:{type:"int",min:200,max:1e3}},week:{amount:{type:"int",min:1e3,max:5e3}},month:{amount:{type:"int",min:5e3,max:12e3}},goal:{amount:{type:"int",min:12e3,max:18e3}},total:{amount:{type:"int",min:18e3,max:2e4}},count:{count:{type:"int",min:200,max:1e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:200,max:800},createdAt:{type:"date",range:400}}}},cheerPurchase:{latest:{name:t.name,amount:{type:"int",min:200,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:200,max:400}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:400,max:800}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:800,max:1500}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:1500,max:2e3}},"session-top-donator":{name:t.name,amount:{type:"int",min:200,max:400}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:400,max:800}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:800,max:1500}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:1500,max:2e3}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:200,max:400},createdAt:{type:"date",range:400}}}},superchat:{latest:{name:t.name,amount:{type:"int",min:100,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:2e3,max:2500}},"session-top-donator":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:2e3,max:2500}},session:{amount:{type:"int",min:100,max:500}},week:{amount:{type:"int",min:500,max:1e3}},month:{amount:{type:"int",min:1e3,max:2e3}},goal:{amount:{type:"int",min:2e3,max:2300}},total:{amount:{type:"int",min:2300,max:2500}},count:{count:{type:"int",min:100,max:500}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:100,max:400},createdAt:{type:"date",range:400}}}},hypetrain:{latest:{name:t.name,amount:{type:"int",min:0,max:100},active:{type:"int",min:0,max:1},level:{type:"int",min:5,max:10},levelChanged:{type:"int",min:0,max:5},_type:{type:"array",options:["follower","subscriber","cheer","donation"]}},"level-goal":{amount:{type:"int",min:0,max:100}},"level-progress":{amount:{type:"int",min:0,max:100},percent:{type:"int",min:0,max:100}},total:{amount:{type:"int",min:0,max:100}},"latest-top-contributors":{type:"recent",amount:25,value:{name:t.name}}},"channel-points":{latest:{name:t.name,amount:{type:"int",min:0,max:100},message:t.message,redemption:{type:"array",options:["Reward 1","Reward 2","Reward 3"]}}},tip:{latest:{name:t.name,amount:{type:"int",min:100,max:400}},"session-top-donation":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donation":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donation":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donation":{name:t.name,amount:{type:"int",min:2e3,max:2500}},"session-top-donator":{name:t.name,amount:{type:"int",min:100,max:500}},"weekly-top-donator":{name:t.name,amount:{type:"int",min:500,max:1e3}},"monthly-top-donator":{name:t.name,amount:{type:"int",min:1e3,max:2e3}},"alltime-top-donator":{name:t.name,amount:{type:"int",min:2e3,max:2500}},session:{amount:{type:"int",min:100,max:500}},week:{amount:{type:"int",min:500,max:1e3}},month:{amount:{type:"int",min:1e3,max:2e3}},goal:{amount:{type:"int",min:2e3,max:2300}},total:{amount:{type:"int",min:2300,max:2500}},count:{count:{type:"int",min:100,max:500}},recent:{type:"recent",amount:25,value:{name:t.name,amount:{type:"int",min:100,max:400},createdAt:{type:"date",range:400}}}},merch:{latest:{name:t.name,amount:{type:"int",min:0,max:100},items:t.item},"goal-orders":{amount:{type:"int",min:0,max:100}},"goal-items":{amount:{type:"int",min:0,max:100}},"goal-total":{amount:{type:"int",min:0,max:100}},recent:{type:"recent",amount:25,value:{name:t.name}}},purchase:{latest:{name:t.name,amount:{type:"int",min:0,max:100},items:t.item,avatar:t.avatar,message:t.message}}}},async get(){const t=this.available(),e=n=>{const i=l=>{if(!l||!("amount"in l))return[];const f=[];for(let h=0;h<l.amount;h++)f.push(e(l.value));return f.sort((h,c)=>new Date(c.createdAt).getTime()-new Date(h.createdAt).getTime())},d=l=>{const f={};for(const h in l){const c=h.replace("_type","type");f[c]=e(l[h])}return f},o=l=>{if(!l)return l;switch(l.type){case"int":return s.rand.number(l.min,l.max);case"string":return s.rand.array(l.options)[0];case"date":return s.rand.date(l.range);case"array":return s.rand.array(l.options)[0];case"recent":return i(l);default:return l}};return typeof n!="object"||n===null?n:"type"in n&&typeof n.type=="string"?o(n):d(n)};var a=Object.entries(e(t)).reduce((n,[i,d])=>(Object.entries(d).forEach(([o,l])=>n[`${i}-${o}`]=l),n),{});return a}},event:{async onWidgetLoad(t,e,a="USD"){const n={BRL:{code:"BRL",name:"Brazilian Real",symbol:"R$"},USD:{code:"USD",name:"US Dollar",symbol:"$"},EUR:{code:"EUR",name:"Euro",symbol:"€"}};return{channel:{username:"local",apiToken:"",id:"",providerId:"",avatar:""},currency:n[a]??n.USD,fieldData:t,recents:[],session:{data:e,settings:{autoReset:!1,calendar:!1,resetOnStart:!1}},overlay:{isEditorMode:!0,muted:!1},emulated:!0}},async onSessionUpdate(t){return t??=await s.generate.session.get(),{session:t}},async onEventReceived(t="random",e="random",a={}){const n={twitch:["message","follower-latest","cheer-latest","raid-latest","subscriber-latest"],streamelements:["tip-latest"],youtube:["message","superchat-latest","subscriber-latest","sponsor-latest"],kick:[],facebook:[]};switch(t){default:case"random":{var i=s.rand.array(Object.keys(n).filter(g=>n[g].length))[0],d=s.rand.array(n[i])[0];return this.onEventReceived(i,d)}case"twitch":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"message":{var o=a?.name??s.rand.array(s.data.names.filter(y=>y.length))[0],l=a?.message??s.rand.array(s.data.messages.filter(y=>y.length))[0],f=await q(a?.badges??[],t),h=B(l),c=H(l,h),p=a?.color??s.rand.color("hex"),v=a?.userId??s.rand.number(1e7,99999999).toString(),b=Date.now();return{listener:"message",event:{service:t,data:{time:b,tags:{"badge-info":`${f.keys.map(y=>`${y}/${s.rand.number(1,5)}`).join(",")}`,badges:f.keys.join("/1,"),mod:f.keys.includes("moderator")?"1":"0",subscriber:f.keys.includes("subscriber")?"1":"0",turbo:f.keys.includes("turbo")?"1":"0","tmi-sent-ts":b.toString(),"user-id":v,"user-type":"",color:p,"display-name":o,emotes:"","client-nonce":s.rand.string(16),flags:"",id:s.rand.uuid(),"first-msg":"0","returning-chatter":"0"},nick:o.toLowerCase(),displayName:o,displayColor:p,channel:"local",text:l,isAction:!1,userId:v,msgId:s.rand.uuid(),badges:f.badges,emotes:h},renderedText:c}}}case"cheer":case"cheer-latest":{var x=a?.amount??s.rand.number(100,1e4),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0],l=a?.message??s.rand.array(s.data.messages.filter(C=>C.length))[0];return{listener:"cheer-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,message:l,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"cheer",originalEventName:"cheer-latest"}}}case"follower":case"follower-latest":{var r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0];return{listener:"follower-latest",event:{avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"follower",originalEventName:"follower-latest"}}}case"raid":case"raid-latest":{var x=a?.amount??s.rand.number(1,100),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"raid-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"raid",originalEventName:"raid-latest"}}}case"subscriber":case"subscriber-latest":{var m=a?.tier??s.rand.array(["1000","2000","3000"])[0],x=a?.amount??s.rand.number(1,24),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(O=>O.length))[0],w=a?.sender??s.rand.array(s.data.names.filter(O=>O.length&&O!==o))[0],l=a?.message??s.rand.array(s.data.messages.filter(O=>O.length))[0],k={default:{avatar:r,tier:m,playedAsCommunityGift:!1},gift:{sender:w,gifted:!0},community:{message:l,sender:w,bulkGifted:!0},spam:{sender:w,gifted:!0,isCommunityGift:!0}},E=["default","gift","community","spam"],j=a?.subType??s.rand.array(E)[0];return j=E.includes(j)?j:"default",{listener:"subscriber-latest",event:{amount:x,name:o.toLowerCase(),displayName:o,providerId:"",...k.default,...k[j],_id:s.rand.uuid(),sessionTop:!1,type:"subscriber",originalEventName:"subscriber-latest"}}}case"delete-message":return{listener:"delete-message",event:{msgId:a?.id??s.rand.uuid()}};case"delete-messages":return{listener:"delete-messages",event:{userId:a?.id??s.rand.number(1e7,99999999).toString()}}}case"streamelements":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"tip":case"tip-latest":{var x=a?.amount??s.rand.number(100,4e3),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"tip-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"tip",originalEventName:"tip-latest"}}}case"kvstore:update":return{listener:"kvstore:update",event:{data:{key:`customWidget.${a?.key??"sampleKey"}`,value:a?.value??"sampleValue"}}};case"bot:counter":return{listener:"bot:counter",event:{counter:a?.counter??"sampleCounter",value:a?.value??s.rand.number(0,100)}};case"mute":case"unmute":case"alertService:toggleSound":{var S=a?.muted??!client.details.overlay.muted;return{listener:"alertService:toggleSound",event:{muted:S}}}case"skip":case"event:skip":return{listener:"event:skip",event:{}}}case"youtube":switch(e){default:case"random":{var d=s.rand.array(n[t])[0];return this.onEventReceived(t,d)}case"message":{var o=a?.name??s.rand.array(s.data.names.filter(T=>T.length))[0],l=a?.message??s.rand.array(s.data.messages.filter(T=>T.length))[0];const D=await q(a?.badges??[],t);var h=B(l),c=H(l,h),p=a?.color??s.rand.color("hex"),v=a?.userId??s.rand.number(1e7,99999999).toString(),b=Date.now(),r=a?.avatar??s.rand.array(s.data.avatars)[0];return{listener:"message",event:{service:"youtube",data:{kind:"",etag:"",id:"",snippet:{type:"",liveChatId:"",authorChannelId:"local",publishedAt:new Date().toISOString(),hasDisplayContent:!0,displayMessage:l,textMessageDetails:{messageText:l}},authorDetails:{channelId:"local",channelUrl:"",displayName:o,profileImageUrl:r,...D},msgId:s.rand.uuid(),userId:s.rand.uuid(),nick:o.toLowerCase(),badges:[],displayName:o,isAction:!1,time:Date.now(),tags:[],displayColor:s.rand.color("hex"),channel:"local",text:l,avatar:r,emotes:[]},renderedText:l}}}case"subscriber":case"subscriber-latest":{var r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(C=>C.length))[0];return{listener:"subscriber-latest",event:{avatar:r,displayName:o,name:o.toLowerCase(),providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"subscriber",originalEventName:"subscriber-latest"}}}case"superchat":case"superchat-latest":{var x=a?.amount??s.rand.number(100,4e3),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(R=>R.length))[0];return{listener:"superchat-latest",event:{amount:x,avatar:r,name:o.toLowerCase(),displayName:o,providerId:"",_id:s.rand.uuid(),sessionTop:!1,type:"superchat",originalEventName:"superchat-latest"}}}case"sponsor":case"sponsor-latest":{var m=a?.tier??s.rand.array(["1000","2000","3000"])[0],x=a?.amount??s.rand.number(1,24),r=a?.avatar??s.rand.array(s.data.avatars)[0],o=a?.name??s.rand.array(s.data.names.filter(T=>T.length))[0],w=a?.sender??s.rand.array(s.data.names.filter(T=>T.length&&T!==o))[0],l=a?.message??s.rand.array(s.data.messages.filter(T=>T.length))[0],k={default:{avatar:r,tier:m,playedAsCommunityGift:!1},gift:{sender:w,gifted:!0},community:{message:l,sender:w,bulkGifted:!0},spam:{sender:w,gifted:!0,isCommunityGift:!0}},E=["default","gift","community","spam"],j=a?.subType??s.rand.array(E)[0];return j=E.includes(j)?j:"default",{listener:"sponsor-latest",event:{amount:x,name:o.toLowerCase(),displayName:o,providerId:"",...k.default,...k[j],_id:s.rand.uuid(),sessionTop:!1,type:"sponsor",originalEventName:"sponsor-latest"}}}}}}}},s.emulate={twitch:{message(t={}){s.generate.event.onEventReceived("twitch","message",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},follower(t={}){s.generate.event.onEventReceived("twitch","follower-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},raid(t={}){s.generate.event.onEventReceived("twitch","raid-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},cheer(t={}){s.generate.event.onEventReceived("twitch","cheer-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},subscriber(t={}){s.generate.event.onEventReceived("twitch","subscriber-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},streamelements:{tip(t={}){s.generate.event.onEventReceived("streamelements","tip-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},youtube:{message(t={}){s.generate.event.onEventReceived("youtube","message",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},subscriber(t={}){s.generate.event.onEventReceived("youtube","subscriber-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},superchat(t={}){s.generate.event.onEventReceived("youtube","superchat-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})},sponsor(t={}){s.generate.event.onEventReceived("youtube","sponsor-latest",t).then(e=>{e&&s.emulate.send("onEventReceived",e)})}},kick:{},facebook:{},send(t,e){window.dispatchEvent(new CustomEvent(t,{detail:e}))}};let L=s;class tt{constructor(){this.themes=[{name:"error",color:"#721c24",background:"#f8d7da",bold:!0,italic:!1,fontSize:18,template:{before:" ✖ ",after:" "}},{name:"success",color:"#155724",background:"#d4edda",bold:!0,italic:!1,fontSize:18,template:{before:" ✔ ",after:" "}},{name:"alert",color:"#856404",background:"#fff3cd",bold:!0,italic:!1,fontSize:20,template:{before:" ⚠ ",after:" "}},{name:"warn",color:"#856404",background:"#fff3cd",bold:!0,italic:!1,fontSize:20,template:{before:" ⚠ ",after:" "}},{name:"status",color:"#0c5460",background:"#d1ecf1",bold:!0,italic:!1,fontSize:12,template:{before:" · ",after:""}},{name:"received",color:"#E6BBFF",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:" ⬇ ",after:""}},{name:"simple",color:"#f5c6cb",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:"",after:""}},{name:"info",color:"#f6c6cb",background:"transparent",bold:!1,italic:!1,fontSize:14,template:{before:" ℹ ",after:""}}],this.error=()=>{},this.success=()=>{},this.alert=()=>{},this.warn=()=>{},this.status=()=>{},this.received=()=>{},this.simple=()=>{},this.info=()=>{},this.themes.forEach(t=>{const e=[];t.background&&t.background!=="transparent"&&e.push(`background-color: ${t.background}`),t.color&&e.push(`color: ${t.color}`),t.bold&&e.push("font-weight: bold"),t.italic&&e.push("font-style: italic"),t.underline&&e.push("text-decoration: underline"),t.fontSize&&e.push(`font-size: ${t.fontSize}px`);const a="%c",n=(...i)=>{const d=Array.from(i).filter(h=>typeof h=="string"||typeof h=="number"),o=Array.from(i).filter(h=>typeof h!="string"&&typeof h!="number"),l=d.length>0?e.join("; "):null,f=[d.length>0?a+(t.template?.before??"")+d.join(" ")+(t.template?.after??""):null,l,...o].filter(Boolean);return console.log(...f)};this[t.name]=n})}}class N{constructor(t){this.field="button",this.template="button",window.client instanceof A&&(this.field=t.field??this.field,this.template=t.template??this.template,this.run=t.run,window.client.actions.buttons.push(this),window.client.emit("action",this,"created"))}parse(t,e){var a=t.replace(typeof this.field=="string"?this.field:this.template.replace(/\{[^}]*\}/g,"")??"","").trim();try{this.run.apply(window.client,[a.length?a:t??t,e])}catch(n){throw new Error(`Error running button "${this.field}": ${n instanceof Error?n.message:n}`)}return this}static execute(t,e){try{if(!(window.client instanceof A))return!1;if(window.client.actions.buttons.length){const a=window.client.actions.buttons.find(n=>typeof n.field=="string"?n.field===t:typeof n.field=="function"?n.field(t,e):!1);if(a&&a instanceof N){try{a.parse(t,e),window.client.emit("action",a,"executed"),I.logger.received(`Button executed: ${t} with value: ${e}`)}catch(n){I.logger.error(`Error executing button "${t}": ${n instanceof Error?n.message:n}`)}return!0}}}catch{return!1}finally{return!1}}}class ${constructor(t){this.prefix="!",this.arguments=!1,this.test=`${this.prefix}${this.name} arg1 arg2`,this.aliases=[],this.permissions=void 0,this.admins=[],window.client instanceof A&&(this.prefix=t.prefix??this.prefix,this.name=t.name,this.description=t.description??this.description,this.arguments=t.arguments??this.arguments,this.run=t.run,this.test=t.test??this.test,this.aliases=t.aliases??this.aliases,this.permissions=t.permissions??this.permissions,this.admins=t.admins??this.admins,window.client.actions.commands.push(this),window.client.emit("action",this,"created"))}run(t,e){}verify(t,e,a){return this.arguments===!0&&(!a||!a.length)?!1:this.admins.some(n=>t.toLocaleLowerCase()===n.toLocaleLowerCase())?!0:this.permissions===!0||typeof this.permissions>"u"||Array.isArray(this.permissions)&&!this.permissions.length?!1:!!(Array.isArray(this.permissions)&&this.permissions.some(n=>e.map(i=>i.toLowerCase()).includes(n.toLowerCase())))}parse(t,e){if(!(window.client instanceof A))return!1;const a=t.replace(this.prefix,"").split(" ").slice(1).map(l=>l.trim());var n="",i=[];const d={bits:"cheer",premium:"prime"};switch(e.provider){case"twitch":{const l=e.data;n=l.event.data.nick||l.event.data.displayName,l.event.data.tags?.badges&&(i=l.event.data.tags.badges.toString().replace(/\/\d+/g,"").split(",").map(h=>h in d?d[h]:h));break}case"youtube":{const l=e.data,f={isVerified:"verified",isChatOwner:"owner",isChatSponsor:"sponsor",isChatModerator:"moderator"};n=l.event.data.nick||l.event.data.displayName,i=Object.entries(l.event.data.authorDetails).filter(([h,c])=>h.startsWith("is")&&c).map(([h])=>f[h]).filter(Boolean);break}case"kick":return!1}const o=this.verify(n,i,a);return o===!0&&this.run.apply(window.client,[a,e]),o}static execute(t){if(!(window.client instanceof A))return!1;const e=t.data;try{if(window.client.actions.commands.length&&window.client.actions.commands.some(a=>e.event.data.text.startsWith(a.prefix))){const a=window.client.actions.commands.find(n=>e.event.data.text.replace(n.prefix,"").split(" ")[0]===n.name);if(a&&a instanceof $)return a.parse(e.event.data.text,t),window.client.emit("action",a,"executed"),I.logger.received(`Command executed: ${e.event.data.text} by ${e.event.data.nick||e.event.data.displayName}`,e),!0}}catch{return!1}finally{return!1}}}class et extends M{constructor(t){window.client instanceof A&&(super(),this.queue=[],this.priorityQueue=[],this.history=[],this.timeouts=[],this.running=!1,this.duration=void 0,this.loaded=!1,this.duration=t.duration,this.processor=t.processor,window.client.on("load",()=>{this.emit("load"),this.loaded=!0}))}enqueue(t,e={}){const a={isoDate:new Date().toISOString(),isLoop:e?.isLoop??!1,isPriority:e?.isPriority??!1,isImmediate:e?.isImmediate??!1,value:t},n=this.hasItems();return a.isPriority&&a.isImmediate?(this.cancel(),this.priorityQueue.unshift(a)):(a.isPriority?this.priorityQueue:this.queue).push(a),this.running===!1&&n===!1&&this.run(),this.emit("update",this.queue,this.priorityQueue,this.history,this.timeouts),this}async run(){if(!this.hasItems()){this.running=!1;return}this.running=!0,await this.next(),typeof this.duration=="number"&&this.duration>0?this.timeouts.push(setTimeout(()=>this.run(),this.duration)):(this.duration===0||this.duration!==-1&&this.duration!==!1)&&this.run()}async next(){const t=this.priorityQueue.length>0?this.priorityQueue.shift():this.queue.shift();if(!t){this.running=!1;return}try{await this.processor.apply(this,[t.value,this]),this.emit("process",t,this)}catch(a){I.logger.error(`Error during item processing: ${a instanceof Error?a.message:String(a)}`)}this.history.push(t);const e=t.isPriority?this.priorityQueue:this.queue;t.isLoop&&e.push(t)}resume(){return this.running&&this.cancel(),this.hasItems()&&this.run(),this}update(t){return this.queue=t.queue??this.queue,this.priorityQueue=t.priorityQueue??this.priorityQueue,this.history=t.history??this.history,this.hasItems()&&this.running===!1&&window.client?.on("load",()=>this.run()),this}cancel(){this.running&&(this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[],this.running=!1,this.emit("cancel"))}hasItems(){return this.queue.length>0||this.priorityQueue.length>0}on(t,e){return t==="load"&&this.loaded?(e.apply(this),this):(super.on(t,e),this)}}window.addEventListener("load",()=>{window.client instanceof A&&L.start()}),window.addEventListener("onWidgetLoad",async u=>{const{detail:t}=u;if(window.client instanceof A){const e=window.client;e.fields=t.fieldData,e.session=t.session.data,e.details={...e.details,user:t.channel,currency:t.currency,overlay:t.overlay},t.channel.id&&!t.emulated?await fetch(`https://api.streamelements.com/kappa/v2/channels/${t.channel.id}/`).then(a=>a.json()).then(a=>{if(a.provider)return e.details.provider=a.provider,a.provider;e.details.provider="local"}).catch(()=>{e.details.provider="local"}):e.details.provider="local",e.emit("load",t),e.loaded=!0,e.storage.on("load",a=>{if(a){const n=f=>{const h=Date.now(),c={};for(const p in f)if(f.hasOwnProperty(p)){const v=f[p];v.expire&&v.expire>h&&(c[p]=v)}return c},i=n(a.user||{}),d=n(a.avatar||{}),o=n(a.pronoun||{}),l=n(a.emote||{});e.storage.update({user:i,avatar:d,pronoun:o,emote:l})}t.channel.providerId.length&&e.storage.add(`avatar.${t.channel.providerId.toLowerCase()}`,{value:t.channel.avatar,timestamp:Date.now(),expire:Date.now()+e.cache.avatar*60*60*1e3})})}}),window.addEventListener("onSessionUpdate",u=>{const{detail:t}=u;if(window.client instanceof A){const e=window.client;e.session=t.session,e.emit("session",t.session)}}),window.addEventListener("onEventReceived",({detail:u})=>{if(window.client instanceof A){var t=u.event?.provider||u.event?.service||u.event?.data?.provider||window.client.details.provider;["kvstore:update","bot:counter","alertService:toggleSound","event:skip","tip-latest","event:test"].some(i=>i===u.listener)&&(t="streamelements");const n={provider:t,data:u};switch(n.provider){case"streamelements":{const i=n.data;switch(i.listener){case"tip-latest":{i.event;break}case"event:skip":{i.event;break}case"event:test":{switch(i.event.listener){case"widget-button":{const d=i.event;N.execute(d.field,d.value);break}case"subscriber-latest":{i.event;break}}break}case"kvstore:update":{const d=i.event;if(U.length){var e=U.find(o=>o.id===d.data.key.replace("customWidget.",""));e&&e.update(d.data.value)}break}case"bot:counter":{i.event;break}case"alertService:toggleSound":{const d=i.event;client.details.overlay.muted=!!d.muted;break}}break}case"twitch":{const i=n.data;switch(i.listener){case"delete-message":{i.event;break}case"delete-messages":{i.event;break}case"message":{i.event;break}case"follower-latest":{i.event;break}case"cheer-latest":{i.event;break}case"subscriber-latest":{(!i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&i.event.isCommunityGift||!i.event.gifted&&i.event.bulkGifted&&!i.event.isCommunityGift)&&i.event;break}case"raid-latest":{i.event;break}}break}case"youtube":{const i=n.data;switch(i.listener){case"message":{i.event,$.execute({provider:"youtube",data:i});break}case"subscriber-latest":{i.event;break}case"sponsor-latest":{i.event,(!i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&!i.event.isCommunityGift||i.event.gifted&&!i.event.bulkGifted&&i.event.isCommunityGift||!i.event.gifted&&i.event.bulkGifted&&!i.event.isCommunityGift)&&i.event;break}case"superchat-latest":{i.event;break}}break}case"kick":{n.data;break}case"facebook":{n.data;break}}window.client.emit("event",n)}});const z={getOverlayStatus:()=>({isEditorMode:!1,muted:!1}),resumeQueue:()=>{},responses:{},sendMessage(u,t){},counters:{get(u){return null}},sanitize(u){return u},cheerFilter(u){return u},setField(u,t,e){},store:{set:function(u,t){this.list[u]=t,localStorage.setItem("SE_API-STORE",JSON.stringify(z.store.list))},get:async function(u){return this.list[u]?this.list[u]:null},list:{}}};async function at(){let u=localStorage.getItem("SE_API-STORE")??"",t=u?JSON.parse(u):{};return z.store.list=t,z}const F=typeof SE_API<"u"?Promise.resolve(SE_API):Promise.resolve(at()),I={Client:A,Simulation:L,logger:new tt,utils:{findEmotesInText:B,replaceEmotesWithHTML:H},modules:{Button:N,Command:$,EventProvider:M,useStorage:G,useQueue:et},USE_SE_API:F};typeof window<"u"&&(window.Tixyel=I),P.Tixyel=I,P.USE_SE_API=F,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})}));
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|