framework/extensions/statistics/js/dist/admin.js.map
2018-06-20 05:24:52 +00:00

1 line
43 KiB
Plaintext

{"version":3,"sources":["webpack://module.exports/webpack/bootstrap","webpack://module.exports/./node_modules/core-js/library/modules/_core.js","webpack://module.exports/./node_modules/core-js/library/modules/_descriptors.js","webpack://module.exports/./node_modules/core-js/library/modules/_global.js","webpack://module.exports/./node_modules/core-js/library/modules/_fails.js","webpack://module.exports/./node_modules/core-js/library/modules/_is-object.js","webpack://module.exports/./node_modules/core-js/library/modules/_an-object.js","webpack://module.exports/external \"flarum.core.compat['utils/abbreviateNumber']\"","webpack://module.exports/./node_modules/core-js/library/modules/_dom-create.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-dp.js","webpack://module.exports/./node_modules/core-js/library/modules/_export.js","webpack://module.exports/./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack://module.exports/./node_modules/core-js/library/modules/_shared-key.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-integer.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-iobject.js","webpack://module.exports/./node_modules/core-js/library/modules/_has.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-keys.js","webpack://module.exports/./node_modules/core-js/library/modules/_defined.js","webpack://module.exports/external \"flarum.core.compat['helpers/icon']\"","webpack://module.exports/external \"flarum.core.compat['components/Button']\"","webpack://module.exports/external \"flarum.core.compat['components/SelectDropdown']\"","webpack://module.exports/external \"flarum.core.compat['components/DashboardWidget']\"","webpack://module.exports/./node_modules/@babel/runtime/core-js/object/create.js","webpack://module.exports/./node_modules/@babel/runtime/core-js/object/keys.js","webpack://module.exports/external \"flarum.core.compat['components/DashboardPage']\"","webpack://module.exports/external \"flarum.core.compat['extend']\"","webpack://module.exports/external \"flarum.core.compat['app']\"","webpack://module.exports/./src/admin/components/StatisticsWidget.js","webpack://module.exports/./node_modules/@babel/runtime/helpers/es6/inheritsLoose.js","webpack://module.exports/./src/admin/index.js","webpack://module.exports/external \"flarum.core.compat['utils/ItemList']\"","webpack://module.exports/external \"flarum.core.compat['helpers/listItems']\"","webpack://module.exports/./node_modules/core-js/library/modules/_html.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-dps.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-create.js","webpack://module.exports/./node_modules/core-js/library/modules/es6.object.create.js","webpack://module.exports/./node_modules/core-js/library/fn/object/create.js","webpack://module.exports/./node_modules/core-js/library/modules/_property-desc.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-primitive.js","webpack://module.exports/./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack://module.exports/./node_modules/core-js/library/modules/_hide.js","webpack://module.exports/./node_modules/core-js/library/modules/_a-function.js","webpack://module.exports/./node_modules/core-js/library/modules/_ctx.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-sap.js","webpack://module.exports/./node_modules/core-js/library/modules/_uid.js","webpack://module.exports/./node_modules/core-js/library/modules/_library.js","webpack://module.exports/./node_modules/core-js/library/modules/_shared.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-absolute-index.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-length.js","webpack://module.exports/./node_modules/core-js/library/modules/_array-includes.js","webpack://module.exports/./node_modules/core-js/library/modules/_cof.js","webpack://module.exports/./node_modules/core-js/library/modules/_iobject.js","webpack://module.exports/./node_modules/core-js/library/modules/_object-keys-internal.js","webpack://module.exports/./node_modules/core-js/library/modules/_to-object.js","webpack://module.exports/./node_modules/core-js/library/modules/es6.object.keys.js","webpack://module.exports/./node_modules/core-js/library/fn/object/keys.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","core","version","__e","a","global","window","Math","self","Function","__g","exec","e","it","isObject","TypeError","flarum","compat","document","is","createElement","anObject","IE8_DOM_DEFINE","toPrimitive","dP","f","O","P","Attributes","ctx","hide","has","$export","type","source","own","out","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","S","IS_PROTO","IS_BIND","B","IS_WRAP","W","expProto","target","undefined","C","b","this","arguments","length","apply","virtual","R","U","split","shared","uid","ceil","floor","isNaN","IObject","defined","$keys","enumBugKeys","keys","StatisticsWidget_StatisticsWidget","subClass","superClass","create_default","constructor","__proto__","init","_DashboardWidget","today","Date","setTime","getTime","app","data","statistics","timezoneOffset","setUTCHours","entities","periods","start","end","step","last_7_days","last_28_days","last_12_months","selectedEntity","selectedPeriod","className","content","_this","thisPeriod","translator","trans","SelectDropdown_default","buttonClassName","caretIcon","keys_default","map","period","Button_default","active","onclick","changePeriod","icon","entity","totalCount","getTotalCount","thisPeriodCount","getPeriodCount","lastPeriodCount","getLastPeriod","periodChange","changeEntity","title","abbreviateNumber_default","icon_default","abs","toFixed","config","drawChart","elm","isInitialized","context","chart","offset","periodLength","labels","lastPeriod","label","moment","unix","utc","format","push","datasets","values","update_values","Chart","parent","height","x_axis_mode","y_axis_mode","is_series","show_dots","colors","forum","attribute","total","timed","count","time","DashboardWidget_default","external_flarum_core_compat_app_default","initializers","add","external_flarum_core_compat_extend_","DashboardPage_default","widgets","documentElement","getKeys","defineProperties","Properties","dPs","IE_PROTO","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","open","write","lt","close","result","$Object","D","bitmap","configurable","writable","fn","val","toString","valueOf","createDesc","aFunction","that","fails","KEY","exp","id","px","random","concat","store","copyright","toInteger","max","min","index","toIObject","toLength","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","slice","cof","propertyIsEnumerable","arrayIndexOf","names","toObject"],"mappings":"2BACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GA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AyO,EAAAhQ,SACA+P,EAAApC,EAAApM,IAAAoM,EAAA5C,KAAAxJ,IAEA,OAAAoM,oBCdA,IAAAzH,EAAAtG,EAAA,IACAG,EAAAD,QAAA,SAAA8C,GACA,OAAAlC,OAAAwF,EAAAtD,sBCFA,IAAAqN,EAAArQ,EAAA,IACAuG,EAAAvG,EAAA,IAEAA,EAAA,GAAAA,CAAA,kBACA,gBAAAgD,GACA,OAAAuD,EAAA8J,EAAArN,wBCNAhD,EAAA,IACAG,EAAAD,QAAAF,EAAA,GAAAc,OAAA2F","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 26);\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = flarum.core.compat['utils/abbreviateNumber'];","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","module.exports = flarum.core.compat['helpers/icon'];","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/SelectDropdown'];","module.exports = flarum.core.compat['components/DashboardWidget'];","module.exports = require(\"core-js/library/fn/object/create\");","module.exports = require(\"core-js/library/fn/object/keys\");","module.exports = flarum.core.compat['components/DashboardPage'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['app'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nimport DashboardWidget from 'flarum/components/DashboardWidget';\nimport SelectDropdown from 'flarum/components/SelectDropdown';\nimport Button from 'flarum/components/Button';\nimport icon from 'flarum/helpers/icon';\nimport listItems from 'flarum/helpers/listItems';\nimport ItemList from 'flarum/utils/ItemList';\nimport abbreviateNumber from 'flarum/utils/abbreviateNumber';\n\nexport default class StatisticsWidget extends DashboardWidget {\n init() {\n super.init();\n\n // Create a Date object which represents the start of the day in the\n // configured timezone. To do this we convert a UTC time into that timezone,\n // reset to the first hour of the day, and then convert back into UTC time.\n // We'll be working with seconds rather than milliseconds throughout too.\n let today = new Date();\n today.setTime(today.getTime() + app.data.statistics.timezoneOffset * 1000);\n today.setUTCHours(0, 0, 0, 0);\n today.setTime(today.getTime() - app.data.statistics.timezoneOffset * 1000);\n today = today / 1000;\n\n this.entities = ['users', 'discussions', 'posts'];\n this.periods = {\n today: {start: today, end: today + 86400, step: 3600},\n last_7_days: {start: today - 86400 * 7, end: today, step: 86400},\n last_28_days: {start: today - 86400 * 28, end: today, step: 86400},\n last_12_months: {start: today - 86400 * 364, end: today, step: 86400 * 7}\n };\n\n this.selectedEntity = 'users';\n this.selectedPeriod = 'last_7_days';\n }\n\n className() {\n return 'StatisticsWidget';\n }\n\n content() {\n const thisPeriod = this.periods[this.selectedPeriod];\n\n return (\n <div className=\"StatisticsWidget-table\">\n <div className=\"StatisticsWidget-labels\">\n <div className=\"StatisticsWidget-label\">{app.translator.trans('flarum-statistics.admin.statistics.total_label')}</div>\n <div className=\"StatisticsWidget-label\">\n <SelectDropdown buttonClassName=\"Button Button--text\" caretIcon=\"fas fa-caret-down\">\n {Object.keys(this.periods).map(period => (\n <Button\n active={period === this.selectedPeriod}\n onclick={this.changePeriod.bind(this, period)}\n icon={period === this.selectedPeriod ? 'fas fa-check' : true}>\n {app.translator.trans('flarum-statistics.admin.statistics.'+period+'_label')}\n </Button>\n ))}\n </SelectDropdown>\n </div>\n </div>\n\n {this.entities.map(entity => {\n const totalCount = this.getTotalCount(entity);\n const thisPeriodCount = this.getPeriodCount(entity, thisPeriod);\n const lastPeriodCount = this.getPeriodCount(entity, this.getLastPeriod(thisPeriod));\n const periodChange = lastPeriodCount > 0 && (thisPeriodCount - lastPeriodCount) / lastPeriodCount * 100;\n\n return (\n <a className={'StatisticsWidget-entity'+(this.selectedEntity === entity ? ' active' : '')} onclick={this.changeEntity.bind(this, entity)}>\n <h3 className=\"StatisticsWidget-heading\">{app.translator.trans('flarum-statistics.admin.statistics.'+entity+'_heading')}</h3>\n <div className=\"StatisticsWidget-total\" title={totalCount}>{abbreviateNumber(totalCount)}</div>\n <div className=\"StatisticsWidget-period\" title={thisPeriodCount}>\n {abbreviateNumber(thisPeriodCount)}{' '}\n {periodChange ? (\n <span className={'StatisticsWidget-change StatisticsWidget-change--'+(periodChange > 0 ? 'up' : 'down')}>\n {icon('fas fa-arrow-'+(periodChange > 0 ? 'up' : 'down'))}\n {Math.abs(periodChange.toFixed(1))}%\n </span>\n ) : ''}\n </div>\n </a>\n );\n })}\n\n <div className=\"StatisticsWidget-chart\" config={this.drawChart.bind(this)}/>\n </div>\n );\n }\n\n drawChart(elm, isInitialized, context) {\n if (context.chart && context.entity === this.selectedEntity && context.period === this.selectedPeriod) {\n return;\n }\n\n const offset = app.data.statistics.timezoneOffset;\n const period = this.periods[this.selectedPeriod];\n const periodLength = period.end - period.start;\n const labels = [];\n const thisPeriod = [];\n const lastPeriod = [];\n\n for (let i = period.start; i < period.end; i += period.step) {\n let label;\n\n if (period.step < 86400) {\n label = moment.unix(i + offset).utc().format('h A');\n } else {\n label = moment.unix(i + offset).utc().format('D MMM');\n\n if (period.step > 86400) {\n label += ' - ' + moment.unix(i + offset + period.step - 1).utc().format('D MMM');\n }\n }\n\n labels.push(label);\n\n thisPeriod.push(this.getPeriodCount(this.selectedEntity, {start: i, end: i + period.step}));\n\n lastPeriod.push(this.getPeriodCount(this.selectedEntity, {start: i - periodLength, end: i - periodLength + period.step}));\n }\n\n const datasets = [\n {values: lastPeriod},\n {values: thisPeriod}\n ];\n\n if (!context.chart) {\n context.chart = new Chart({\n parent: elm,\n data: {labels, datasets},\n type: 'line',\n height: 200,\n x_axis_mode: 'tick',\n y_axis_mode: 'span',\n is_series: 1,\n show_dots: 0,\n colors: ['rgba(127, 127, 127, 0.2)', app.forum.attribute('themePrimaryColor')]\n });\n } else {\n context.chart.update_values(datasets, labels);\n }\n\n context.entity = this.selectedEntity;\n context.period = this.selectedPeriod;\n }\n\n changeEntity(entity) {\n this.selectedEntity = entity;\n }\n\n changePeriod(period) {\n this.selectedPeriod = period;\n }\n\n getTotalCount(entity) {\n return app.data.statistics[entity].total;\n }\n\n getPeriodCount(entity, period) {\n const timed = app.data.statistics[entity].timed;\n let count = 0;\n\n for (const time in timed) {\n if (time >= period.start && time < period.end) {\n count += timed[time];\n }\n }\n\n return count;\n }\n\n getLastPeriod(thisPeriod) {\n return {\n start: thisPeriod.start - (thisPeriod.end - thisPeriod.start),\n end: thisPeriod.start\n };\n }\n}\n","import _Object$create from \"../../core-js/object/create\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = _Object$create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import app from 'flarum/app';\nimport { extend } from 'flarum/extend';\n\nimport DashboardPage from 'flarum/components/DashboardPage';\n\nimport StatisticsWidget from './components/StatisticsWidget';\n\napp.initializers.add('flarum-statistics', () => {\n extend(DashboardPage.prototype, 'availableWidgets', widgets => {\n widgets.push(<StatisticsWidget/>);\n });\n});\n","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['helpers/listItems'];","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","module.exports = true;\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","require('../../modules/es6.object.keys');\nmodule.exports = require('../../modules/_core').Object.keys;\n"],"sourceRoot":""}