diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 331fa88..fb1ca09 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"kCAEA,IAAIA,EAAa,4EAEjBC,EAAOC,QAAU,SAASC,GACtB,OAAQA,GAAQ,IAAIC,QAAQJ,GAAY,SAASK,GAC7C,MAAO,YAAcA,EAAM,KAAOA,EAAM,MAC3C,GACJ,C,GCPGC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaP,QAGrB,IAAID,EAASK,EAAyBE,GAAY,CAGjDN,QAAS,CAAC,GAOX,OAHAS,EAAoBH,GAAUP,EAAQA,EAAOC,QAASK,GAG/CN,EAAOC,OACf,CCrBAK,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACb,EAASe,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEjB,EAASgB,IAC5EE,OAAOC,eAAenB,EAASgB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFlB,EAAoBsB,EAAK3B,IACH,oBAAX4B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAenB,EAAS4B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAenB,EAAS,aAAc,CAAE8B,OAAO,GAAO,E,mCCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAzC,SAASC,EAAgBjB,EAAGkB,GAMzC,OALAD,EAAkBh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AAa,QAAUC,IAAUvB,IAAiBe,EAAEC,MAAMZ,KAErG,GAEH,CAAC,SAAU,WAAWoB,SAAS3B,GAC5B,CACEC,KAAKS,sBAAsB,CACzBC,KAAM,SACNT,QAAS,sBAAsBF,EAAxB,cACPY,MAAOP,IAAAA,WAAeQ,MAAM,6CAC5BG,UAAU,KAGd,GACS,YAAZhB,EACGC,KAAKS,sBAAsB,CACzBC,KAAM,UACNT,QAAS,sCACTU,MAAOP,IAAAA,WAAeQ,MAAM,6CAE9B,GACHZ,KAAK2B,iBAIb,E,EA5DkBpC,CAA0BqC,KEJ/CxB,IAAAA,aAAiByB,IAAI,aAAa,WAChCzB,IAAAA,cAAA,IAAsB,aAAa0B,aAAavC,EACjD,G","sources":["webpack://@fof/geoip/./node_modules/linkify-lite/index.js","webpack://@fof/geoip/webpack/bootstrap","webpack://@fof/geoip/webpack/runtime/compat get default export","webpack://@fof/geoip/webpack/runtime/define property getters","webpack://@fof/geoip/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/geoip/webpack/runtime/make namespace object","webpack://@fof/geoip/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/geoip/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/geoip/./src/admin/components/ExtensionSettingsPage.js","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/geoip/./src/admin/index.js"],"sourcesContent":["'use strict';\n\nvar urlPattern = /(?:https?:)?\\/\\/(?:(?:[\\w-]+\\.)+[\\w/#@~.-]*)(?:\\?(?:[\\w&=.!,;$#%-]+)?)?/gi;\n\nmodule.exports = function(text) {\n return (text || '').replace(urlPattern, function(url) {\n return '' + url + '';\n });\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport extractText from 'flarum/common/utils/extractText';\nimport linkify from 'linkify-lite';\n\nexport default class GeoipSettingsPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n content() {\n const service = this.setting('fof-geoip.service')();\n const errorTime = Number(app.data.settings[`fof-geoip.services.${service}.last_error_time`]) * 1000;\n let error = app.data.settings[`fof-geoip.services.${service}.error`];\n\n if (error) error = linkify(error);\n\n return [\n
\n
\n
\n {this.buildSettingComponent({\n type: 'select',\n setting: 'fof-geoip.service',\n label: app.translator.trans('fof-geoip.admin.settings.service_label'),\n options: app.data['fof-geoip.services'].reduce((o, p) => {\n o[p] = app.translator.trans(`fof-geoip.admin.settings.service_${p}_label`);\n\n return o;\n }, {}),\n required: true,\n help: service && m.trust(linkify(extractText(app.translator.trans(`fof-geoip.admin.settings.service_${service}_description`)))),\n })}\n
\n {error\n ? Alert.component(\n {\n className: 'Form-group',\n dismissible: false,\n },\n [{humanTime(errorTime)}, m.trust(error)]\n )\n : ''}\n\n {['ipdata', 'ipstack'].includes(service)\n ? [\n this.buildSettingComponent({\n type: 'string',\n setting: `fof-geoip.services.${service}.access_key`,\n label: app.translator.trans('fof-geoip.admin.settings.access_key_label'),\n required: true,\n }),\n ]\n : []}\n {service === 'ipstack'\n ? this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-geoip.services.ipstack.security',\n label: app.translator.trans('fof-geoip.admin.settings.security_label'),\n })\n : []}\n {this.submitButton()}\n
\n
,\n ];\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/admin/app';\nimport GeoipSettingsPage from './components/ExtensionSettingsPage';\n\napp.initializers.add('fof/geoip', () => {\n app.extensionData.for('fof-geoip').registerPage(GeoipSettingsPage);\n});\n"],"names":["urlPattern","module","exports","text","replace","url","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","__proto__","GeoipSettingsPage","subClass","superClass","create","constructor","oninit","vnode","content","service","this","setting","errorTime","Number","app","settings","error","linkify","className","buildSettingComponent","type","label","trans","options","reduce","required","help","m","trust","extractText","Alert","dismissible","style","textTransform","marginRight","humanTime","includes","submitButton","ExtensionPage","add","registerPage"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"kCAEA,IAAIA,EAAa,4EAEjBC,EAAOC,QAAU,SAASC,GACtB,OAAQA,GAAQ,IAAIC,QAAQJ,GAAY,SAASK,GAC7C,MAAO,YAAcA,EAAM,KAAOA,EAAM,MAC5C,GACJ,C,GCPIC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaP,QAGrB,IAAID,EAASK,EAAyBE,GAAY,CAGjDN,QAAS,CAAC,GAOX,OAHAS,EAAoBH,GAAUP,EAAQA,EAAOC,QAASK,GAG/CN,EAAOC,OACf,CCrBAK,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACb,EAASe,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEjB,EA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AAsBN,EAAO,UAI3D,OAFIO,IAAOA,EAAQC,IAAQD,IAEpB,CACLE,EAAA,OAAKC,UAAU,aACbD,EAAA,OAAKC,UAAU,WACbD,EAAA,OAAKC,UAAU,cACZT,KAAKU,sBAAsB,CAC1BC,KAAM,SACNV,QAAS,oBACTW,MAAOR,IAAAA,WAAeS,MAAM,0CAC5BC,QAASV,IAAAA,KAAS,sBAAsBW,QAAO,SAACjD,EAAGkB,GAGjD,OAFAlB,EAAEkB,GAAKoB,IAAAA,WAAeS,MAAM,oCAAoC7B,EAAC,UAE1DlB,CACT,GAAG,CAAC,GACJkD,UAAU,EACVC,KAAMlB,GAAWS,EAAEU,MAAMX,IAAQY,IAAYf,IAAAA,WAAeS,MAAM,oCAAoCd,EAAO,sBAGhHO,EACGc,IAAAA,UACE,CACEX,UAAW,aACXY,aAAa,GAEf,CAACb,EAAA,KAAGc,MAAO,CAAEC,cAAe,YAAaC,YAAa,QAAUC,IAAUvB,IAAiBM,EAAEU,MAAMZ,KAErG,GAEH,CAAC,SAAU,WAAWoB,SAAS3B,GAC5B,CACEC,KAAKU,sBAAsB,CACzBC,KAAM,SACNV,QAAS,sBAAsBF,EAAO,cACtCa,MAAOR,IAAAA,WAAeS,MAAM,6CAC5BG,UAAU,KAGd,GACS,YAAZjB,EACGC,KAAKU,sBAAsB,CACzBC,KAAM,UACNV,QAAS,sCACTW,MAAOR,IAAAA,WAAeS,MAAM,6CAE9B,GACHb,KAAK2B,iBAId,EAACxC,CAAA,CA5DmC,CAASyC,KEJ/CxB,IAAAA,aAAiByB,IAAI,aAAa,WAChCzB,IAAAA,cAAiB,IAAK,aAAa0B,aAAa3C,EAClD,G","sources":["webpack://@fof/geoip/./node_modules/linkify-lite/index.js","webpack://@fof/geoip/webpack/bootstrap","webpack://@fof/geoip/webpack/runtime/compat get default export","webpack://@fof/geoip/webpack/runtime/define property getters","webpack://@fof/geoip/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/geoip/webpack/runtime/make namespace object","webpack://@fof/geoip/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/geoip/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/geoip/./src/admin/components/ExtensionSettingsPage.js","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/geoip/./src/admin/index.js"],"sourcesContent":["'use strict';\n\nvar urlPattern = /(?:https?:)?\\/\\/(?:(?:[\\w-]+\\.)+[\\w/#@~.-]*)(?:\\?(?:[\\w&=.!,;$#%-]+)?)?/gi;\n\nmodule.exports = function(text) {\n return (text || '').replace(urlPattern, function(url) {\n return '' + url + '';\n });\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport extractText from 'flarum/common/utils/extractText';\nimport linkify from 'linkify-lite';\n\nexport default class GeoipSettingsPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n content() {\n const service = this.setting('fof-geoip.service')();\n const errorTime = Number(app.data.settings[`fof-geoip.services.${service}.last_error_time`]) * 1000;\n let error = app.data.settings[`fof-geoip.services.${service}.error`];\n\n if (error) error = linkify(error);\n\n return [\n
\n
\n
\n {this.buildSettingComponent({\n type: 'select',\n setting: 'fof-geoip.service',\n label: app.translator.trans('fof-geoip.admin.settings.service_label'),\n options: app.data['fof-geoip.services'].reduce((o, p) => {\n o[p] = app.translator.trans(`fof-geoip.admin.settings.service_${p}_label`);\n\n return o;\n }, {}),\n required: true,\n help: service && m.trust(linkify(extractText(app.translator.trans(`fof-geoip.admin.settings.service_${service}_description`)))),\n })}\n
\n {error\n ? Alert.component(\n {\n className: 'Form-group',\n dismissible: false,\n },\n [{humanTime(errorTime)}, m.trust(error)]\n )\n : ''}\n\n {['ipdata', 'ipstack'].includes(service)\n ? [\n this.buildSettingComponent({\n type: 'string',\n setting: `fof-geoip.services.${service}.access_key`,\n label: app.translator.trans('fof-geoip.admin.settings.access_key_label'),\n required: true,\n }),\n ]\n : []}\n {service === 'ipstack'\n ? this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-geoip.services.ipstack.security',\n label: app.translator.trans('fof-geoip.admin.settings.security_label'),\n })\n : []}\n {this.submitButton()}\n
\n
,\n ];\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/admin/app';\nimport GeoipSettingsPage from './components/ExtensionSettingsPage';\n\napp.initializers.add('fof/geoip', () => {\n app.extensionData.for('fof-geoip').registerPage(GeoipSettingsPage);\n});\n"],"names":["urlPattern","module","exports","text","replace","url","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","__proto__","GeoipSettingsPage","_ExtensionPage","subClass","superClass","apply","arguments","create","constructor","_proto","oninit","vnode","content","service","this","setting","errorTime","Number","app","settings","error","linkify","m","className","buildSettingComponent","type","label","trans","options","reduce","required","help","trust","extractText","Alert","dismissible","style","textTransform","marginRight","humanTime","includes","submitButton","ExtensionPage","add","registerPage"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 4964624..ba5a952 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.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AAG/E,IAAV,IAEpC0F,EAAYD,GAAQhC,EAAMqB,SAASa,QAAQF,GACjD,GAAKA,EAAL,CAEA,MAAuC1I,EAAUb,GAAzCc,EAAR,EAAQA,YAAaI,EAArB,EAAqBA,OAAQG,EAA7B,EAA6BA,MAExBkI,EAAK5D,QAAO4D,EAAK5D,MAAQ,CAAC,GAC/B4D,EAAK5D,MAAM,qBAAuB3F,EAAOyH,cAEzC8B,EAAKX,SAAS,GACZ,EAAC,IAAD,CAASpI,KAAMM,GAAiBI,EAAF,KAAgBA,EAAhB,IAA4B,KACxD,cAAOqI,EAAKX,SAAS,KAIrBvH,GACFkG,EAAMqB,SAASc,OAAOF,EAAW,EAAGnI,EAdnB,CAgBpB,CAEGrB,EAAOuB,WAAavB,EAAOC,eAC7BsI,EAAKK,SAASc,OACZ,EACA,EACA,SAAK1C,UAAU,cACb,EAAClC,EAAD,CAAYxD,IAAKtB,EAAOuB,UAAWC,QAASxB,EAAOC,iBA9BxB,CALe,CAuCjD,KEzCHoI,EAAAA,EAAAA,QAAOsB,IAAAA,UAA4B,oBAAoB,SAAUV,EAAmCW,GAClG,IAAMzC,EAASyC,EAAMC,gBAEjB1C,GACF8B,EAAMhB,IACJ,aACA,EAAC,IAAD,CACEjB,UAAU,SACVQ,QAAS,kBAAMtE,IAAAA,MAAUC,KAAK2D,EAAU,CAAEK,OAAQA,GAAzC,EACT,aAAYjE,IAAAA,WAAeE,MAAM,qCAEhCF,IAAAA,WAAeE,MAAM,qCAExB,GAGL,GHbF","sources":["webpack://@fof/geoip/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/geoip/../src/index.js","webpack://@fof/geoip/./node_modules/regenerator-runtime/runtime.js","webpack://@fof/geoip/./node_modules/twemoji-basename/index.js","webpack://@fof/geoip/webpack/bootstrap","webpack://@fof/geoip/webpack/runtime/compat get default export","webpack://@fof/geoip/webpack/runtime/define property getters","webpack://@fof/geoip/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/geoip/webpack/runtime/make namespace object","webpack://@fof/geoip/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/PostMeta']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/geoip/./src/forum/helpers/IPDataHelper.tsx","webpack://@fof/geoip/./src/forum/util/getFlagEmojiUrl.js","webpack://@fof/geoip/./src/forum/helpers/ClipboardHelper.ts","webpack://@fof/geoip/./src/forum/util/copyToClipboard.ts","webpack://@fof/geoip/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/geoip/./node_modules/external-load/index.js","webpack://@fof/geoip/./src/forum/components/ZipCodeMap.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/LabelValue']\"","webpack://@fof/geoip/./src/forum/components/MapModal.tsx","webpack://@fof/geoip/external root \"flarum.core.compat['forum/components/AccessTokensList']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/geoip/./src/forum/models/IPInfo.ts","webpack://@fof/geoip/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/geoip/./src/forum/extend.ts","webpack://@fof/geoip/./src/forum/index.ts","webpack://@fof/geoip/./src/forum/extenders/extendBanIPModal.js","webpack://@fof/geoip/./src/forum/extenders/extendPostMeta.js","webpack://@fof/geoip/./src/forum/extenders/extendAccessTokensList.tsx"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","// country code regex\nconst CC_REGEX = /^[a-z]{2}$/i;\n\n// offset between uppercase ascii and regional indicator symbols\nconst OFFSET = 127397;\n\n/**\n * convert country code to corresponding emoji flag\n * @param {string} cc - country code string\n * @returns {string} country code emoji\n */\nexport default function countryCodeEmoji(cc) {\n if (!CC_REGEX.test(cc)) {\n const type = typeof cc;\n throw new TypeError(\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\n type === 'string' ? cc : type\n }' instead.`,\n );\n }\n\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt() + OFFSET);\n return String.fromCodePoint(...chars);\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/PostMeta'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import IPInfo from '../models/IPInfo';\nimport getFlagEmojiUrl from '../util/getFlagEmojiUrl';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport const getDescription = (ipInfo: IPInfo) => {\n return ipInfo.organization() || ipInfo.isp() || ipInfo.error() || '';\n};\n\nexport const getThreat = (ipInfo: IPInfo) => {\n return ipInfo.threatTypes() && ipInfo.threatTypes().join(', ');\n};\n\nexport const getFlagImage = (ipInfo: IPInfo) => {\n if (ipInfo.countryCode()) {\n const url = getFlagEmojiUrl(ipInfo.countryCode());\n if (url) {\n return (\n \n {ipInfo.countryCode()}\n \n );\n }\n }\n return null;\n};\n\nexport const getIPData = (ipInfo: IPInfo) => {\n const description = getDescription(ipInfo);\n const threat = getThreat(ipInfo);\n const image = getFlagImage(ipInfo);\n\n // Extracting zip and country from ipInfo\n const zip = ipInfo.zipCode();\n const country = ipInfo.countryCode(); // Assuming the country code is used as 'country'\n\n return { description, threat, image, zip, country };\n};\n","import flag from 'country-code-emoji';\nimport convert from 'twemoji-basename';\n\nexport default (countryCode) => {\n const codepoint = flag(countryCode);\n if (!codepoint) return null;\n\n const basename = convert(codepoint);\n return basename ? `https://cdn.jsdelivr.net/gh/twitter/twemoji@14/assets/72x72/${basename}.png` : null;\n};\n","import app from 'flarum/forum/app';\nimport copyToClipboard from '../util/copyToClipboard';\n\nexport const handleCopyIP = (ip: string) => {\n return () => {\n copyToClipboard(ip);\n app.alerts.show({ type: 'success' }, app.translator.trans('fof-geoip.forum.alerts.ip_copied'));\n };\n};\n","export default (str: string): void => {\n if (navigator.clipboard) {\n navigator.clipboard.writeText(str).then(() => {});\n return;\n }\n\n // Fallback method:\n const el: HTMLTextAreaElement = document.createElement('textarea');\n el.value = str;\n el.setAttribute('readonly', '');\n el.style.position = 'absolute';\n el.style.left = '-9999px';\n document.body.appendChild(el);\n\n const selection = document.getSelection();\n const selected: Range | null = selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : null;\n\n el.select();\n document.execCommand('copy');\n document.body.removeChild(el);\n\n if (selected && selection) {\n selection.removeAllRanges();\n selection.addRange(selected);\n }\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","/**\n * Simple resource loader based on David Walsh's tutorial\n * https://davidwalsh.name/javascript-loader\n * https://davidwalsh.name/javascript-functions\n */\nexport default (function() {\n // Function which returns a function\n function _load(tag) {\n return function(url) {\n // This promise will be used by Promise.all to determine success or failure\n return new Promise(function(resolve, reject) {\n var element = document.createElement(tag);\n var parent = \"body\";\n var attr = \"src\";\n\n // Important success and error for the promise\n element.onload = function() {\n resolve(url);\n };\n element.onerror = function() {\n reject(url);\n };\n\n // Need to set different attributes depending on tag type\n switch (tag) {\n case \"script\":\n element.async = true;\n break;\n case \"link\":\n element.type = \"text/css\";\n element.rel = \"stylesheet\";\n attr = \"href\";\n parent = \"head\";\n }\n\n // Inject into document to kick off loading\n element[attr] = url;\n document[parent].appendChild(element);\n });\n };\n }\n\n return {\n css: _load(\"link\"),\n js: _load(\"script\"),\n img: _load(\"img\")\n };\n})();\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport load from 'external-load';\n\nlet addedResources = false;\nconst addResources = async () => {\n if (addedResources) return;\n\n await load.css('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');\n await load.js('https://unpkg.com/leaflet@1.9.4/dist/leaflet.js');\n\n addedResources = true;\n};\n\nexport default class ZipCodeMap extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.data = null;\n\n this.search();\n }\n\n view() {\n if (this.loading) {\n return ;\n } else if (!this.data) {\n return
;\n }\n\n return
;\n }\n\n search() {\n if (this.loading) return;\n\n this.loading = true;\n\n return addResources().then(\n app\n .request({\n url: `https://nominatim.openstreetmap.org/search`,\n method: 'GET',\n params: {\n q: this.attrs.zip,\n countrycodes: this.attrs.country,\n limit: 1,\n format: 'json',\n },\n })\n .then((data) => {\n this.data = data[0];\n this.loading = false;\n\n m.redraw();\n })\n );\n }\n\n configMap(vnode) {\n if (!this.data) return;\n\n const { boundingbox: bounding, display_name: displayName } = this.data;\n\n this.map = L.map(vnode.dom).setView([51.505, -0.09], 5);\n\n L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {\n attribution: '© OpenStreetMap contributors',\n }).addTo(this.map);\n\n L.marker([bounding[0], bounding[2]]).addTo(this.map).bindPopup(displayName).openPopup();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LabelValue'];","import app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport ZipCodeMap from './ZipCodeMap';\nimport IPInfo from '../models/IPInfo';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\nimport LabelValue from 'flarum/common/components/LabelValue';\nimport type Mithril from 'mithril';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\ninterface MapModalAttrs extends IInternalModalAttrs {\n ipInfo?: IPInfo;\n ipAddr: string;\n}\n\nexport default class MapModal extends Modal {\n ipInfo: IPInfo | undefined;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.ipInfo = this.attrs.ipInfo;\n if (this.ipInfo === undefined) {\n this.loadIpInfo();\n }\n }\n\n className() {\n return 'MapModal Modal--medium';\n }\n\n loadIpInfo() {\n app.store\n .find('ip_info', encodeURIComponent(this.attrs.ipAddr))\n .then((ipInfo) => {\n this.ipInfo = ipInfo;\n m.redraw();\n })\n .catch((error) => {\n console.error('Failed to load IP information from the store', error);\n });\n }\n\n title() {\n return app.translator.trans('fof-geoip.forum.map_modal.title');\n }\n\n content() {\n const ipInfo = this.ipInfo;\n\n if (!ipInfo) {\n return (\n
\n \n
\n );\n }\n\n return (\n
\n
\n \n {this.attrs.ipAddr}\n \n }\n />\n {ipInfo.countryCode() && }\n {ipInfo.zipCode() && }\n {ipInfo.isp() && }\n {ipInfo.organization() && (\n \n )}\n {ipInfo.threatLevel() && }\n {ipInfo.threatTypes().length > 0 && (\n \n )}\n {ipInfo.error() && }\n
\n
\n
\n \n
\n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/AccessTokensList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class IPInfo extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n countryCode() {\n return Model.attribute('countryCode').call(this);\n }\n\n zipCode() {\n return Model.attribute('zipCode').call(this);\n }\n\n isp() {\n return Model.attribute('isp').call(this);\n }\n\n organization() {\n return Model.attribute('organization').call(this);\n }\n\n threatLevel() {\n return Model.attribute('threatLevel').call(this);\n }\n\n threatTypes() {\n const raw = Model.attribute('threatTypes').call(this);\n try {\n return JSON.parse(raw);\n } catch (error) {\n return [];\n }\n }\n\n error() {\n return Model.attribute('error').call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","import Extend from 'flarum/common/extenders';\nimport IPInfo from './models/IPInfo';\nimport Post from 'flarum/common/models/Post';\n\nexport default [\n new Extend.Store() //\n .add('ip_info', IPInfo),\n\n new Extend.Model(Post) //\n .hasOne('ip_info'),\n];\n","import app from 'flarum/forum/app';\nimport extendPostMeta from './extenders/extendPostMeta';\nimport extendBanIPModal from './extenders/extendBanIPModal';\nimport extendAccessTokensList from './extenders/extendAccessTokensList';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/geoip', () => {\n extendPostMeta();\n extendBanIPModal();\n\n // This cannot be enabled until https://github.com/flarum/framework/pull/3888 is merged and released\n extendAccessTokensList();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport ZipCodeMap from '../components/ZipCodeMap';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { getIPData } from '../helpers/IPDataHelper';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\n\nexport default function extendBanIPModal() {\n const BanIPModal = flarum.core.compat['fof/ban-ips/components/BanIPModal'];\n\n if (BanIPModal) {\n extend(BanIPModal.prototype, 'content', function (vdom) {\n if (!this.post || !this.post.ipAddress()) return;\n\n const ipInfo = this.post.ip_info();\n const formGroup = vdom.children.find((e) => e?.attrs?.className?.includes('Form-group') && e.children?.find?.((e) => e.tag === 'div'));\n\n if (!ipInfo || !formGroup) return;\n\n for (const child of formGroup.children) {\n const label = child.children.find((e) => e?.tag === 'label');\n const code = label && label.children.find((e) => e?.tag === 'code');\n\n const codeIndex = code && label.children.indexOf(code);\n if (!code) continue;\n\n const { description, threat, image } = getIPData(ipInfo);\n\n if (!code.attrs) code.attrs = {};\n code.attrs['data-threat-level'] = ipInfo.threatLevel();\n\n code.children[1] = (\n \n {code.children[1]}\n \n );\n\n if (image) {\n label.children.splice(codeIndex, 0, image);\n }\n }\n\n if (ipInfo.zipCode() && ipInfo.countryCode()) {\n vdom.children.splice(\n 2,\n 0,\n
\n \n
\n );\n }\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport PostMeta from 'flarum/common/components/PostMeta';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { getIPData } from '../helpers/IPDataHelper';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Button from 'flarum/common/components/Button';\nimport MapModal from '../components/MapModal';\n\nexport default function extendPostMeta() {\n extend(PostMeta.prototype, 'view', function (vdom) {\n const post = this.attrs.post;\n\n // Exit early if there's no post\n if (!post) return;\n\n const ipInformation = post.ip_info();\n\n // Exit early if there's no IP information for the post\n if (!ipInformation) return;\n\n // Extract dropdown from the VDOM\n const menuDropdown = vdom.children.find((e) => e.attrs?.className?.includes('dropdown-menu'));\n\n // Extract IP element for modification\n const ipElement = menuDropdown.children.find((e) => e.tag === 'span' && e.attrs?.className === 'PostMeta-ip');\n\n // Clear any default text from the IP element\n delete ipElement.text;\n\n // Construct the IP element with the tooltip and interactive behavior\n ipElement.children = [
{this.ipItems().toArray()}
];\n\n // If there's a threat level, add it as a data attribute for potential styling\n // TODO: move this to an Item?\n if (ipInformation.threatLevel) {\n ipElement.attrs['data-threat-level'] = ipInformation.threatLevel();\n }\n });\n\n PostMeta.prototype.ipItems = function () {\n const items = new ItemList();\n const post = this.attrs.post;\n const ipInformation = post.ip_info();\n const ipAddr = post.data.attributes.ipAddress;\n\n if (ipInformation && ipAddr) {\n const { description, threat, image, zip, country } = getIPData(ipInformation);\n\n items.add(\n 'ipInfo',\n
\n {image}\n \n {ipAddr}\n \n
,\n 100\n );\n\n if (zip && country) {\n items.add(\n 'mapButton',\n \n app.modal.show(MapModal, { ipInfo: ipInformation, ipAddr: ipAddr })}\n aria-label={app.translator.trans('fof-geoip.forum.map_button_label')}\n />\n ,\n 90\n );\n }\n }\n\n return items;\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport AccessTokensList from 'flarum/forum/components/AccessTokensList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport MapModal from '../components/MapModal';\nimport Button from 'flarum/common/components/Button';\nimport type Mithril from 'mithril';\nimport AccessToken from 'flarum/common/models/AccessToken';\n\nexport default function extendAccessTokensList() {\n extend(AccessTokensList.prototype, 'tokenActionItems', function (items: ItemList, token: AccessToken) {\n const ipAddr = token.lastIpAddress();\n\n if (ipAddr) {\n items.add(\n 'geoip-info',\n app.modal.show(MapModal, { ipAddr: ipAddr })}\n aria-label={app.translator.trans('fof-geoip.forum.map_button_label')}\n >\n {app.translator.trans('fof-geoip.forum.map_button_label')}\n ,\n 10\n );\n }\n });\n}\n"],"names":["module","exports","CC_REGEX","cc","test","type","TypeError","chars","_toConsumableArray","toUpperCase","map","c","charCodeAt","OFFSET","String","fromCodePoint","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","str","r","p","l","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","flarum","core","compat","getFlagImage","ipInfo","countryCode","url","codepoint","flag","basename","convert","getFlagEmojiUrl","text","src","alt","height","loading","getIPData","description","organization","isp","getDescription","threat","threatTypes","getThreat","image","zip","zipCode","country","handleCopyIP","ip","navigator","clipboard","writeText","el","document","createElement","setAttribute","style","position","left","body","appendChild","selection","getSelection","selected","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","copyToClipboard","app","show","trans","_setPrototypeOf","_inheritsLoose","subClass","superClass","asyncGeneratorStep","gen","_next","_throw","_load","tag","element","parent","attr","onload","onerror","rel","css","js","img","addedResources","addResources","load","args","arguments","apply","ZipCodeMap","oninit","vnode","data","search","view","size","id","oncreate","configMap","bind","params","q","attrs","countrycodes","limit","format","m","redraw","bounding","boundingbox","display_name","L","dom","setView","tileLayer","attribution","addTo","marker","bindPopup","openPopup","Component","MapModal","loadIpInfo","className","find","encodeURIComponent","ipAddr","console","title","content","label","onclick","threatLevel","Modal","IPInfo","Model","raw","JSON","parse","Extend","add","Post","hasOne","BanIPModal","extend","PostMeta","vdom","post","ipInformation","ip_info","ipElement","children","e","includes","ipItems","toArray","items","ItemList","attributes","ipAddress","icon","formGroup","code","codeIndex","indexOf","splice","AccessTokensList","token","lastIpAddress"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";2BAAAA,EAAOC,QAAU,EAAjBD,inBCCA,IAAME,EAAW,cAGF,OAOA,SAA0BC,GAAAA,IAClCD,EAASE,KAAKD,GAAK,KAChBE,EAAAA,EAAcF,GAAAA,MACd,IAAIG,UAAU,8DAAVA,OAEG,WAATD,EAAoBF,EAAKE,EAAAA,cAAAA,CAAAA,IAKzBE,EAAQC,EAAIL,EAAGM,eAAeC,KAAI,YAAAC,OAAKA,EAAEC,aAjBlC,MAiBiDC,IAAAA,OACvDC,OAAOC,cAAAA,MAAPD,OAAAA,EAAwBP,GAAAA,CAAAA,aCfjC,IAAIS,EAAW,SAAUf,GACvB,aAEA,IAEIgB,EAFAC,EAAKC,OAAOC,U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EAAK7E,MAAM,qBAAuBrG,EAAO0I,cAEzCwC,EAAKpB,SAAS,GACZtJ,EAACC,IAAO,CAACC,KAAMM,GAAiBI,EAAS,KAAKA,EAAM,IAAM,KACxDZ,EAAA,YAAO0K,EAAKpB,SAAS,KAIrBvI,GACFiH,EAAMsB,SAASuB,OAAOF,EAAW,EAAG5J,EAdnB,CAgBrB,CAEIvB,EAAOyB,WAAazB,EAAOC,eAC7BwJ,EAAKK,SAASuB,OACZ,EACA,EACA7K,EAAA,OAAKuH,UAAU,cACbvH,EAAC4E,EAAU,CAAC5D,IAAKxB,EAAOyB,UAAWC,QAAS1B,EAAOC,iBA9BxB,CALe,CAuClD,KEzCFsJ,EAAAA,EAAAA,QAAO+B,IAAAA,UAA4B,oBAAoB,SAAUhB,EAAmCiB,GAClG,IAAMpD,EAASoD,EAAMC,gBAEjBrD,GACFmC,EAAMnB,IACJ,aACA3I,EAACmK,IAAM,CACL5C,UAAU,SACVU,QAAS,kBAAMrF,IAAAA,MAAUC,KAAKmE,EAAU,CAAEW,OAAQA,GAAS,EAC3D,aAAY/E,IAAAA,WAAeE,MAAM,qCAEhCF,IAAAA,WAAeE,MAAM,qCAExB,GAGN,GHbF","sources":["webpack://@fof/geoip/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/geoip/../src/index.js","webpack://@fof/geoip/./node_modules/regenerator-runtime/runtime.js","webpack://@fof/geoip/./node_modules/twemoji-basename/index.js","webpack://@fof/geoip/webpack/bootstrap","webpack://@fof/geoip/webpack/runtime/compat get default export","webpack://@fof/geoip/webpack/runtime/define property getters","webpack://@fof/geoip/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/geoip/webpack/runtime/make namespace object","webpack://@fof/geoip/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/PostMeta']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/geoip/./src/forum/helpers/IPDataHelper.tsx","webpack://@fof/geoip/./src/forum/util/getFlagEmojiUrl.js","webpack://@fof/geoip/./src/forum/helpers/ClipboardHelper.ts","webpack://@fof/geoip/./src/forum/util/copyToClipboard.ts","webpack://@fof/geoip/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/geoip/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/geoip/./node_modules/external-load/index.js","webpack://@fof/geoip/./src/forum/components/ZipCodeMap.js","webpack://@fof/geoip/external root \"flarum.core.compat['common/components/LabelValue']\"","webpack://@fof/geoip/./src/forum/components/MapModal.tsx","webpack://@fof/geoip/external root \"flarum.core.compat['forum/components/AccessTokensList']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/geoip/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/geoip/./src/forum/models/IPInfo.ts","webpack://@fof/geoip/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/geoip/./src/forum/extend.ts","webpack://@fof/geoip/./src/forum/index.ts","webpack://@fof/geoip/./src/forum/extenders/extendBanIPModal.js","webpack://@fof/geoip/./src/forum/extenders/extendPostMeta.js","webpack://@fof/geoip/./src/forum/extenders/extendAccessTokensList.tsx"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","// country code regex\nconst CC_REGEX = /^[a-z]{2}$/i;\n\n// offset between uppercase ascii and regional indicator symbols\nconst OFFSET = 127397;\n\n/**\n * convert country code to corresponding emoji flag\n * @param {string} cc - country code string\n * @returns {string} country code emoji\n */\nexport default function countryCodeEmoji(cc) {\n if (!CC_REGEX.test(cc)) {\n const type = typeof cc;\n throw new TypeError(\n `cc argument must be an ISO 3166-1 alpha-2 string, but got '${\n type === 'string' ? cc : type\n }' instead.`,\n );\n }\n\n const chars = [...cc.toUpperCase()].map(c => c.charCodeAt() + OFFSET);\n return String.fromCodePoint(...chars);\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\n/* https://github.com/twitter/twemoji/blob/gh-pages/LICENSE */\n\nmodule.exports = function (str) {\n var r = []\n var c = 0\n var p = 0\n var i = 0\n var l = str.length\n\n while (i < l) {\n c = str.charCodeAt(i++)\n if (p) {\n r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16))\n p = 0\n } else if (0xD800 <= c && c <= 0xDBFF) {\n p = c\n } else {\n r.push(c.toString(16))\n }\n }\n\n return r.join('-')\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\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))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/PostMeta'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import IPInfo from '../models/IPInfo';\nimport getFlagEmojiUrl from '../util/getFlagEmojiUrl';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport const getDescription = (ipInfo: IPInfo) => {\n return ipInfo.organization() || ipInfo.isp() || ipInfo.error() || '';\n};\n\nexport const getThreat = (ipInfo: IPInfo) => {\n return ipInfo.threatTypes() && ipInfo.threatTypes().join(', ');\n};\n\nexport const getFlagImage = (ipInfo: IPInfo) => {\n if (ipInfo.countryCode()) {\n const url = getFlagEmojiUrl(ipInfo.countryCode());\n if (url) {\n return (\n \n {ipInfo.countryCode()}\n \n );\n }\n }\n return null;\n};\n\nexport const getIPData = (ipInfo: IPInfo) => {\n const description = getDescription(ipInfo);\n const threat = getThreat(ipInfo);\n const image = getFlagImage(ipInfo);\n\n // Extracting zip and country from ipInfo\n const zip = ipInfo.zipCode();\n const country = ipInfo.countryCode(); // Assuming the country code is used as 'country'\n\n return { description, threat, image, zip, country };\n};\n","import flag from 'country-code-emoji';\nimport convert from 'twemoji-basename';\n\nexport default (countryCode) => {\n const codepoint = flag(countryCode);\n if (!codepoint) return null;\n\n const basename = convert(codepoint);\n return basename ? `https://cdn.jsdelivr.net/gh/twitter/twemoji@14/assets/72x72/${basename}.png` : null;\n};\n","import app from 'flarum/forum/app';\nimport copyToClipboard from '../util/copyToClipboard';\n\nexport const handleCopyIP = (ip: string) => {\n return () => {\n copyToClipboard(ip);\n app.alerts.show({ type: 'success' }, app.translator.trans('fof-geoip.forum.alerts.ip_copied'));\n };\n};\n","export default (str: string): void => {\n if (navigator.clipboard) {\n navigator.clipboard.writeText(str).then(() => {});\n return;\n }\n\n // Fallback method:\n const el: HTMLTextAreaElement = document.createElement('textarea');\n el.value = str;\n el.setAttribute('readonly', '');\n el.style.position = 'absolute';\n el.style.left = '-9999px';\n document.body.appendChild(el);\n\n const selection = document.getSelection();\n const selected: Range | null = selection && selection.rangeCount > 0 ? selection.getRangeAt(0) : null;\n\n el.select();\n document.execCommand('copy');\n document.body.removeChild(el);\n\n if (selected && selection) {\n selection.removeAllRanges();\n selection.addRange(selected);\n }\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","/**\n * Simple resource loader based on David Walsh's tutorial\n * https://davidwalsh.name/javascript-loader\n * https://davidwalsh.name/javascript-functions\n */\nexport default (function() {\n // Function which returns a function\n function _load(tag) {\n return function(url) {\n // This promise will be used by Promise.all to determine success or failure\n return new Promise(function(resolve, reject) {\n var element = document.createElement(tag);\n var parent = \"body\";\n var attr = \"src\";\n\n // Important success and error for the promise\n element.onload = function() {\n resolve(url);\n };\n element.onerror = function() {\n reject(url);\n };\n\n // Need to set different attributes depending on tag type\n switch (tag) {\n case \"script\":\n element.async = true;\n break;\n case \"link\":\n element.type = \"text/css\";\n element.rel = \"stylesheet\";\n attr = \"href\";\n parent = \"head\";\n }\n\n // Inject into document to kick off loading\n element[attr] = url;\n document[parent].appendChild(element);\n });\n };\n }\n\n return {\n css: _load(\"link\"),\n js: _load(\"script\"),\n img: _load(\"img\")\n };\n})();\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport load from 'external-load';\n\nlet addedResources = false;\nconst addResources = async () => {\n if (addedResources) return;\n\n await load.css('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');\n await load.js('https://unpkg.com/leaflet@1.9.4/dist/leaflet.js');\n\n addedResources = true;\n};\n\nexport default class ZipCodeMap extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.data = null;\n\n this.search();\n }\n\n view() {\n if (this.loading) {\n return ;\n } else if (!this.data) {\n return
;\n }\n\n return
;\n }\n\n search() {\n if (this.loading) return;\n\n this.loading = true;\n\n return addResources().then(\n app\n .request({\n url: `https://nominatim.openstreetmap.org/search`,\n method: 'GET',\n params: {\n q: this.attrs.zip,\n countrycodes: this.attrs.country,\n limit: 1,\n format: 'json',\n },\n })\n .then((data) => {\n this.data = data[0];\n this.loading = false;\n\n m.redraw();\n })\n );\n }\n\n configMap(vnode) {\n if (!this.data) return;\n\n const { boundingbox: bounding, display_name: displayName } = this.data;\n\n this.map = L.map(vnode.dom).setView([51.505, -0.09], 5);\n\n L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {\n attribution: '© OpenStreetMap contributors',\n }).addTo(this.map);\n\n L.marker([bounding[0], bounding[2]]).addTo(this.map).bindPopup(displayName).openPopup();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LabelValue'];","import app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport ZipCodeMap from './ZipCodeMap';\nimport IPInfo from '../models/IPInfo';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\nimport LabelValue from 'flarum/common/components/LabelValue';\nimport type Mithril from 'mithril';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\ninterface MapModalAttrs extends IInternalModalAttrs {\n ipInfo?: IPInfo;\n ipAddr: string;\n}\n\nexport default class MapModal extends Modal {\n ipInfo: IPInfo | undefined;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.ipInfo = this.attrs.ipInfo;\n if (this.ipInfo === undefined) {\n this.loadIpInfo();\n }\n }\n\n className() {\n return 'MapModal Modal--medium';\n }\n\n loadIpInfo() {\n app.store\n .find('ip_info', encodeURIComponent(this.attrs.ipAddr))\n .then((ipInfo) => {\n this.ipInfo = ipInfo;\n m.redraw();\n })\n .catch((error) => {\n console.error('Failed to load IP information from the store', error);\n });\n }\n\n title() {\n return app.translator.trans('fof-geoip.forum.map_modal.title');\n }\n\n content() {\n const ipInfo = this.ipInfo;\n\n if (!ipInfo) {\n return (\n
\n \n
\n );\n }\n\n return (\n
\n
\n \n {this.attrs.ipAddr}\n \n }\n />\n {ipInfo.countryCode() && }\n {ipInfo.zipCode() && }\n {ipInfo.isp() && }\n {ipInfo.organization() && (\n \n )}\n {ipInfo.threatLevel() && }\n {ipInfo.threatTypes().length > 0 && (\n \n )}\n {ipInfo.error() && }\n
\n
\n
\n \n
\n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/AccessTokensList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\n\nexport default class IPInfo extends Model {\n id() {\n return Model.attribute('id').call(this);\n }\n\n countryCode() {\n return Model.attribute('countryCode').call(this);\n }\n\n zipCode() {\n return Model.attribute('zipCode').call(this);\n }\n\n isp() {\n return Model.attribute('isp').call(this);\n }\n\n organization() {\n return Model.attribute('organization').call(this);\n }\n\n threatLevel() {\n return Model.attribute('threatLevel').call(this);\n }\n\n threatTypes() {\n const raw = Model.attribute('threatTypes').call(this);\n try {\n return JSON.parse(raw);\n } catch (error) {\n return [];\n }\n }\n\n error() {\n return Model.attribute('error').call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","import Extend from 'flarum/common/extenders';\nimport IPInfo from './models/IPInfo';\nimport Post from 'flarum/common/models/Post';\n\nexport default [\n new Extend.Store() //\n .add('ip_info', IPInfo),\n\n new Extend.Model(Post) //\n .hasOne('ip_info'),\n];\n","import app from 'flarum/forum/app';\nimport extendPostMeta from './extenders/extendPostMeta';\nimport extendBanIPModal from './extenders/extendBanIPModal';\nimport extendAccessTokensList from './extenders/extendAccessTokensList';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof/geoip', () => {\n extendPostMeta();\n extendBanIPModal();\n\n // This cannot be enabled until https://github.com/flarum/framework/pull/3888 is merged and released\n extendAccessTokensList();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport ZipCodeMap from '../components/ZipCodeMap';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { getIPData } from '../helpers/IPDataHelper';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\n\nexport default function extendBanIPModal() {\n const BanIPModal = flarum.core.compat['fof/ban-ips/components/BanIPModal'];\n\n if (BanIPModal) {\n extend(BanIPModal.prototype, 'content', function (vdom) {\n if (!this.post || !this.post.ipAddress()) return;\n\n const ipInfo = this.post.ip_info();\n const formGroup = vdom.children.find((e) => e?.attrs?.className?.includes('Form-group') && e.children?.find?.((e) => e.tag === 'div'));\n\n if (!ipInfo || !formGroup) return;\n\n for (const child of formGroup.children) {\n const label = child.children.find((e) => e?.tag === 'label');\n const code = label && label.children.find((e) => e?.tag === 'code');\n\n const codeIndex = code && label.children.indexOf(code);\n if (!code) continue;\n\n const { description, threat, image } = getIPData(ipInfo);\n\n if (!code.attrs) code.attrs = {};\n code.attrs['data-threat-level'] = ipInfo.threatLevel();\n\n code.children[1] = (\n \n {code.children[1]}\n \n );\n\n if (image) {\n label.children.splice(codeIndex, 0, image);\n }\n }\n\n if (ipInfo.zipCode() && ipInfo.countryCode()) {\n vdom.children.splice(\n 2,\n 0,\n
\n \n
\n );\n }\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport PostMeta from 'flarum/common/components/PostMeta';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { getIPData } from '../helpers/IPDataHelper';\nimport { handleCopyIP } from '../helpers/ClipboardHelper';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Button from 'flarum/common/components/Button';\nimport MapModal from '../components/MapModal';\n\nexport default function extendPostMeta() {\n extend(PostMeta.prototype, 'view', function (vdom) {\n const post = this.attrs.post;\n\n // Exit early if there's no post\n if (!post) return;\n\n const ipInformation = post.ip_info();\n\n // Exit early if there's no IP information for the post\n if (!ipInformation) return;\n\n // Extract dropdown from the VDOM\n const menuDropdown = vdom.children.find((e) => e.attrs?.className?.includes('dropdown-menu'));\n\n // Extract IP element for modification\n const ipElement = menuDropdown.children.find((e) => e.tag === 'span' && e.attrs?.className === 'PostMeta-ip');\n\n // Clear any default text from the IP element\n delete ipElement.text;\n\n // Construct the IP element with the tooltip and interactive behavior\n ipElement.children = [
{this.ipItems().toArray()}
];\n\n // If there's a threat level, add it as a data attribute for potential styling\n // TODO: move this to an Item?\n if (ipInformation.threatLevel) {\n ipElement.attrs['data-threat-level'] = ipInformation.threatLevel();\n }\n });\n\n PostMeta.prototype.ipItems = function () {\n const items = new ItemList();\n const post = this.attrs.post;\n const ipInformation = post.ip_info();\n const ipAddr = post.data.attributes.ipAddress;\n\n if (ipInformation && ipAddr) {\n const { description, threat, image, zip, country } = getIPData(ipInformation);\n\n items.add(\n 'ipInfo',\n
\n {image}\n \n {ipAddr}\n \n
,\n 100\n );\n\n if (zip && country) {\n items.add(\n 'mapButton',\n \n app.modal.show(MapModal, { ipInfo: ipInformation, ipAddr: ipAddr })}\n aria-label={app.translator.trans('fof-geoip.forum.map_button_label')}\n />\n ,\n 90\n );\n }\n }\n\n return items;\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport AccessTokensList from 'flarum/forum/components/AccessTokensList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport MapModal from '../components/MapModal';\nimport Button from 'flarum/common/components/Button';\nimport type Mithril from 'mithril';\nimport AccessToken from 'flarum/common/models/AccessToken';\n\nexport default function extendAccessTokensList() {\n extend(AccessTokensList.prototype, 'tokenActionItems', function (items: ItemList, token: AccessToken) {\n const ipAddr = token.lastIpAddress();\n\n if (ipAddr) {\n items.add(\n 'geoip-info',\n app.modal.show(MapModal, { ipAddr: ipAddr })}\n aria-label={app.translator.trans('fof-geoip.forum.map_button_label')}\n >\n {app.translator.trans('fof-geoip.forum.map_button_label')}\n ,\n 10\n );\n }\n });\n}\n"],"names":["module","exports","CC_REGEX","cc","test","type","TypeError","chars","_toConsumableArray","toUpperCase","map","c","charCodeAt","OFFSET","String","fromCodePoint","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","str","r","p","l","toString","join","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","flarum","core","compat","getFlagImage","ipInfo","countryCode","url","codepoint","flag","basename","convert","getFlagEmojiUrl","m","Tooltip","text","src","alt","height","loading","getIPData","description","organization","isp","getDescription","threat","threatTypes","getThreat","image","zip","zipCode","country","handleCopyIP","ip","navigator","clipboard","writeText","el","document","createElement","setAttribute","style","position","left","body","appendChild","selection","getSelection","selected","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","copyToClipboard","app","show","trans","_setPrototypeOf","_inheritsLoose","subClass","superClass","asyncGeneratorStep","gen","_next","_throw","_load","tag","element","parent","attr","onload","onerror","rel","css","js","img","addedResources","addResources","_ref","_regeneratorRuntime","_callee","_context","load","args","arguments","apply","ZipCodeMap","_Component","_proto","oninit","vnode","data","search","view","LoadingIndicator","size","id","oncreate","configMap","bind","_this","params","q","attrs","countrycodes","limit","format","redraw","_this$data","bounding","boundingbox","display_name","L","dom","setView","tileLayer","attribution","addTo","marker","bindPopup","openPopup","Component","MapModal","_Modal","_len","Array","_key","concat","loadIpInfo","className","_this2","find","encodeURIComponent","ipAddr","console","title","content","LabelValue","label","onclick","threatLevel","Modal","IPInfo","_Model","Model","raw","JSON","parse","Extend","add","Post","hasOne","BanIPModal","extend","PostMeta","vdom","post","ipInformation","ip_info","ipElement","children","e","_e$attrs","_e$attrs$className","includes","_e$attrs2","ipItems","toArray","items","ItemList","attributes","ipAddress","_getIPData","Button","icon","formGroup","_e$children","_step","_iterator","_createForOfIteratorHelperLoose","code","codeIndex","indexOf","splice","AccessTokensList","token","lastIpAddress"],"sourceRoot":""} \ No newline at end of file