{"version":3,"sources":["webpack://OverlayAPI/webpack/universalModuleDefinition","webpack://OverlayAPI/webpack/bootstrap","webpack://OverlayAPI/webpack/runtime/define property getters","webpack://OverlayAPI/webpack/runtime/hasOwnProperty shorthand","webpack://OverlayAPI/./src/utils/logger.ts","webpack://OverlayAPI/./src/utils/getter.ts","webpack://OverlayAPI/./src/modules/injectExtendData.ts","webpack://OverlayAPI/./src/modules/isCEFSharp.ts","webpack://OverlayAPI/./src/utils/adder.ts","webpack://OverlayAPI/./src/modules/mergeCombatant.ts","webpack://OverlayAPI/./src/overlay.ts","webpack://OverlayAPI/./src/modules/jobClassConversion.ts","webpack://OverlayAPI/./src/index.ts"],"names":["root","factory","__webpack_require__","exports","definition","key","obj","prop","logInfo","args","logError","logWarn","getInt","input","getPctNum","str","exp","parseJob","jobName","dps","healer","tank","hand","land","parsePlayer","data","maxHit","maxHitDamage","maxHitData","maxHeal","maxHealDamage","maxHealData","jobParsed","parseEncounter","parseLimitBreak","injectExtendData","parsedData","isCEFSharp","addNumber","sum","i","addPct","addHitPct","numerator","denominator","addOverHealPct","tsum","tnum","num","addMax","max","mergeCombatant","last10DPS","last30DPS","last60DPS","hps","swings","hits","deaths","direct","crit","directCrit","damage","damageTaken","damagePct","healed","healsTaken","healsPct","overHeal","overHealPct","item","ret","hitTemp","maxHitTemp","cb","msg","e","url","_doInit","event","cbPos","eventTypesWithListeners","eventType","p","rseq","resolve","OverlayAPI","classJobMap","jobClassMap","class2job","baseClass","job2class","job"],"mappings":"CAAC,SAA0CA,EAAMC,EAAS,CACtD,OAAO,SAAY,UAAY,OAAO,QAAW,SACnD,OAAO,QAAUA,EAAQ,EAClB,OAAO,QAAW,YAAc,OAAO,IAC9C,OAAO,aAAc,CAAC,EAAGA,CAAO,EACzB,OAAO,SAAY,SAC1B,QAAQ,WAAgBA,EAAQ,EAEhCD,EAAK,WAAgBC,EAAQ,CAC/B,GAAG,KAAM,K,kBCRT,IAAIC,EAAsB,CAAC,ECA3BA,EAAoB,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D,EAAQ5D,GAAQ,KAAO,KAAO,KAAK,MAAMA,CAAI,CAAC,CAChD,CAAC,CACH,CAAC,EAEH,OAAO0D,CACT,CAKA,aAAa1D,EAAiB,CAC5B,KAAK,eAAeA,CAAI,CAC1B,CACF,EAnSA,IAAM6D,EAAN,EAAMA,EAEG,UAA+B,KAFlCA,EAIG,eAAiB,EAJpBA,EAMG,WAAa,EA+RtB,QAAeA,ECrUTC,EAA6B,CAEjC,IAAK,MACL,IAAK,MACL,IAAK,MACL,IAAK,MACL,IAAK,MACL,IAAK,MAEL,IAAK,MAEL,IAAK,MACL,IAAK,KACP,EAEMC,EAA6B,CAAC,EACpC,OAAO,KAAKD,CAAW,EAAE,QAASlF,GAAQ,CACxCmF,EAAYD,EAAYlF,IAAQA,CAClC,CAAC,EAEM,SAASoF,GAAUC,EAAmB,CAC3C,OAAOH,EAAYG,IAAcA,CACnC,CAEO,SAASC,GAAUC,EAAa,CACrC,OAAOJ,EAAYI,IAAQA,CAC7B,CCtBA,SAAe,E","file":"overlay.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"OverlayAPI\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OverlayAPI\"] = factory();\n\telse\n\t\troot[\"OverlayAPI\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/**\n * console info logger\n */\nexport function logInfo(...args: unknown[]) {\n console.log('[ffxiv-overlay-api]', ...args);\n}\n\n/**\n * console error logger\n */\nexport function logError(...args: unknown[]) {\n console.error('[ffxiv-overlay-api]', ...args);\n}\n\n/**\n * console warn logger\n */\nexport function logWarn(...args: unknown[]) {\n console.warn('[ffxiv-overlay-api]', ...args);\n}\n","export function getInt(input: string | number) {\n const toInt = Number.parseInt || window.parseInt;\n return toInt(`${input}`) || 0;\n}\n\n/**\n * get number from pct string\n */\nexport function getPctNum(str: string) {\n const exp = /([0-9]+)%/gi.exec(str);\n if (exp && exp[1]) {\n return getInt(exp[1]) || 0;\n }\n return 0;\n}\n","import {\n JobType,\n CombatantData,\n EncounterData,\n LimitBreakData,\n EventData,\n ExtendData,\n} from '../types';\nimport { getPctNum, getInt } from '../utils/getter';\n\n/**\n * parse job type\n */\nfunction parseJob(jobName: string): { name: string; type: JobType } {\n jobName = jobName.toLowerCase();\n\n const dps = [\n // base\n 'acn',\n 'arc',\n 'lnc',\n 'pgl',\n 'rog',\n 'thm',\n // melee\n 'drg',\n 'mnk',\n 'nin',\n 'sam',\n 'rpr',\n // magical ranged\n 'smn',\n 'blm',\n 'rdm',\n // physical ranged\n 'brd',\n 'mch',\n 'dnc',\n // special\n 'blu',\n ];\n const healer = [\n // base\n 'cnj',\n // add\n 'whm',\n 'sch',\n 'ast',\n 'sge',\n ];\n const tank = [\n // base\n 'gla',\n 'mrd',\n // add\n 'pld',\n 'war',\n 'drk',\n 'gnb',\n ];\n\n const hand = ['crp', 'bsm', 'arm', 'gsm', 'lwr', 'wvr', 'alc', 'cul'];\n const land = ['bot', 'fsh', 'min'];\n\n if (dps.includes(jobName)) {\n return { name: jobName, type: 'dps' };\n } else if (healer.includes(jobName)) {\n return { name: jobName, type: 'healer' };\n } else if (tank.includes(jobName)) {\n return { name: jobName, type: 'tank' };\n } else if (hand.includes(jobName)) {\n return { name: jobName, type: 'hand' };\n } else if (land.includes(jobName)) {\n return { name: jobName, type: 'land' };\n } else {\n return { name: jobName || 'unknown', type: 'unknown' };\n }\n}\n\n/**\n * parse single player\n */\nfunction parsePlayer(data: any): CombatantData {\n let [maxHit, maxHitDamage] = ['', 0];\n const maxHitData = (data.maxhit || '').split('-');\n if (maxHitData.length > 1) {\n maxHit = maxHitData[0];\n maxHitDamage = getInt(maxHitData[1]);\n }\n let [maxHeal, maxHealDamage] = ['', 0];\n const maxHealData = (data.maxheal || '').split('-');\n if (maxHealData.length > 1) {\n maxHeal = maxHealData[0];\n maxHealDamage = getInt(maxHealData[1]);\n }\n\n const jobParsed = parseJob(data.Job || '');\n\n return {\n name: data.name,\n\n job: jobParsed.name,\n jobType: jobParsed.type,\n\n dps: getInt(data.encdps),\n last10DPS: getInt(data.Last10DPS),\n last30DPS: getInt(data.Last30DPS),\n last60DPS: getInt(data.Last60DPS),\n hps: getInt(data.enchps),\n\n swings: getInt(data.swings),\n hits: getInt(data.hits),\n deaths: getInt(data.deaths),\n\n directHits: getInt(data.DirectHitCount),\n directHitPct: data.DirectHitPct || '',\n critHits: getInt(data.crithits),\n critHitPct: data['crithit%'] || '',\n directCritHits: getInt(data.CritDirectHitCount),\n directCritHitPct: data.CritDirectHitPct || '',\n\n damage: getInt(data.damage),\n damageTaken: getInt(data.damagetaken),\n damagePct: data['damage%'] || '',\n\n healed: getInt(data.healed),\n healsTaken: getInt(data.healstaken),\n healsPct: data['healed%'] || '', // this includes shield pct\n overHeal: getInt(data.overHeal),\n overHealPct: data.OverHealPct || '',\n shield: getInt(data.damageShield),\n shieldPct: `${\n Math.round(\n (getInt(data.damageShield) / getInt(data.healed) || 0) *\n getPctNum(data['healed%'] || '')\n ) || 0\n }%`,\n\n maxHit,\n maxHitDamage,\n maxHeal,\n maxHealDamage,\n };\n}\n\n/**\n * parse encounter data\n */\nfunction parseEncounter(data: any): EncounterData {\n return {\n duration: data.duration || '',\n durationSeconds: getInt(data.DURATION),\n zoneName: data.CurrentZoneName || '',\n\n dps: getInt(data.encdps),\n last10DPS: getInt(data.Last10DPS),\n last30DPS: getInt(data.Last30DPS),\n last60DPS: getInt(data.Last60DPS),\n hps: getInt(data.enchps),\n\n damage: getInt(data.damage),\n healed: getInt(data.healed),\n shield: getInt(data.damageShield),\n };\n}\n\n/**\n * parse LB data\n */\nfunction parseLimitBreak(data: any): LimitBreakData {\n let maxHit = '';\n const maxHitData = (data.maxhit || '').split('-');\n if (maxHitData.length > 1) {\n maxHit = maxHitData[0];\n }\n let maxHeal = '';\n const maxHealData = (data.maxheal || '').split('-');\n if (maxHealData.length > 1) {\n maxHeal = maxHealData[0];\n }\n\n return {\n name: 'Limit Break',\n\n dps: getInt(data.encdps),\n hps: getInt(data.enchps),\n\n damage: getInt(data.damage),\n healed: getInt(data.healed),\n shield: getInt(data.damageShield),\n\n maxHit,\n maxHeal,\n };\n}\n\n/**\n * inject extended data\n */\nfunction injectExtendData(data: EventData): EventData {\n if (data.type === 'CombatData') {\n // common data\n const parsedData: ExtendData = {\n active: data.isActive === 'true' || data.isActive === true,\n encounter: parseEncounter(data.Encounter),\n combatant: [],\n };\n\n // combatant\n const combatantKeys = Object.keys(data.Combatant);\n const combatantValidKeys = combatantKeys.filter((key) =>\n Object.prototype.hasOwnProperty.call(data.Combatant, key)\n );\n combatantValidKeys.forEach((key) => {\n if (key === 'Limit Break') {\n parsedData.limitBreak = parseLimitBreak(data.Combatant[key]);\n } else {\n parsedData.combatant.push(parsePlayer(data.Combatant[key]));\n }\n });\n\n data.extendData = parsedData;\n }\n return data;\n}\n\nexport default injectExtendData;\n","function isCEFSharp() {\n return !!window.OverlayPluginApi;\n}\n\nexport default isCEFSharp;\n","import { getPctNum } from './getter';\n\nexport function addNumber(...args: number[]) {\n if (!args.length) {\n return 0;\n }\n let sum = 0;\n for (let i = 0; i < args.length; i++) {\n sum += args[i] || 0;\n }\n return sum;\n}\n\n/**\n * damagePct, healsPct, etc.\n */\nexport function addPct(...args: string[]) {\n if (!args.length) {\n return '0%';\n }\n let sum = 0;\n for (let i = 0; i < args.length; i++) {\n const num = getPctNum(args[i]);\n sum += num;\n }\n return `${sum}%`;\n}\n\nexport interface HitData {\n hits: number; // this type of hit number\n totalHits: number; // total number of hits\n}\n/**\n * directHitPct, critHitPct, etc.\n */\nexport function addHitPct(...args: HitData[]) {\n if (!args.length) {\n return { hits: 0, hitPct: '0%' };\n }\n let numerator = 0;\n let denominator = 0;\n for (let i = 0; i < args.length; i++) {\n numerator += args[i].hits || 0;\n denominator += args[i].totalHits || 0;\n }\n if (denominator === 0 || numerator === 0) {\n return { hits: 0, hitPct: '0%' };\n }\n return {\n hits: numerator,\n hitPct: `${Math.round((numerator / denominator) * 100)}%`,\n };\n}\n\nexport function addOverHealPct(...args: string[]) {\n if (!args.length) {\n return '0%';\n }\n let tsum = 0;\n let tnum = 0;\n for (let i = 0; i < args.length; i++) {\n const num = getPctNum(args[i]);\n if (num > 0) {\n tsum += num;\n tnum++;\n }\n }\n if (tnum === 0) {\n return '0%';\n }\n return `${Math.round(tsum / tnum)}%`;\n}\n\nexport interface MaxHitData {\n hit: string;\n hitDamage: number;\n}\n/**\n * maxHit, maxHeal, etc.\n */\nexport function addMax(...args: MaxHitData[]): MaxHitData {\n if (!args.length) {\n return { hit: '', hitDamage: 0 };\n }\n let max = { hit: '', hitDamage: 0 };\n for (let i = 0; i < args.length; i++) {\n if (args[i].hitDamage > max.hitDamage) {\n max = args[i];\n }\n }\n return max;\n}\n","import {\n addNumber,\n addPct,\n addMax,\n addHitPct,\n addOverHealPct,\n HitData,\n MaxHitData,\n} from '../utils/adder';\nimport { CombatantData } from '../types';\n\nfunction mergeCombatant(...args: CombatantData[]) {\n if (!args.length) {\n return null;\n }\n\n const dps: number[] = [];\n const last10DPS: number[] = [];\n const last30DPS: number[] = [];\n const last60DPS: number[] = [];\n const hps: number[] = [];\n\n const swings: number[] = [];\n const hits: number[] = [];\n const deaths: number[] = [];\n\n const direct: HitData[] = [];\n const crit: HitData[] = [];\n const directCrit: HitData[] = [];\n\n const damage: number[] = [];\n const damageTaken: number[] = [];\n const damagePct: string[] = [];\n\n const healed: number[] = [];\n const healsTaken: number[] = [];\n const healsPct: string[] = [];\n const overHeal: number[] = [];\n const overHealPct: string[] = [];\n\n const maxHit: MaxHitData[] = [];\n const maxHeal: MaxHitData[] = [];\n\n args.forEach((item) => {\n dps.push(item.dps);\n last10DPS.push(item.last10DPS);\n last30DPS.push(item.last30DPS);\n last60DPS.push(item.last60DPS);\n hps.push(item.hps);\n\n swings.push(item.swings);\n hits.push(item.hits);\n deaths.push(item.deaths);\n\n direct.push({ hits: item.directHits, totalHits: item.hits });\n crit.push({ hits: item.critHits, totalHits: item.hits });\n directCrit.push({ hits: item.directCritHits, totalHits: item.hits });\n\n damage.push(item.damage);\n damageTaken.push(item.damageTaken);\n damagePct.push(item.damagePct);\n\n healed.push(item.healed);\n healsTaken.push(item.healsTaken);\n healsPct.push(item.healsPct);\n overHeal.push(item.overHeal);\n overHealPct.push(item.overHealPct);\n\n maxHit.push({ hit: item.maxHit, hitDamage: item.maxHitDamage });\n maxHeal.push({ hit: item.maxHeal, hitDamage: item.maxHealDamage });\n });\n\n const ret: CombatantData = {\n name: args[0].name,\n\n job: args[0].job,\n jobType: args[0].jobType,\n\n dps: addNumber(...dps),\n last10DPS: addNumber(...last10DPS),\n last30DPS: addNumber(...last30DPS),\n last60DPS: addNumber(...last60DPS),\n hps: addNumber(...hps),\n\n swings: addNumber(...swings),\n hits: addNumber(...hits),\n deaths: addNumber(...deaths),\n\n damage: addNumber(...damage),\n damageTaken: addNumber(...damageTaken),\n damagePct: addPct(...damagePct),\n\n healed: addNumber(...healed),\n healsTaken: addNumber(...healsTaken),\n healsPct: addPct(...healsPct),\n overHeal: addNumber(...overHeal),\n overHealPct: addOverHealPct(...overHealPct),\n } as CombatantData;\n\n let hitTemp = addHitPct(...direct);\n ret.directHits = hitTemp.hits;\n ret.directHitPct = hitTemp.hitPct;\n hitTemp = addHitPct(...crit);\n ret.critHits = hitTemp.hits;\n ret.critHitPct = hitTemp.hitPct;\n hitTemp = addHitPct(...directCrit);\n ret.directCritHits = hitTemp.hits;\n ret.directCritHitPct = hitTemp.hitPct;\n\n let maxHitTemp = addMax(...maxHit);\n ret.maxHit = maxHitTemp.hit;\n ret.maxHitDamage = maxHitTemp.hitDamage;\n maxHitTemp = addMax(...maxHeal);\n ret.maxHeal = maxHitTemp.hit;\n ret.maxHealDamage = maxHitTemp.hitDamage;\n\n return ret;\n}\n\nexport default mergeCombatant;\n","import { logInfo, logError, logWarn } from './utils/logger';\nimport injectExtendData from './modules/injectExtendData';\nimport isCEFSharp from './modules/isCEFSharp';\nimport mergeCombatant from './modules/mergeCombatant';\nimport { EventType, EventData, EventCallback } from './types';\n\n// messages callbacks in callback mode\ntype MsgCallback = (msg: any) => void;\n\n// messages send with `_sendMessage`\ninterface MsgPacket {\n msg: any;\n cb?: MsgCallback;\n}\n\ntype EventCenterItem = {\n started: boolean;\n listeners: EventCallback[];\n};\n\ntype EventCenter = {\n CombatData: EventCenterItem;\n LogLine: EventCenterItem;\n ImportedLogLines: EventCenterItem;\n ChangeZone: EventCenterItem;\n ChangePrimaryPlayer: EventCenterItem;\n OnlineStatusChanged: EventCenterItem;\n PartyChanged: EventCenterItem;\n BroadcastMessage: EventCenterItem;\n};\n\n// `common.js` L44\ninterface ResponsePromises {\n [rseq: number]: (...args: any[]) => void; // `resolve()` functions from Promise\n}\n\nclass OverlayAPI {\n // singleton\n static _instance: OverlayAPI | null = null;\n // function for merging combatant like pets into first player arg\n static mergeCombatant = mergeCombatant;\n // check if in overlay plugin emblemed cef\n static isCEFSharp = isCEFSharp;\n\n // plugin init status\n private _status = false;\n\n // event subscribers\n private _eventCenter: EventCenter = {\n CombatData: { started: false, listeners: [] },\n LogLine: { started: false, listeners: [] },\n ImportedLogLines: { started: false, listeners: [] },\n ChangeZone: { started: false, listeners: [] },\n ChangePrimaryPlayer: { started: false, listeners: [] },\n OnlineStatusChanged: { started: false, listeners: [] },\n PartyChanged: { started: false, listeners: [] },\n BroadcastMessage: { started: false, listeners: [] },\n };\n // waiting queue before api init\n private _queue: MsgPacket[] = [];\n\n // websocket mode related things\n private _wsURL =\n Array.from(\n /[?&]OVERLAY_WS=([^&]+)/.exec(window.location.href) ||\n /[?&]HOST_PORT=([^&]+)/.exec(window.location.href) ||\n []\n )[1] || '';\n private _ws: WebSocket | null = null;\n private _rseqCounter = 0;\n private _responsePromises: ResponsePromises = {};\n\n /**\n * init API\n */\n constructor() {\n // singleton\n if (OverlayAPI._instance) {\n logWarn(`class OverlayAPI should only have one instance`);\n return OverlayAPI._instance;\n }\n\n // check mode\n if (this._wsURL) {\n logInfo('initializing api in websocket mode...');\n this._initWS();\n } else {\n logInfo('initializing api in callback mode...');\n this._initCB();\n }\n // `common.js` _L97 binding\n window.dispatchOverlayEvent = this._triggerEvents.bind(this);\n\n // singleton\n if (!OverlayAPI._instance) {\n OverlayAPI._instance = this;\n }\n }\n\n /**\n * `common.js` L90\n * event trigger function, need `this` binding\n */\n private _triggerEvents(data: EventData) {\n // if this event type has subscribers\n if (this._eventCenter[data.type]) {\n // trigger all this event's callback\n for (const cb of this._eventCenter[data.type].listeners) {\n cb(injectExtendData(data));\n }\n }\n }\n\n /**\n * `common.js` L12 & L65\n * send message in callback mode & websocket mode\n */\n private _sendMessage(msg: any, cb?: MsgCallback) {\n if (this._wsURL) {\n if (this._status) {\n try {\n (this._ws as WebSocket).send(JSON.stringify(msg));\n } catch (e) {\n logError(e, msg);\n return;\n }\n } else {\n this._queue.push({ msg });\n }\n } else {\n if (this._status) {\n try {\n window.OverlayPluginApi.callHandler(JSON.stringify(msg), cb);\n } catch (e) {\n logError(e, msg);\n return;\n }\n } else {\n this._queue.push({ msg, cb });\n }\n }\n }\n\n /**\n * `common.js` L19\n * init api in websocket mode\n */\n private _initWS() {\n // legacy ws url support\n let url = this._wsURL;\n if (!url.includes('/ws')) {\n url += (url.endsWith('/') ? '' : '/') + 'ws';\n }\n // check & init or reinit websocket\n const _doInit = () => {\n this._ws = new WebSocket(url);\n // log error & retry after 1s\n this._ws.addEventListener('error', () => {\n try {\n this._ws && this._ws.close();\n // eslint-disable-next-line no-empty\n } catch {}\n setTimeout(() => {\n _doInit();\n }, 1000);\n });\n // successfully connected WebSocket\n this._ws.addEventListener('open', () => {\n this._status = true;\n // send all messages in queue to OverlayPlugin\n for (const { msg } of this._queue) {\n this._sendMessage(msg);\n }\n logInfo('websocket mode api ready');\n });\n // on message loaded from WebSocket\n this._ws.addEventListener('message', (msg) => {\n let data: EventData;\n try {\n data = JSON.parse(msg.data) as EventData;\n } catch (e) {\n logError(e, msg);\n return;\n }\n // `common.js` L44\n if (data.rseq !== undefined && this._responsePromises[data.rseq]) {\n this._responsePromises[data.rseq](data);\n delete this._responsePromises[data.rseq];\n } else {\n this._triggerEvents(data);\n }\n });\n };\n _doInit();\n }\n\n /**\n * `common.js` L72\n * init api in callback mode\n */\n private _initCB() {\n // if CEF environment not ready retry after 1s\n if (!window.OverlayPluginApi || !window.OverlayPluginApi.ready) {\n setTimeout(() => {\n this._initCB();\n }, 1000);\n return;\n }\n // mark api loaded\n this._status = true;\n // bind `this` for callback function called by OverlayAPI\n // `common.js` L81 binding\n window.__OverlayCallback = this._triggerEvents.bind(this);\n // send all messages in queue to OverlayPlugin\n for (const { msg, cb } of this._queue) {\n this._sendMessage(msg, cb);\n }\n logInfo('callback mode api ready');\n }\n\n /**\n * add an event listener\n */\n addListener(event: EventType, cb: EventCallback) {\n if (this._eventCenter[event].started) {\n logWarn(\n `listener for \\`${event}\\` added after event transmission already started`\n );\n logWarn(`some events might have been missed`);\n logWarn(`please register your listeners before calling \\`startEvent()\\``);\n }\n // push events\n if (typeof cb === 'function') {\n this._eventCenter[event].listeners.push(cb);\n logInfo(`listener for \\`${event}\\` added`);\n }\n }\n\n /**\n * remove a listener\n */\n removeListener(event: EventType, cb: EventCallback) {\n if (typeof cb === 'function') {\n const cbPos = this._eventCenter[event].listeners.indexOf(cb);\n if (cbPos > -1) {\n this._eventCenter[event].listeners.splice(cbPos, 1);\n logInfo(`listener for \\`${event}\\` removed`);\n } else {\n logWarn(`listener for \\`${event}\\` not found`);\n }\n }\n }\n\n /**\n * remove all listener of one event type\n */\n removeAllListener(event: EventType) {\n this._eventCenter[event].listeners = [];\n logInfo(`all listener for \\`${event}\\` removed`);\n }\n\n /**\n * get all listeners of a event\n */\n getAllListener(event: EventType) {\n return this._eventCenter[event].listeners;\n }\n\n /**\n * start listening event\n */\n startEvent() {\n const eventTypesWithListeners = (\n Object.keys(this._eventCenter) as Array\n ).filter((eventType) => {\n return this._eventCenter[eventType].listeners.length > 0;\n });\n this._sendMessage({\n call: 'subscribe',\n events: eventTypesWithListeners,\n });\n logInfo(\n `${eventTypesWithListeners.length} types of event transmission started`\n );\n }\n\n /**\n * ends current encounter and save it, not working in websocket mode\n */\n async endEncounter() {\n if (this._status && isCEFSharp()) {\n await window.OverlayPluginApi.endEncounter();\n logInfo('encounter ended');\n }\n }\n\n /**\n * `common.js` L122\n * this function allows you to call an overlay handler,\n * these handlers are declared by Event Sources,\n * either built into OverlayPlugin or loaded through addons like Cactbot\n */\n callHandler(msg: any) {\n let p: Promise;\n if (this._wsURL) {\n const rseq = this._rseqCounter++;\n msg.rseq = rseq;\n p = new Promise((resolve) => {\n this._responsePromises[rseq] = resolve;\n });\n this._sendMessage(msg);\n } else {\n p = new Promise((resolve) => {\n this._sendMessage(msg, (data) => {\n resolve(data == null ? null : JSON.parse(data));\n });\n });\n }\n return p;\n }\n\n /**\n * simulate triggering event once\n */\n simulateData(data: EventData) {\n this._triggerEvents(data);\n }\n}\n\nexport default OverlayAPI;\n","interface ConversionMap {\n [key: string]: string;\n}\n\nconst classJobMap: ConversionMap = {\n // dps\n acn: 'smn',\n arc: 'brd',\n lnc: 'drg',\n pgl: 'mnk',\n rog: 'nin',\n thm: 'blm',\n // healer\n cnj: 'whm',\n // tank\n gla: 'pld',\n mrd: 'war',\n};\n\nconst jobClassMap: ConversionMap = {};\nObject.keys(classJobMap).forEach((key) => {\n jobClassMap[classJobMap[key]] = key;\n});\n\nexport function class2job(baseClass: string) {\n return classJobMap[baseClass] || baseClass;\n}\n\nexport function job2class(job: string) {\n return jobClassMap[job] || job;\n}\n","/*! ffxiv-overlay-plugin | DSRKafuU (https://dsrkafuu.net) | Copyright (c) MIT License */\n\n/* source `common.js` 4a00a65 */\n/* https://github.com/ngld/OverlayPlugin/commits/master/docs/assets/shared/common.js */\n\nimport OverlayAPI from './overlay';\n\nexport { OverlayAPI };\nexport default OverlayAPI;\n\nexport { default as isCEFSharp } from './modules/isCEFSharp';\nexport { class2job, job2class } from './modules/jobClassConversion';\nexport { default as mergeCombatant } from './modules/mergeCombatant';\n\nexport type {\n JobType,\n EncounterData,\n LimitBreakData,\n CombatantData,\n ExtendData,\n EventType,\n EventData,\n EventCallback,\n} from './types';\n"],"sourceRoot":""}