!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=35)}({0:function(e,t,n){"use strict";var r=class{get(e=null){return new Promise((t,n)=>{const r="string"==typeof e||"number"==typeof e;chrome.storage[this.store].get(e,n=>{t(r?n[e]:n)})})}getBytesInUse(e=null){return new Promise((t,n)=>{chrome.storage[this.store].getBytesInUse(e,t)})}set(e){return new Promise((t,n)=>{chrome.storage[this.store].set(e,t)})}remove(e){return new Promise((t,n)=>{chrome.storage[this.store].remove(e,t)})}clear(){return new Promise((e,t)=>{chrome.storage[this.store].clear(e)})}listen(e,t){"function"==typeof e&&(t=e,e=null),chrome.storage.onChanged.addListener((n,r)=>{if(r===this.store)if(null!==e){if(n.hasOwnProperty(e)){const r=n[e].oldValue||null,i=n[e].newValue||null;t(r,i)}}else t(n)})}};new class extends r{constructor(){super(),this.store="local"}};const i=new class extends r{constructor(){super(),this.store="sync"}};new class{create(e=null,t){return"object"==typeof e&&(t=e,e=null),new Promise((n,r)=>{chrome.notifications.create(e,t,n)})}update(e,t){return new Promise((n,r)=>{chrome.notifications.update(e,t,n)})}clear(e){return new Promise((t,n)=>{chrome.notifications.clear(e,t)})}getAll(){return new Promise((e,t)=>{chrome.notifications.getAll(e)})}getPermissionLevel(){return new Promise((e,t)=>{chrome.notifications.getPermissionLevel(e)})}listen(e,t=null,n){if("function"==typeof t&&(n=t,t=null),"onPermissionLevelChanged"===e||"onShowSettings"===e)return this._nonNotificationIdListen(e,n);const r=null!==t?(e,...r)=>{t===e&&n(e,...r)}:n;chrome.notifications[e].addListener(r)}_nonNotificationIdListen(e,t){chrome.notifications[e].addListener(t)}};var o=n(1);t.a=new class extends o.EventEmitter{constructor(){super(),this._data=null,this.state="initiating",this._init()}async _init(){const e=await i.get();this._initListener(),this._data=e,this.state="ready",this.emit(this.state)}_initListener(){i.listen(e=>{Object.keys(e).forEach(t=>{e[t].hasOwnProperty("newValue")?this._data[t]=e[t].newValue:console.error("No newValue in sync storge change")}),this.emit("change",this.data,e)})}set(e){return i.set(e)}get data(){return this._data}has(e){return this.data.hasOwnProperty(e)}}},1:function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}e.exports=u,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,s;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,function(e){console&&console.warn&&console.warn(e)}(u)}return e}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)o(a,this,t);else{var l=a.length,c=m(a,l);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return p(this,e,!0)},u.prototype.rawListeners=function(e){return p(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},u.prototype.listenerCount=v,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},35:function(e,t,n){"use strict";n.r(t);var r=n(0),i={defaultOptions:{enableBTTVEmotes:!0,enableFrankerEmotes:!0,enableTwitchEmotes:!0,kappaFix:!0,theaterModeFix:!1,setAuthorColor:!1,showTimeStamp:!1,alternateLineColor:!1,hideAuthorIcons:!1,hideWelcomBanner:!1,setTwitchColors:!1,textSizeSlider:"inherit",setLiveChat:!0,allowTextSlider:!1}},o=()=>new Promise((e,t)=>{if(r.a.data.setupComplete)return r.a.set({options:Object.assign({},i.defaultOptions,r.a.data.options)}),e();const n=(t,i,o)=>("setupComplete"===t.name&&(chrome.runtime.onMessage.removeListener(n),r.a.set({setupComplete:!0}),e()),!0);chrome.tabs.create({url:"./html/welcome.html"}),chrome.runtime.onMessage.addListener(n),console.log("Setup Complete")});new class{constructor(){this.init=this.init.bind(this),r.a.on("ready",()=>{this.setupOptions(),o().then(this.init)})}init(){}setupOptions(){r.a.has("options")||r.a.set({options:i.defaultOptions})}}}});