UNPKG

tweeter-client

Version:
6 lines 55.6 kB
#!/usr/bin/env node /*! *** Tweeter Client 4.20.0 *** Copyright © 2020, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid) *** @license MIT !*/!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=98)}([function(t,e){t.exports=require("@hapi/joi")},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return A}));var r=n(82),o=n.n(r),i=n(83),s=n.n(i),a=n(0),u=n.n(a),c=n(14),f=n.n(c),l=n(84),p=n.n(l),h=n(30),d=n.n(h),y=n(7),g=n.n(y),v=n(85),b=n.n(v),x=n(27),w=n.n(x),j=n(5),m=n.n(j),_=n(4),F=n(15);class A extends _.a{constructor(...t){super(...t),this.twit=null}async start(){this.options.text&&(this.template=d.a.compile(this.options.text,{noEscape:!0})),this.twit=new b.a({...F.default.credentials.appCredentials,...s()(this.user,["access_token","access_token_secret"])});const t={};if(this.options.track&&(t.track=this.options.track),this.options.language&&(t.language=this.options.language),this.twit.stream("statuses/filter",t).on("tweet",this.onTweet.bind(this)),this.options.testTweet){const{data:t}=await this.twit.get("statuses/show",{id:this.options.testTweet,include_entities:!0,trim_user:!1,include_ext_alt_text:!0});this.logger.info(`Testing tweet: twitter.com/${t.user.screen_name}/status/${t.id_str}`),await this.onTweet(t)}}async onTweet(t){if(!(t.retweeted_status||this.user.id===t.user.id_str||this.options.ignoreSiblings&&F.default.getUserById(t.user.id_str))){if((t=>{var e;t.fullText=(null===(e=t.extended_tweet)||void 0===e?void 0:e.full_text)||t.text,t.flattenedText=w()(t.fullText),t.shortLink=`twitter.com/${t.user.screen_name}/status/${t.id_str}`,t.link=`https://${t.shortLink}`,t.authorTitle=m()(t.user.name)&&!t.user.name.includes("@")?t.user.name:t.user.screen_name})(t),this.logger.debug(`@${t.user.screen_name}: ${t.flattenedText}`),!this.options.includeReplies&&t.in_reply_to_status_id)return void this.logger.debug("This is a reply, skipping");if(this.options.filter){const e=f()(this.options.filter);for(const n of e){const e=p()(n,"ensureRegex");if(e.discardRegex&&g()(e.discardRegex).test(t.flattenedText))return void this.logger.debug(`Positive test for ${e.discardRegex}, skipping`);if(e.ensureRegex&&!g()(e.ensureRegex).test(t.flattenedText))return void this.logger.debug(`Negative test for ${e.discardRegex}, skipping`)}}if(this.shouldHandleTweet){let e;try{e=await this.shouldHandleTweet(t)}catch(t){return void console.error(t)}if(!e)return void this.logger.debug("Skipped by shouldHandleTweet")}await this.handleTweet(t)}}async handleTweet(t){if(this.options.reaction){const e={tweet:t};if("tweet"===this.options.reaction&&this.template){const t=this.template(e);await this.post(t)}if("retweet"===this.options.reaction)if(this.template){const n=this.template(e);await this.retweet(t,n)}else await this.retweet(t);if("like"===this.options.reaction&&await this.like(t),"likeDelayed"===this.options.reaction&&this.likeDelayed(t),"reply"===this.options.reaction){const n=this.template(e);await this.reply(t,n)}}}async like(t){return this.dry?void this.logger.info(`Like ${t.shortLink}`):void await this.twit.post("favorites/create",{id:t.id_str})}likeDelayed(t){const e=this;setTimeout(()=>{e.like(t)},o()(5e3,12e4))}async reply(t,e){return this.dry?void this.logger.info(`Reply to ${t.shortLink}: ${e}`):void await this.twit.post("statuses/update",{in_reply_to_status_id:t.id_str,status:this.options.text})}async retweet(t,e){return this.dry?void this.logger.info(`Retweet ${t.shortLink}`):e?void await this.post(`${e}\n${t.link}`):void await this.twit.post(`statuses/retweet/${t.id_str}`)}}A.baseSchema={includeReplies:u.a.boolean().default(!0),ignoreSiblings:u.a.boolean().default(!0),language:u.a.any(),filter:u.a.any(),testTweet:u.a.string(),track:u.a.any()},A.schema={...A.baseSchema,text:u.a.string(),reaction:u.a.any()}},function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return c}));var r=n(26),o=n.n(r),i=n(77),s=n.n(i);const a=new o.a({name:"Tweeter Client",version:"4.20.0",gotLogLevel:"info",useGot:!0,configSetup:{defaults:s(),secretKeys:["apiKey"]}}),u=a.logger,c=a.config;e.b=a},function(t,e){t.exports=require("jimp")},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(14),o=n.n(r),i=n(27),s=n.n(i),a=n(2),u=n(15);let c=1;class f{constructor(t,e,n,r){this.handle=t,this.dry=e,this.logger=n,this.index=c,this.options=r,c++;for(const[t,e]of Object.entries(this.options))this.logger.debug(`${t}: ${JSON.stringify(e)}`)}static initStatic(){const t=u.default.core.got;f.apiGot=t.extend({method:"POST",prefixUrl:`${a.a.apiProtocol}://${a.a.apiHost}`,port:a.a.apiPort,hooks:{init:[t=>{t.json||(t.json={}),Object.assign(t.json,{apiUser:a.a.apiUser,apiKey:a.a.apiKey})}]}})}async post(t,e){try{if(this.logger.info("[Tweeter #%s] @%s: %s",this.index,this.handle,s()(t)),e&&this.logger.debug(`Media length: ${o()(e).map(t=>t.length).join(", ")}`),this.dry)return;const n=await f.apiGot.post("tweet",{json:{text:t,media:e,handle:this.handle}});this.logger.debug("Tweet result: [%s %s] %s",n.statusCode,n.statusMessage,n.body)}catch(t){this.logger.error("[Tweeter #%s] Could not send tweet: %s",this.index,t)}}async postMedia(t){await this.post("",t)}}f.apiGot=null},function(t,e){t.exports=require("has-content")},function(t,e,n){var r=n(59),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=require("regex-parser")},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(116),o=n(119);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(16),o=n(103),i=n(104),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(9),o=n(109),i=n(110),s=n(134);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(s(t))}},function(t,e){t.exports=require("ensure-array")},function(t,e,n){"use strict";n.r(e);var r=n(14),o=n.n(r),i=n(5),s=n(26),a=n(4),u=n(78),c=n.n(u);const f={},l=n(100);for(const t of l.keys()){const e=t.match(/\.\/(?<key>\w+)/).groups.key;f[c()(e)]={Type:n(210)(`./${e}.js`).default}}var p=f;class h extends s.JaidCorePlugin{constructor(...t){super(...t),this.tweeters=[],this.credentials=null}setCoreReference(t){this.core=t}getUserByHandle(t){return this.credentials.users[t.toLowerCase()]}getUserById(t){return Object.values(this.credentials.users).find(e=>e.id===t)}async init(){a.a.initStatic(),this.credentials=await a.a.apiGot("credentials").json();const t=o()(this.core.config.tweeters);if(Object(i.isEmpty)(t))this.log("No tweeters configured!");else{for(const{type:e,handle:n,dry:r,...o}of t){const t=p[e];if(!t)return void this.logger.warn(`Unknown tweeter type ${e}`);const i=t.Type;let s=o;if(i.schema){const t=i.schema.validate(o);if(t.error)throw this.logger.warn(`Invalid configuration for tweeter type ${e}`),this.logger.warn(t.error.message),new Error(t.error.message);s=t.value}const a=new i(n,r,this.logger,s);if(!n)throw new Error(`Tweeter #${a.index} does not have a handle`);if(a.user=this.getUserByHandle(n),!a.user)throw new Error(`Did not receive info for handle ${n} from server`);this.tweeters.push(a),this.log("Registered tweeter #%s (%s) for @%s",a.index,e,n)}for(const t of this.tweeters){var e;await(null===(e=t.start)||void 0===e?void 0:e.call(t))}}}}e.default=new h},function(t,e,n){var r=n(6).Symbol;t.exports=r},function(t,e,n){var r=n(37),o=n(63);t.exports=function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,u=e.length;++a<u;){var c=e[a],f=i?i(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),s?o(n,c,f):r(n,c,f)}return n}},function(t,e,n){"use strict";var r=n(80),o=n.n(r),i=n(7),s=n.n(i),a=n(81),u=n.n(a);e.a=(t,e)=>{let n;return n=e?s()(`/^[\\da-z${o()(e)}]+$/i`):/^[\da-z]+$/i,n.test(u()(t))}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&e>t}},function(t,e,n){var r=n(12),o=n(10);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(11)(Object,"create");t.exports=r},function(t,e,n){var r=n(124),o=n(125),i=n(126),s=n(127),a=n(128);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(32);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(130);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(20);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e){t.exports=require("jaid-core")},function(t,e){t.exports=require("flatten-multiline")},function(t,e){t.exports=require("got")},function(t,e,n){"use strict";var r=n(3),o=n.n(r),i=n(79),s=n.n(i);e.a=async t=>{const e=await o.a.read(t),n=e.getWidth(),r=e.getHeight(),i=new Uint8ClampedArray(n*r*4);for(let t=0;r>t;t++)for(let r=0;n>r;r++){const s=o.a.intToRGBA(e.getPixelColor(r,t));i[4*(t*n+r)+0]=s.r,i[4*(t*n+r)+1]=s.g,i[4*(t*n+r)+2]=s.b,i[4*(t*n+r)+3]=s.a}return s()(i,n,r)}},function(t,e){t.exports=require("handlebars")},function(t,e){t.exports=require("@absolunet/fsp")},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(58),o=n(34);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t}},function(t,e,n){var r=n(113),o=n(129),i=n(131),s=n(132),a=n(133);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(11)(n(6),"Map");t.exports=r},function(t,e,n){var r=n(63),o=n(32),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];i.call(t,e)&&o(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(140),o=n(10),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return u}));var r=n(86),o=n.n(r),i=n(0),s=n.n(i),a=n(1);class u extends a.default{async start(){this.options.track=`@${this.options.handle}`,await super.start()}}u.schema=s.a.object().keys({...o()(a.default.schema,"track")})},function(t,e,n){var r=n(66),o=n(164),i=n(33);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(59),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o&&r.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(this,n(42)(t))},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(172),o=n(70),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),r(s(t),(function(e){return i.call(t,e)})))}:o;t.exports=a},function(t,e,n){var r=n(68)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(175),o=n(36),i=n(176),s=n(74),a=n(177),u=n(12),c=n(61),f=c(r),l=c(o),p=c(i),h=c(s),d=c(a),y=u;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||s&&"[object Set]"!=y(new s)||a&&"[object WeakMap]"!=y(new a))&&(y=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case p:return"[object Promise]";case h:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(180);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return s}));var r=n(0),o=n.n(r),i=n(1);class s extends i.default{async start(){this.options.track=`@${this.options.handle}`,await super.start()}async handleTweet(t){this.likeDelayed(t)}}s.schema=o.a.object().keys({...i.default.baseSchema})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return m}));var r=n(92),o=n.n(r),i=n(0),s=n.n(i),a=n(93),u=n.n(a),c=n(94),f=n.n(c),l=n(28),p=n.n(l),h=n(5),d=n.n(h),y=n(3),g=n.n(y),v=n(95),b=n.n(v),x=n(29),w=n(18),j=n(1);class m extends j.default{async shouldHandleTweet(t){var e;const n=[];if(d()(null===(e=t.extended_entities)||void 0===e?void 0:e.media))for(const e of t.extended_entities.media){if("photo"!==e.type)continue;const r=await p()(e.media_url).buffer(),o=await Object(x.a)(r);null!=o&&o.data&&/^\d{12}$/.test(o.data)&&(n.push(o.data),t.hasQrCode=!0)}if(!t.hasQrCode){const e=f()(/((?:\d{4}[ -]?){2}\d{4})(\D|$)/g,t.flattenedText);for(const t of e){const e=t.subMatches[0].replace(/[ -]/g,"");n.push(e)}}return!Object(h.isEmpty)(n)&&(t.codes=o()(n),t.codesFormatted=t.codes.map(t=>`${t.slice(0,4)} ${t.slice(4,8)} ${t.slice(8,12)}`),t.codesString=t.codesFormatted.join("\n"),d()(t.user.location)&&(Object(w.a)(t.user.location," -,")?t.playerLocation=t.user.location:this.logger.debug(`Discarding Twitter user location: ${t.user.location}`)),!0)}async handleTweet(t){if(this.options.like&&this.likeDelayed(t),t.hasQrCode)return void await this.retweet(t);const e=this.template({tweet:t}),n=t.codes,r=async t=>{const e=await b.a.toDataURL(t,{errorCorrectionLevel:"L",scale:32}),n=u()(e).body,r=await g.a.create(n);return r.background(4294967295),r.contain(1920,1080),r.getBase64Async(g.a.MIME_PNG)},o=Array(n.length);for(let t=0;t<=n.length-1;t++)o[t]=r(n[t]);const i=await Promise.all(o);await this.post(`${e}\n${t.link}`,i)}}m.schema=s.a.object().keys({...j.default.baseSchema,like:s.a.bool().default(!0),text:s.a.string().required()})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return u}));var r=n(0),o=n.n(r),i=n(7),s=n.n(i),a=n(1);class u extends a.default{async start(){await super.start(),this.checkQuotesRegex=s()(`/["„“'‚‘]${this.options.track}["„“'‚‘]/i`),this.checkLeadingLettersRegex=s()(`/\\w${this.options.track}/i`),this.checkTrailingLettersRegex=s()(`/${this.options.track}\\w/i`)}async shouldHandleTweet(t){return this.checkLeadingLettersRegex.test(t.flattenedText)?(this.logger.debug("Found leading letters, skipping (assuming false positive)"),!1):!this.checkTrailingLettersRegex.test(t.flattenedText)||(this.logger.debug("Found trailing letters, skipping (assuming false positive)"),!1)}async handleTweet(t){if(this.options.like&&this.likeDelayed(t),this.checkQuotesRegex.test(t.flattenedText))return void this.logger.debug(`Will not make a tweet assuming author @${t.user.screen_name} is not dumb`);const e=this.template({tweet:t});await this.retweet(t,e)}}u.schema=o.a.object().keys({...a.default.baseSchema,like:o.a.bool().default(!0),text:o.a.string().required()})},function(t,e,n){"use strict";n.r(e);var r=n(31),o=n.n(r),i=n(57),s=n(3),a=n.n(s),u=n(96),c=n.n(u),f=n(97),l=n.n(f),p=n(4),h=n(2);e.default=class extends p.a{async start(){this.watcher=new l.a({depotId:this.options.depotId}),this.watcher.on("contentChanged",async()=>{try{const t=await this.renderImage();h.c.info(t.slice(0,50)),await this.postMedia(t)}catch(t){h.c.error("Tweeter %s could not generate tweet: %s",this.id,t)}}),this.watcher.start(),h.c.info("Started watching on Steam depot %s (%s)",this.options.depotId,this.options.title)}async renderImage(){const t=Object(i.createCanvas)(1920,1080),e=t.getContext("2d");if(this.info.backgroundFile){let t=await o.a.readFile(this.info.backgroundFile);if(this.info.randomHue){const e=await a.a.read(t);e.color([{apply:"hue",params:[Math.random()*this.info.randomHue-this.info.randomHue/2]}]),t=await e.getBufferAsync("image/png")}const n=await Object(i.loadImage)(t);e.drawImage(n,0,0)}else e.fillStyle="#000",e.fillRect(0,0,1920,1080);e.fillStyle="#DDD",e.textAlign="center",e.textBaseline="top",e.font="240px Ubuntu",e.fillText("New Patch",960,300),e.fillStyle="#DDD",e.textAlign="center",e.textBaseline="top",e.font="60px Ubuntu",e.fillText(`in ${this.info.title}`,960,600);const n=c()().format("MMMM DD, YYYY");return e.fillStyle="#DDD",e.textAlign="center",e.textBaseline="bottom",e.font="60px Ubuntu",e.fillText(n,960,290),t.toDataURL()}}},function(t,e,n){"use strict";n.r(e);var r=n(4);e.default=class extends r.a{async start(){this.post(`Tweeter Client v4.20.0, ${Date.now()}`)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return y}));var r=n(0),o=n.n(r),i=n(28),s=n.n(i),a=n(5);function u(t,e=0,n=9e3){var r=Math.min;let o=BigInt("144066263297769815596495629667062367629");const i=BigInt("309485009821345068724781371");if("string"==typeof t){const s=r(e+n,t.length);for(let n=e;s>n;n++)o^=BigInt(t.charCodeAt(n)),o=BigInt.asUintN(128,o*i)}else if(t instanceof Uint8Array){const s=r(e+n,t.byteLength);for(let n=e;s>n;n++)o^=BigInt(t[n]),o=BigInt.asUintN(128,o*i)}else if(t instanceof ArrayBuffer){const s=new Uint8Array(t),a=r(e+n,s.byteLength);for(let t=e;a>t;t++)o^=BigInt(s[t]),o=BigInt.asUintN(128,o*i)}return`0000000000000000000000000000000${o.toString(16)}`.slice(-32)}class c{constructor(t=null){if(this.b=null,t instanceof ArrayBuffer){this.b=new ArrayBuffer(t.byteLength>620?2160:620),this.dataView=new DataView(this.b,0,this.b.byteLength),this.dataBytes=new Uint8Array(this.b,0,this.b.byteLength);const e=new Uint8Array(t,0,t.byteLength);for(let n=0;n<t.byteLength&&n<this.b.byteLength;++n)this.dataBytes[n]=e[n]}if(t instanceof Uint8Array){this.b=new ArrayBuffer(t.byteLength>620?2160:620),this.dataView=new DataView(this.b,0,this.b.byteLength),this.dataBytes=new Uint8Array(this.b,0,this.b.byteLength);for(let e=0;e<t.byteLength&&e<this.b.byteLength;++e)this.dataBytes[e]=t[e]}if("string"==typeof t&&t.length>=620){this.b=new ArrayBuffer(t.length>620?2160:620),this.dataView=new DataView(this.b,0,this.b.byteLength),this.dataBytes=new Uint8Array(this.b,0,this.b.byteLength);for(let e=0;e<t.length&&e<this.b.byteLength;++e)this.dataBytes[e]=t.charCodeAt(e)}if(null===this.b){let e=9;"number"==typeof t&&(e=t),this.b=new ArrayBuffer(c.bytesForType(e)),this.dataView=new DataView(this.b,0,this.b.byteLength),this.dataBytes=new Uint8Array(this.b,0,this.b.byteLength),this.title="Empty",this.creator=["Unknown",0],this.town=["Unknown",0],this.unknown_a=12569,this.setDefaultPalette(),this.unknown_b=204,this.unknown_c=10,this.patternType=e}this.currMask=c.typeInfo[this.patternType]?c.typeInfo[this.patternType].mask:null}utf16_decode(t,e){let n="";for(let r=0;e>r;r+=2){const e=this.dataView.getUint16(t+r,!0);if(0===e)return n;n+=String.fromCharCode(e)}return n}utf16_encode(t,e,n){for(let r=0;e/2>r;r++)r<n.length?this.dataView.setUint16(t+2*r,n.charCodeAt(r),!0):this.dataView.setUint16(t+2*r,0,!0)}toString(){let t="";const e=Math.min(this.byteLength,this.b.byteLength);for(let n=0;e>n;n++)t+=String.fromCharCode(this.dataBytes[n]);return t}toJson(){return{title:this.title,author:this.creator,authorTitle:this.creator[0]?this.creator[0]:null,town:this.town,townTitle:this.town[0]?this.town[0]:null,unknown:{a:this.unknown_a,b:this.unknown_b,c:this.unknown_c,d:this.unknown_d},textureSize:this.width,patternType:this.patternType,patternTypeTitle:c.getTypeStr(this.patternType),byteLength:this.byteLength}}toPixels(t){let e=0;for(let n=108;n<this.b.byteLength&&e<t.byteLength;n++)t[e++]=15&this.dataBytes[n],t[e++]=15&this.dataBytes[n]>>4;if(this.currMask)for(let e=0;e<t.byteLength;e++)this.currMask[e>>5]&1<<(31&e)&&(t[e]=252)}fromPixels(t){let e=0;for(let n=108;n<this.b.byteLength;n++)this.dataBytes[n]=(15&t[e])+((15&t[e+1])<<4),e+=2}getPalette(t){return 0>t||t>14?0:this.dataBytes[88+t]}setPalette(t,e){0>t||t>14||(this.dataBytes[88+t]=e)}set title(t){this.utf16_encode(0,40,t)}get title(){return this.utf16_decode(0,40)}set creator(t){return Array.isArray(t)&&2===t.length?(this.creator=t[0],void(this.creator=t[1])):("string"==typeof t&&this.utf16_encode(44,18,t),void("number"==typeof t&&this.dataView.setUint16(42,t,!0)))}get creator(){return[this.utf16_decode(44,18),this.dataView.getUint16(42,!0),this.dataBytes[68]?"Male":"Female"]}set town(t){return Array.isArray(t)&&2===t.length?(this.town=t[0],void(this.town=t[1])):("string"==typeof t&&this.utf16_encode(66,18,t),void("number"==typeof t&&this.dataView.setUint16(64,t,!0)))}get town(){return[this.utf16_decode(66,18),this.dataView.getUint16(64,!0)]}set unknown_a(t){this.dataView.setUint16(86,t,!0)}get unknown_a(){return this.dataView.getUint16(86,!0)}setDefaultPalette(){for(let t=0;15>t;t++)this.dataBytes[88+t]=16*t+15}set unknown_b(t){this.dataBytes[103]=t}get unknown_b(){return this.dataBytes[103]}set unknown_c(t){this.dataBytes[104]=t}get unknown_c(){return this.dataBytes[104]}set patternType(t){if(this.width!==c.widthForType(t)){const e=new ArrayBuffer(c.widthForType(t)>32?2160:620),n=new DataView(e),r=new Uint8Array(e);for(let t=0;t<e.byteLength&&t<this.b.byteLength;++t)r[t]=this.dataBytes[t];this.dataView=n,this.dataBytes=r,this.b=e}this.dataBytes[105]=t,this.currMask=c.typeInfo[this.patternType]?c.typeInfo[this.patternType].mask:null}get patternType(){return this.dataBytes[105]}static getTypeStr(t){return c.typeInfo[t]&&c.typeInfo[t].name?c.typeInfo[t].name:"Unimplemented pattern type"}set unknown_d(t){this.dataView.setUint16(106,t,!0)}get unknown_d(){return this.dataView.getUint16(106,!0)}get width(){return c.typeInfo[this.dataBytes[105]]?c.typeInfo[this.dataBytes[105]].size:32}get height(){return c.typeInfo[this.dataBytes[105]]?c.typeInfo[this.dataBytes[105]].size:32}get byteLength(){return this.width>32?2160:620}pixelHash(){return u(this.b,88,this.width>32?2068:532)}fullHash(){return u(this.b,0,this.byteLength)}fixIssues(){this.creator[1]||(this.creator=60598),this.town[1]||(this.town=50500),this.dataBytes[84]=0,this.dataBytes[85]=0,this.dataBytes[62]>1&&(this.dataBytes[62]=0),this.dataBytes[63]=0,this.dataBytes[40]=0,this.dataBytes[41]=0}static widthForType(t){return c.typeInfo[t].size}static bytesForType(t){return this.widthForType(t)>32?2160:620}}c.paletteColors=["#FFEEFF","#FF99AA","#EE5599","#FF66AA","#FF0066","#BB4477","#CC0055","#990033","#552233","","","","","","","#FFFFFF","#FFBBCC","#FF7777","#DD3210","#FF5544","#FF0000","#CC6666","#BB4444","#BB0000","#882222","","","","","","","#EEEEEE","#DDCDBB","#FFCD66","#DD6622","#FFAA22","#FF6600","#BB8855","#DD4400","#BB4400","#663210","","","","","","","#DDDDDD","#FFEEDD","#FFDDCC","#FFCDAA","#FFBB88","#FFAA88","#DD8866","#BB6644","#995533","#884422","","","","","","","#CCCDCC","#FFCDFF","#EE88FF","#CC66DD","#BB88CC","#CC00FF","#996699","#8800AA","#550077","#330044","","","","","","","#BBBBBB","#FFBBFF","#FF99FF","#DD22BB","#FF55EE","#FF00CC","#885577","#BB0099","#880066","#550044","","","","","","","#AAAAAA","#DDBB99","#CCAA77","#774433","#AA7744","#993200","#773222","#552200","#331000","#221000","","","","","","","#999999","#FFFFCC","#FFFF77","#DDDD22","#FFFF00","#FFDD00","#CCAA00","#999900","#887700","#555500","","","","","","","#888888","#DDBBFF","#BB99EE","#6632CC","#9955FF","#6600FF","#554488","#440099","#220066","#221033","","","","","","","#777777","#BBBBFF","#8899FF","#3332AA","#3355EE","#0000FF","#333288","#0000AA","#101066","#000022","","","","","","","#666666","#99EEBB","#66CD77","#226610","#44AA33","#008833","#557755","#225500","#103222","#002210","","","","","","","#555555","#DDFFBB","#CCFF88","#88AA55","#AADD88","#88FF00","#AABB99","#66BB00","#559900","#336600","","","","","","","#444444","#BBDDFF","#77CDFF","#335599","#6699FF","#1077FF","#4477AA","#224477","#002277","#001044","","","","","","","#333233","#AAFFFF","#55FFFF","#0088BB","#55BBCC","#00CDFF","#4499AA","#006688","#004455","#002233","","","","","","","#222222","#CCFFEE","#AAEEDD","#33CDAA","#55EEBB","#00FFCC","#77AAAA","#00AA99","#008877","#004433","","","","","","","#000000","#AAFFAA","#77FF77","#66DD44","#00FF00","#22DD22","#55BB55","#00BB00","#008800","#224422","","","","","","",""],c.typeInfo=[],c.typeInfo[0]={name:"Dress, long sleeves",size:64,sections:[0,0,64,64]},c.typeInfo[1]={name:"Dress, short sleeves",size:64,sections:[0,0,64,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},c.typeInfo[2]={name:"Dress, sleeveless",size:64,sections:[0,0,64,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},c.typeInfo[3]={name:"Shirt, long sleeves",size:64,sections:[0,0,64,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},c.typeInfo[4]={name:"Shirt, short sleeves",size:64,sections:[0,0,64,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-65536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},c.typeInfo[5]={name:"Shirt, sleeveless",size:64,sections:[0,0,64,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},c.typeInfo[6]={name:"Hat with horns",size:32,sections:[0,0,32,32]},c.typeInfo[7]={name:"Hat without horns",size:32,sections:[0,0,32,32]},c.typeInfo[8]={name:"Standee",size:64,sections:[0,0,52,64],mask:[0,0,0,0,0,0,0,0,0,0,0,0,0,1069547520,-524288,-131072,-65536,-32768,-16384,-16384,-8192,-8192,-8192,-8192,-8192,-16384,-16384,-32768,-65536,-262144,-1048576,528482304,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048575,-1048569,-1048561,-1048545,-1048513,-1048513,-1048449,-1048449,-1048449,-1048449,-1048449,-1048513,-1048545,-1048545,-1048561,-1048573,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576,-1048576]},c.typeInfo[9]={name:"Normal pattern (easel)",size:32,sections:[0,0,32,32]},c.RGBLookup=[],c.YUVLookup=[];for(let t=0;256>t;t++){const e=c.paletteColors[t];if(7>e.length)c.RGBLookup.push(null),c.YUVLookup.push(null);else{const t=[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)];c.RGBLookup.push(t),c.YUVLookup.push([.299*t[0]+.587*t[1]+.114*t[2],-.168736*t[0]+-.331264*t[1]+.5*t[2]+128,.5*t[0]+-.418688*t[1]+-.081312*t[2]+128])}}var f=c,l=n(29),p=n(18),h=t=>!!(t.authorTitle&&t.townTitle&&620===t.byteLength&&t.patternTypeTitle&&"Unimplemented pattern type"!==!t.patternTypeTitle&&Object(p.a)(t.authorTitle," -_")&&Object(p.a)(t.townTitle," -_")),d=n(1);class y extends d.default{async shouldHandleTweet(t){var e;if(Object(a.isEmpty)(null===(e=t.extended_entities)||void 0===e?void 0:e.media))return!1;for(const e of t.extended_entities.media)if("photo"!==e.type)return!1;const n=[];for(const e of t.extended_entities.media){const t=await s()(e.media_url).buffer(),r=await Object(l.a)(t);if(620!==(null==r?void 0:r.binaryData.length))continue;let o;try{o=new f(r.binaryData).toJson()}catch{continue}h(o)&&n.push(o)}return!Object(a.isEmpty)(n)}async handleTweet(t){this.options.like&&this.likeDelayed(t),await this.retweet(t)}}y.schema=o.a.object().keys({...d.default.baseSchema,like:o.a.bool().default(!0)})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return F}));var r=n(31),o=n.n(r),i=n(0),s=n.n(i),a=n(87),u=n.n(a),c=n(30),f=n.n(c),l=n(88),p=n.n(l),h=n(3),d=n.n(h),y=n(89),g=n.n(y),v=n(90),b=n.n(v),x=n(91),w=n.n(x),j=new Intl.Collator(void 0),m=n(4);function _(t,e){return j.compare(t.title,e.title)}class F extends m.a{async start(){this.template=f.a.compile(this.options.template,{noEscape:!0}),this.options.cron||await this.run(),g.a.scheduleJob(this.options.cron,()=>{this.run()})}getPerkPool(){const t=Object.values(u.a.perks);return this.options.perksType?t.filter(t=>!!t.visible&&t.for===this.options.perksType):t.filter(t=>!!t.visible)}getPicks(){const t=this.getPerkPool(),e=b()(t,{count:4});return e.sort(_),e}getText(t){return this.template({perks:p()(t.map(t=>t.title)),options:this.options})}async getBackgroundBuffer(){return await o.a.readFile(this.options.backgroundFile)}async run(){const t=this.getPicks(),e=t=>t.id,n=Array(t.length);for(let r=0;r<=t.length-1;r++)n[r]=e(t[r]);const r=await w()(n),o=await d.a.create(r),i=await this.getBackgroundBuffer(),s=await d.a.create(i);o.contain(s.getWidth(),s.getHeight()),s.composite(o,0,0);const a=await s.getBase64Async(d.a.MIME_PNG);await this.post(this.getText(t),a)}}F.schema=s.a.object().keys({perksType:s.a.string(),cron:s.a.string(),backgroundFile:s.a.string().required(),template:s.a.string().default("Today's Dead by Daylight {{options.perksType}} build contains {{perks}}.")})},function(t,e){t.exports=require("canvas")},function(t,e,n){var r=n(12),o=n(8);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e){var n="object"==typeof global&&global&&global.Object===Object&&global;t.exports=n},function(t,e,n){var r=n(13),o=n(25);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&i>n;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(64);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(11),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){var r=n(141),o=n(144),i=n(146);t.exports=function(t){return i(o(t,void 0,r),t+"")}},function(t,e,n){var r=n(160),o=n(38),i=n(9),s=n(67),a=n(19),u=n(162),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&s(t),p=!n&&!f&&!l&&u(t),h=n||f||l||p,d=h?r(t.length,String):[],y=d.length;for(var g in t)!e&&!c.call(t,g)||h&&("length"==g||l&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,y))||d.push(g);return d}},function(t,e,n){(function(t){var r=n(6),o=n(161),i=e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;t.exports=u}).call(this,n(42)(t))},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(66),o=n(167),i=n(33);t.exports=function(t){return i(t)?r(t,!0):o(t)}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(39),o=n(47),i=n(46),s=n(70),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:s;t.exports=a},function(t,e,n){var r=n(39),o=n(9);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e,n){var r=n(72),o=n(71),i=n(69);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(11)(n(6),"Set");t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e){t.exports=require("yargs")},function(t,e){t.exports={apiHost:"localhost",apiProtocol:"http",apiPort:80,tweeters:[],apiUser:"jaid"}},function(t,e){t.exports=require("camelcase")},function(t,e){t.exports=require("jsqr")},function(t,e){t.exports=require("escape-string-regexp")},function(t,e){t.exports=require("remove-accents")},function(t,e,n){var r=n(101),o=n(102),i=n(105),s=parseFloat,a=Math.min,u=Math.random;t.exports=function(t,e,n){if(n&&"boolean"!=typeof n&&o(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=i(t),void 0===e?(e=t,t=0):e=i(e)),t>e){var c=t;t=e,e=c}if(n||t%1||e%1){var f=u();return a(t+f*(e-t+s("1e-"+((f+"").length-1))),e)}return r(t,e)}},function(t,e,n){var r=n(107),o=n(65)((function(t,e){return null==t?{}:r(t,e)}));t.exports=o},function(t,e){t.exports=require("ensure-object")},function(t,e){t.exports=require("twit")},function(t,e,n){var r=n(62),o=n(151),i=n(191),s=n(13),a=n(17),u=n(195),c=n(65),f=n(73),l=c((function(t,e){var n={};if(null==t)return n;var c=!1;e=r(e,(function(e){return e=s(e,t),c||(c=e.length>1),e})),a(t,f(t),n),c&&(n=o(n,7,u));for(var l=e.length;l--;)i(n,e[l]);return n}));t.exports=l},function(t,e){t.exports=require("dead-by-daylight")},function(t,e){t.exports=require("humanize-list")},function(t,e){t.exports=require("node-schedule")},function(t,e){t.exports=require("pick-random")},function(t,e){t.exports=require("render-dead-by-daylight-build")},function(t,e,n){var r=n(197);t.exports=function(t){return t&&t.length?r(t):[]}},function(t,e){t.exports=require("data-urls")},function(t,e){t.exports=require("execall")},function(t,e){t.exports=require("qrcode")},function(t,e){t.exports=require("moment")},function(t,e){t.exports=require("steam-game-update-watcher")},function(t,e,n){"use strict";n.r(e);var r=n(76),o=n.n(r),i=n(2);function s(t){var e;(null===i.b||void 0===i.b||null===(e=i.b.logger)||void 0===e?void 0:e.error)?i.b.logger.error(t):console.error(t)}process.on("unhandledRejection",t=>{s(t?`Unhandled promise rejection: ${(null==t?void 0:t.message)||t}`:"Unhandled promise rejection"),(null==t?void 0:t.stack)&&s(t.stack)}),o.a.scriptName("tweeter-client").version("4.20.0").command("$0","Creates tweets.",{},(function(){(async function(){const t={},e=n(99);for(const n of e.keys()){const{pluginName:r}=n.match(/[/\\](?<pluginName>.+?)[/\\]index\.js$/).groups;t[r]=e(n).default}await i.b.init(t)})().catch(t=>{s("Core process crashed"),s(t),process.exit(1)})})).argv},function(t,e,n){var r={"./main/index.js":15};function o(t){var e=i(t);return n(e)}function i(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}o.keys=function(){return Object.keys(r)},o.resolve=i,t.exports=o,o.id=99},function(t,e,n){var r={"./AnimalCrossingQrCodes":55,"./AnimalCrossingQrCodes.js":55,"./AnswerMentions":40,"./AnswerMentions.js":40,"./DeadByDaylightBuild":56,"./DeadByDaylightBuild.js":56,"./LikeMentions":50,"./LikeMentions.js":50,"./PokemonGoQrCodes":51,"./PokemonGoQrCodes.js":51,"./Reaction":1,"./Reaction.js":1,"./Spelling":52,"./Spelling.js":52,"./SteamGameUpdate":53,"./SteamGameUpdate.js":53,"./Test":54,"./Test.js":54};function o(t){var e=i(t);return n(e)}function i(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}o.keys=function(){return Object.keys(r)},o.resolve=i,t.exports=o,o.id=100},function(t,e){var n=Math.floor,r=Math.random;t.exports=function(t,e){return t+n(r()*(e-t+1))}},function(t,e,n){var r=n(32),o=n(33),i=n(19),s=n(8);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?o(n)&&i(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(16),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[a]=n:delete t[a]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r=n(106);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(0>t?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(8),o=n(20),i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(/^\s+|\s+$/g,"");var n=s.test(t);return n||a.test(t)?u(t.slice(2),n?2:8):i.test(t)?NaN:+t}},function(t,e,n){var r=n(108),o=n(137);t.exports=function(t,e){return r(t,e,(function(e,n){return o(t,n)}))}},function(t,e,n){var r=n(60),o=n(136),i=n(13);t.exports=function(t,e,n){for(var s=-1,a=e.length,u={};++s<a;){var c=e[s],f=r(t,c);n(f,c)&&o(u,i(c,t),f)}return u}},function(t,e,n){var r=n(9),o=n(20),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||s.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(111)((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,(function(t,n,r,o){e.push(r?o.replace(/\\(\\)?/g,"$1"):n||t)})),e}));t.exports=r},function(t,e,n){var r=n(112);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(35);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},function(t,e,n){var r=n(114),o=n(22),i=n(36);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(115),o=n(120),i=n(121),s=n(122),a=n(123);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,n){var r=n(21);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(58),o=n(117),i=n(8),s=n(61),a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,l=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?l:/^\[object .+?Constructor\]$/).test(s(t))}},function(t,e,n){var r,o=n(118),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(6)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(21),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(21),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(21);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(23),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return n>=0&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(23);t.exports=function(t){var e=this.__data__,n=r(e,t);return 0>n?void 0:e[n][1]}},function(t,e,n){var r=n(23);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(23);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return 0>o?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(24);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(24);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(24);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(24);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(135);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(16),o=n(62),i=n(9),s=n(20),a=r?r.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(s(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e,n){var r=n(37),o=n(13),i=n(19),s=n(8),a=n(25);t.exports=function(t,e,n,u){if(!s(t))return t;for(var c=-1,f=(e=o(e,t)).length,l=f-1,p=t;null!=p&&++c<f;){var h=a(e[c]),d=n;if(c!=l){var y=p[h];void 0===(d=u?u(y,h,p):void 0)&&(d=s(y)?y:i(e[c+1])?[]:{})}r(p,h,d),p=p[h]}return t}},function(t,e,n){var r=n(138),o=n(139);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(13),o=n(38),i=n(9),s=n(19),a=n(34),u=n(25);t.exports=function(t,e,n){for(var c=-1,f=(e=r(e,t)).length,l=!1;++c<f;){var p=u(e[c]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++c!=f?l:!!(f=null==t?0:t.length)&&a(f)&&s(p,f)&&(i(t)||o(t))}},function(t,e,n){var r=n(12),o=n(10);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(142);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},function(t,e,n){var r=n(39),o=n(143);t.exports=function t(e,n,i,s,a){var u=-1,c=e.length;for(i||(i=o),a||(a=[]);++u<c;){var f=e[u];n>0&&i(f)?n>1?t(f,n-1,i,s,a):r(a,f):s||(a[a.length]=f)}return a}},function(t,e,n){var r=n(16),o=n(38),i=n(9),s=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(s&&t&&t[s])}},function(t,e,n){var r=n(145),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=o(i.length-e,0),u=Array(a);++s<a;)u[s]=i[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=i[s];return c[e]=n(u),r(t,this,c)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(147),o=n(150)(r);t.exports=o},function(t,e,n){var r=n(148),o=n(64),i=n(149),s=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){t.exports=function(t){return t}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(152),o=n(158),i=n(37),s=n(159),a=n(166),u=n(169),c=n(170),f=n(171),l=n(173),p=n(174),h=n(73),d=n(48),y=n(178),g=n(179),v=n(185),b=n(9),x=n(67),w=n(187),j=n(8),m=n(189),_=n(41),F={};F["[object Arguments]"]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F["[object Object]"]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F["[object Function]"]=F["[object WeakMap]"]=!1,t.exports=function t(e,n,A,B,k,D){var T,O=1&n,C=2&n,S=4&n;if(A&&(T=k?A(e,B,k,D):A(e)),void 0!==T)return T;if(!j(e))return e;var U=b(e);if(U){if(T=y(e),!O)return c(e,T)}else{var L=d(e),I="[object Function]"==L||"[object GeneratorFunction]"==L;if(x(e))return u(e,O);if("[object Object]"==L||"[object Arguments]"==L||I&&!k){if(T=C||I?{}:v(e),!O)return C?l(e,a(T,e)):f(e,s(T,e))}else{if(!F[L])return k?e:{};T=g(e,L,O)}}D||(D=new r);var $=D.get(e);if($)return $;D.set(e,T),m(e)?e.forEach((function(r){T.add(t(r,n,A,r,e,D))})):w(e)&&e.forEach((function(r,o){T.set(o,t(r,n,A,o,e,D))}));var E=S?C?h:p:C?keysIn:_,P=U?void 0:E(e);return o(P||e,(function(r,o){P&&(r=e[o=r]),i(T,o,t(r,n,A,o,e,D))})),T}},function(t,e,n){var r=n(22),o=n(153),i=n(154),s=n(155),a=n(156),u=n(157);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(22);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(22),o=n(36),i=n(35);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||199>s.length)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(t,e),this.size=n.size,this}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(17),o=n(41);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(163),o=n(43),i=n(44),s=i&&i.isTypedArray,a=s?o(s):r;t.exports=a},function(t,e,n){var r=n(12),o=n(34),i=n(10),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!s[r(t)]}},function(t,e,n){var r=n(45),o=n(165),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(68)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(17),o=n(69);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){var r=n(8),o=n(45),i=n(168),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){(function(t){var r=n(6),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(42)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(17),o=n(46);t.exports=function(t,e){return r(t,o(t)