framework/extensions/package-manager/js/dist/admin.js.map
flarum-bot 05f80b7b83 Bundled output for commit 31c3cfc4ea
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2022-09-16 10:02:55 +00:00

1 line
135 KiB
Plaintext
Executable File
Generated
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"admin.js","mappings":"2BAAoEA,EAAOC,QAAmJ,WAAW,aAAa,IAAIC,EAAEC,EAAEC,EAAE,IAAIC,EAAE,IAAIC,EAAE,KAAKC,EAAE,MAAMC,EAAE,sFAAsFC,EAAE,QAAQC,EAAE,OAAOC,EAAE,sKAAsKC,EAAE,CAACC,MAAMJ,EAAEK,OAAOJ,EAAEK,KAAKR,EAAES,MAAMV,EAAEW,QAAQZ,EAAEa,QAAQd,EAAEe,aAAa,EAAEC,MAAM,QAAQC,EAAE,SAASnB,GAAG,OAAOA,aAAaoB,CAAE,EAACC,EAAE,SAASrB,EAAEC,EAAEC,GAAG,OAAO,IAAIkB,EAAEpB,EAAEE,EAAED,EAAEqB,GAAI,EAACC,EAAE,SAASvB,GAAG,OAAOC,EAAEmB,EAAEpB,GAAG,GAAI,EAACwB,EAAE,SAASxB,GAAG,OAAOA,EAAE,CAAE,EAACyB,EAAE,SAASzB,GAAG,OAAOwB,EAAExB,GAAG0B,KAAKC,KAAK3B,GAAG0B,KAAKE,MAAM5B,EAAG,EAAC6B,EAAE,SAAS7B,GAAG,OAAO0B,KAAKI,IAAI9B,EAAG,EAAC+B,EAAE,SAAS/B,EAAEC,GAAG,OAAOD,EAAEwB,EAAExB,GAAG,CAACgC,UAAS,EAAGC,OAAO,GAAGJ,EAAE7B,GAAGC,GAAG,CAAC+B,UAAS,EAAGC,OAAO,GAAGjC,EAAEC,GAAG,CAAC+B,UAAS,EAAGC,OAAO,GAAI,EAACb,EAAE,WAAW,SAASI,EAAExB,EAAEC,EAAEC,GAAG,IAA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AI6U,MAAMI,OACX,GACJ,GAtBH,UA2BH,GACF,G","sources":["webpack://@flarum/package-manager/../../../node_modules/dayjs/plugin/duration.js","webpack://@flarum/package-manager/webpack/bootstrap","webpack://@flarum/package-manager/webpack/runtime/compat get default export","webpack://@flarum/package-manager/webpack/runtime/define property getters","webpack://@flarum/package-manager/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/package-manager/webpack/runtime/make namespace object","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/components/LoadingModal']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['admin/utils/isExtensionEnabled']\"","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/package-manager/./src/admin/components/Label.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/package-manager/./src/admin/components/TaskOutputModal.tsx","webpack://@flarum/package-manager/./src/admin/components/Pagination.tsx","webpack://@flarum/package-manager/./src/admin/components/QueueSection.tsx","webpack://@flarum/package-manager/./src/admin/utils/humanDuration.ts","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/package-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/package-manager/./src/admin/utils/jumpToQueue.ts","webpack://@flarum/package-manager/./src/admin/components/Installer.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/package-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/package-manager/./src/admin/components/ExtensionItem.tsx","webpack://@flarum/package-manager/./src/admin/components/MajorUpdater.tsx","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/package-manager/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/package-manager/../../../framework/core/js/src/common/utils/isObject.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/utils/ItemList.ts","webpack://@flarum/package-manager/./src/admin/components/Updater.tsx","webpack://@flarum/package-manager/./src/admin/components/ControlSection.tsx","webpack://@flarum/package-manager/./src/admin/components/SettingsPage.tsx","webpack://@flarum/package-manager/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/package-manager/../../../node_modules/pretty-bytes/index.js","webpack://@flarum/package-manager/./src/admin/models/Task.ts","webpack://@flarum/package-manager/./src/admin/states/QueueState.ts","webpack://@flarum/package-manager/./src/admin/states/ControlSectionState.ts","webpack://@flarum/package-manager/./src/admin/states/PackageManagerState.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/Component.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/app.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/helpers/icon.tsx","webpack://@flarum/package-manager/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/package-manager/../../../framework/core/js/src/common/utils/classList.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/utils/extractText.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/components/LoadingIndicator.tsx","webpack://@flarum/package-manager/../../../framework/core/js/src/common/components/Button.tsx","webpack://@flarum/package-manager/../../../framework/core/js/src/common/helpers/fireDebugWarning.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/components/Separator.js","webpack://@flarum/package-manager/../../../framework/core/js/src/common/helpers/listItems.tsx","webpack://@flarum/package-manager/../../../framework/core/js/src/common/utils/extract.ts","webpack://@flarum/package-manager/../../../framework/core/js/src/common/components/Alert.tsx","webpack://@flarum/package-manager/./src/admin/index.tsx"],"sourcesContent":["!function(t,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s():\"function\"==typeof define&&define.amd?define(s):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,h=2592e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:u,months:h,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof p},f=function(t,s,n){return new p(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},g=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},p=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*d[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*d[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/h),t%=h,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=g(this.$d.years,\"Y\"),s=g(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,\"D\"),e=g(this.$d.hours,\"H\"),r=g(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,\"S\"),h=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",d=(h?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===d||\"-P\"===d?\"P0D\":d},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/d[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/d[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*d[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}();return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,s)}}}));","// 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['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/LoadingModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/isExtensionEnabled'];","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}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\n\ninterface LabelAttrs extends ComponentAttrs {\n type: 'success' | 'error' | 'neutral' | 'warning';\n}\n\nexport default class Label extends Component<LabelAttrs> {\n view(vnode: Mithril.Vnode<LabelAttrs, this>) {\n const { className, type, ...attrs } = this.attrs;\n\n return (\n <span className={classList(['Label', `Label--${this.attrs.type}`, className])} {...attrs}>\n {vnode.children}\n </span>\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","import app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Task from '../models/Task';\n\ninterface TaskOutputModalAttrs extends IInternalModalAttrs {\n task: Task;\n}\n\nexport default class TaskOutputModal<CustomAttrs extends TaskOutputModalAttrs = TaskOutputModalAttrs> extends Modal<CustomAttrs> {\n className() {\n return 'Modal--large QuickModal';\n }\n\n title() {\n return app.translator.trans(`flarum-package-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`);\n }\n\n content() {\n return (\n <div className=\"Modal-body\">\n <div className=\"TaskOutputModal-data\">\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.sections.queue.output_modal.command')}</label>\n <div className=\"FormControl TaskOutputModal-data-command\">\n <code>$ composer {this.attrs.task.command()}</code>\n </div>\n </div>\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.sections.queue.output_modal.output')}</label>\n <div className=\"FormControl TaskOutputModal-data-output\">\n <code>\n <pre>{this.attrs.task.output()}</pre>\n </code>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport QueueState from '../states/QueueState';\n\ninterface PaginationAttrs extends ComponentAttrs {\n list: QueueState;\n}\n\n/**\n * @todo make it abstract in core for reusability.\n */\nexport default class Pagination extends Component<PaginationAttrs> {\n view() {\n return (\n <nav class=\"Pagination UserListPage-gridPagination\">\n <Button\n disabled={!this.attrs.list.hasPrev()}\n title={app.translator.trans('core.admin.users.pagination.back_button')}\n onclick={() => this.attrs.list.prev()}\n icon=\"fas fa-chevron-left\"\n className=\"Button Button--icon UserListPage-backBtn\"\n />\n <span class=\"UserListPage-pageNumber\">\n {app.translator.trans('core.admin.users.pagination.page_counter', {\n current: this.attrs.list.pageNumber() + 1,\n total: this.attrs.list.getTotalPages(),\n })}\n </span>\n <Button\n disabled={!this.attrs.list.hasNext()}\n title={app.translator.trans('core.admin.users.pagination.next_button')}\n onclick={() => this.attrs.list.next()}\n icon=\"fas fa-chevron-right\"\n className=\"Button Button--icon UserListPage-nextBtn\"\n />\n </nav>\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\n\nimport Label from './Label';\nimport TaskOutputModal from './TaskOutputModal';\nimport humanDuration from '../utils/humanDuration';\nimport Task, { TaskOperations } from '../models/Task';\nimport Pagination from './Pagination';\n\ninterface QueueTableColumn extends ComponentAttrs {\n label: string;\n content: (task: Task) => Mithril.Children;\n}\n\nexport default class QueueSection extends Component<{}> {\n oninit(vnode: Mithril.Vnode<{}, this>) {\n super.oninit(vnode);\n\n app.packageManager.queue.load();\n }\n\n view() {\n return (\n <section id=\"PackageManager-queueSection\" className=\"ExtensionPage-permissions PackageManager-queueSection\">\n <div className=\"ExtensionPage-permissions-header PackageManager-queueSection-header\">\n <div className=\"container\">\n <h2 className=\"ExtensionTitle\">{app.translator.trans('flarum-package-manager.admin.sections.queue.title')}</h2>\n <Button\n className=\"Button Button--icon\"\n icon=\"fas fa-sync-alt\"\n onclick={() => app.packageManager.queue.load()}\n aria-label={app.translator.trans('flarum-package-manager.admin.sections.queue.refresh')}\n />\n </div>\n </div>\n <div className=\"container\">{this.queueTable()}</div>\n </section>\n );\n }\n\n columns() {\n const items = new ItemList<QueueTableColumn>();\n\n items.add(\n 'operation',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.operation')),\n content: (task) => (\n <div className=\"PackageManager-queueTable-operation\">\n <span className=\"PackageManager-queueTable-operation-icon\">{this.operationIcon(task.operation())}</span>\n <span className=\"PackageManager-queueTable-operation-name\">\n {app.translator.trans(`flarum-package-manager.admin.sections.queue.operations.${task.operation()}`)}\n </span>\n </div>\n ),\n },\n 80\n );\n\n items.add(\n 'package',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.package')),\n content: (task) => {\n const extension: Extension | null = app.data.extensions[task.package()?.replace(/(\\/flarum-|\\/flarum-ext-|\\/)/g, '-')];\n\n return extension ? (\n <div className=\"PackageManager-queueTable-package\">\n <div className=\"PackageManager-queueTable-package-icon ExtensionIcon\" style={extension.icon}>\n {extension.icon ? icon(extension.icon.name) : ''}\n </div>\n <div className=\"PackageManager-queueTable-package-details\">\n <span className=\"PackageManager-queueTable-package-title\">{extension.extra['flarum-extension'].title}</span>\n <span className=\"PackageManager-queueTable-package-name\">{task.package()}</span>\n </div>\n </div>\n ) : (\n task.package()\n );\n },\n },\n 75\n );\n\n items.add(\n 'status',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.status')),\n content: (task) => (\n <Label\n className=\"PackageManager-queueTable-status\"\n type={{ running: 'neutral', failure: 'error', pending: 'warning', success: 'success' }[task.status()]}\n >\n {app.translator.trans(`flarum-package-manager.admin.sections.queue.statuses.${task.status()}`)}\n </Label>\n ),\n },\n 70\n );\n\n items.add(\n 'elapsedTime',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.elapsed_time')),\n content: (task) =>\n !task.startedAt() ? (\n app.translator.trans('flarum-package-manager.admin.sections.queue.task_just_started')\n ) : (\n <Tooltip text={`${dayjs(task.startedAt()).format('LL LTS')} ${dayjs(task.finishedAt()).format('LL LTS')}`}>\n <span>{humanDuration(task.startedAt(), task.finishedAt())}</span>\n </Tooltip>\n ),\n },\n 65\n );\n\n items.add(\n 'memoryUsed',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.peak_memory_used')),\n content: (task) => <span>{task.peakMemoryUsed()}</span>,\n },\n 60\n );\n\n items.add(\n 'details',\n {\n label: extractText(app.translator.trans('flarum-package-manager.admin.sections.queue.columns.details')),\n content: (task) => (\n <Button\n className=\"Button Button--icon Table-controls-item\"\n icon=\"fas fa-file-alt\"\n aria-label={app.translator.trans('flarum-package-manager.admin.sections.queue.columns.details')}\n // @todo fix in core\n // @ts-ignore\n onclick={() => app.modal.show(TaskOutputModal, { task })}\n />\n ),\n className: 'Table-controls',\n },\n 55\n );\n\n return items;\n }\n\n queueTable() {\n const tasks = app.packageManager.queue.getItems();\n\n if (!tasks) {\n return <LoadingIndicator />;\n }\n\n if (tasks && !tasks.length) {\n return <h3 className=\"ExtensionPage-subHeader\">{app.translator.trans('flarum-package-manager.admin.sections.queue.none')}</h3>;\n }\n\n const columns = this.columns();\n\n return (\n <>\n <table className=\"Table PackageManager-queueTable\">\n <thead>\n <tr>\n {columns.toArray().map((item, index) => (\n <th key={index}>{item.label}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {tasks.map((task, index) => (\n <tr key={index}>\n {columns.toArray().map((item, index) => {\n const { label, content, ...attrs } = item;\n\n return (\n <td key={index} {...attrs}>\n {content(task)}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n\n <Pagination list={app.packageManager.queue} />\n </>\n );\n }\n\n operationIcon(operation: TaskOperations): Mithril.Children {\n return icon(\n {\n update_check: 'fas fa-sync-alt',\n update_major: 'fas fa-play',\n update_minor: 'fas fa-play',\n update_global: 'fas fa-play',\n extension_install: 'fas fa-download',\n extension_remove: 'fas fa-times',\n extension_update: 'fas fa-arrow-alt-circle-up',\n why_not: 'fas fa-exclamation-circle',\n }[operation]\n );\n }\n}\n","import duration from 'dayjs/plugin/duration';\n\nexport default function humanDuration(start: Date, end: Date) {\n dayjs.extend(duration);\n\n const durationTime = dayjs(end).diff(start);\n\n return dayjs.duration(durationTime).humanize();\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\n const error = e.response.errors[0];\n\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({ type: 'error' }, app.translator.trans(`flarum-package-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n\n case 'extension_already_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n\n case 'extension_not_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-package-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}\n","import app from 'flarum/admin/app';\n\n// @ts-ignore\nwindow.jumpToQueue = jumpToQueue;\n\nexport default function jumpToQueue(): void {\n app.modal.close();\n m.route.set(app.route('extension', { id: 'flarum-package-manager' }));\n app.packageManager.queue.load();\n setTimeout(() => {\n document.getElementById('PackageManager-queueSection')?.scrollIntoView({ block: 'nearest' });\n }, 200);\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\n\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport { AsyncBackendResponse } from '../shims';\n\nexport interface InstallerAttrs extends ComponentAttrs {}\n\nexport type InstallerLoadingTypes = 'extension-install' | null;\n\nexport default class Installer extends Component<InstallerAttrs> {\n packageName!: Stream<string>;\n\n oninit(vnode: Mithril.Vnode<InstallerAttrs, this>): void {\n super.oninit(vnode);\n\n this.packageName = Stream('');\n }\n\n view(): Mithril.Children {\n return (\n <div className=\"Form-group PackageManager-installer\">\n <label htmlFor=\"install-extension\">{app.translator.trans('flarum-package-manager.admin.extensions.install')}</label>\n <p className=\"helpText\">\n {app.translator.trans('flarum-package-manager.admin.extensions.install_help', {\n extiverse: <a href=\"https://extiverse.com\">extiverse.com</a>,\n })}\n </p>\n <div className=\"FormControl-container\">\n <input className=\"FormControl\" id=\"install-extension\" placeholder=\"vendor/package-name\" bidi={this.packageName} />\n <Button\n className=\"Button\"\n icon=\"fas fa-download\"\n onclick={this.onsubmit.bind(this)}\n loading={app.packageManager.control.isLoading('extension-install')}\n disabled={app.packageManager.control.isLoadingOtherThan('extension-install')}\n >\n {app.translator.trans('flarum-package-manager.admin.extensions.proceed')}\n </Button>\n </div>\n </div>\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.packageManager.control.setLoading('extension-install');\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse & { id: number }>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions`,\n body: {\n data: this.data(),\n },\n errorHandler,\n })\n .then((response) => {\n if (response.processing) {\n jumpToQueue();\n } else {\n const extensionId = response.id;\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_install', { extension: extensionId })\n );\n window.location.href = `${app.forum.attribute('adminUrl')}#/extension/${extensionId}`;\n window.location.reload();\n }\n })\n .finally(() => {\n app.packageManager.control.setLoading(null);\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport errorHandler from '../utils/errorHandler';\n\ntype WhyNotResponse = {\n data: {\n reason: string;\n };\n};\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal<CustomAttrs extends WhyNotModalAttrs = WhyNotModalAttrs> extends Modal<CustomAttrs> {\n loading: boolean = true;\n whyNot: string | null = null;\n\n className() {\n return 'Modal--large WhyNotModal';\n }\n\n title() {\n return app.translator.trans('flarum-package-manager.admin.why_not_modal.title');\n }\n\n oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return <div className=\"Modal-body\">{this.loading ? <LoadingIndicator /> : <pre className=\"WhyNotModal-contents\">{this.whyNot}</pre>}</div>;\n }\n\n requestWhyNot(): void {\n app\n .request<WhyNotResponse>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package,\n },\n },\n errorHandler,\n })\n .then((response) => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n });\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport { Extension } from 'flarum/admin/AdminApplication';\n\nimport { UpdatedPackage } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport Label from './Label';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate: CallableFunction;\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem<Attrs extends ExtensionItemAttrs = ExtensionItemAttrs> extends Component<Attrs> {\n view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children {\n const { extension, updates, onClickUpdate, whyNotWarning, isCore, isDanger } = this.attrs;\n const latestVersion = updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null);\n\n return (\n <div\n className={classList({\n 'PackageManager-extension': true,\n 'PackageManager-extension--core': isCore,\n 'PackageManager-extension--danger': isDanger,\n })}\n >\n <div className=\"PackageManager-extension-icon ExtensionIcon\" style={extension.icon}>\n {extension.icon ? icon(extension.icon.name) : ''}\n </div>\n <div className=\"PackageManager-extension-info\">\n <div className=\"PackageManager-extension-name\">{extension.extra['flarum-extension'].title}</div>\n <div className=\"PackageManager-extension-version\">\n <span className=\"PackageManager-extension-version-current\">{this.version(updates['version'])}</span>\n {latestVersion ? (\n <Label className=\"PackageManager-extension-version-latest\" type={updates['latest-minor'] ? 'success' : 'warning'}>\n {this.version(latestVersion)}\n </Label>\n ) : null}\n </div>\n </div>\n <div className=\"PackageManager-extension-controls\">\n {onClickUpdate ? (\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.extensions.update')}>\n <Button\n icon=\"fas fa-arrow-alt-circle-up\"\n className=\"Button Button--icon Button--flat\"\n onclick={onClickUpdate}\n aria-label={app.translator.trans('flarum-package-manager.admin.extensions.update')}\n />\n </Tooltip>\n ) : null}\n {whyNotWarning ? (\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.extensions.check_why_it_failed_updating')}>\n <Button\n icon=\"fas fa-exclamation-circle\"\n className=\"Button Button--icon Button--flat Button--danger\"\n onclick={() => app.modal.show(WhyNotModal, { package: extension.name })}\n aria-label={app.translator.trans('flarum-package-manager.admin.extensions.check_why_it_failed_updating')}\n />\n </Tooltip>\n ) : null}\n </div>\n </div>\n );\n }\n\n version(v: string): string {\n return 'v' + v.replace('v', '');\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport Alert from 'flarum/common/components/Alert';\nimport RequestError from 'flarum/common/utils/RequestError';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport errorHandler from '../utils/errorHandler';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport { AsyncBackendResponse } from '../shims';\nimport jumpToQueue from '../utils/jumpToQueue';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater<T extends MajorUpdaterAttrs = MajorUpdaterAttrs> extends Component<T> {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode<T, this>) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n <div className=\"Form-group Form-group--danger PackageManager-majorUpdate\">\n <img alt=\"flarum logo\" src={app.forum.attribute('baseUrl') + '/assets/extensions/flarum-package-manager/flarum.svg'} />\n <label>{app.translator.trans('flarum-package-manager.admin.major_updater.title', { version: this.attrs.coreUpdate['latest-major'] })}</label>\n <p className=\"helpText\">{app.translator.trans('flarum-package-manager.admin.major_updater.description')}</p>\n <div className=\"PackageManager-updaterControls\">\n <Tooltip text={app.translator.trans('flarum-package-manager.admin.major_updater.dry_run_help')}>\n <Button\n className=\"Button\"\n icon=\"fas fa-vial\"\n onclick={this.update.bind(this, true)}\n disabled={app.packageManager.control.isLoadingOtherThan('major-update-dry-run')}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.dry_run')}\n </Button>\n </Tooltip>\n <Button\n className=\"Button Button--danger\"\n icon=\"fas fa-play\"\n onclick={this.update.bind(this, false)}\n disabled={app.packageManager.control.isLoadingOtherThan('major-update')}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.update')}\n </Button>\n </div>\n {this.updateState.incompatibleExtensions.length ? (\n <div className=\"PackageManager-majorUpdate-incompatibleExtensions PackageManager-extensions-grid\">\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n <ExtensionItem\n extension={app.data.extensions[extension.replace('flarum-', '').replace('flarum-ext-', '').replace('/', '-')]}\n updates={{}}\n onClickUpdate={null}\n isDanger={true}\n />\n ))}\n </div>\n ) : null}\n {this.updateState.status === 'failure' ? (\n <Alert\n type=\"error\"\n className=\"PackageManager-majorUpdate-failure\"\n dismissible={false}\n controls={[\n <Button\n className=\"Button Button--text PackageManager-majorUpdate-failure-details\"\n icon=\"fas fa-question-circle\"\n onclick={() => app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.why')}\n </Button>,\n ]}\n >\n <p className=\"PackageManager-majorUpdate-failure-desc\">\n {app.translator.trans('flarum-package-manager.admin.major_updater.failure.desc')}\n </p>\n </Alert>\n ) : null}\n </div>\n );\n }\n\n update(dryRun: boolean) {\n app.packageManager.control.setLoading(dryRun ? 'major-update-dry-run' : 'major-update');\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/major-update`,\n body: {\n data: { dryRun },\n },\n errorHandler,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .catch((e: RequestError) => {\n app.modal.close();\n this.updateState.status = 'failure';\n this.updateState.incompatibleExtensions = e.response?.errors?.pop()?.incompatible_extensions as string[];\n })\n .finally(() => {\n app.packageManager.control.setLoading(null);\n m.redraw();\n });\n }\n}\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n const type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n content: T;\n itemName: string;\n priority: number;\n}\n\nclass Item<T> {\n content: T;\n priority: number;\n\n constructor(content: T, priority: number) {\n this.content = content;\n this.priority = priority;\n }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n /**\n * The items in the list.\n */\n protected _items: Record<string, Item<T>> = {};\n\n // TODO: [Flarum 2.0] Remove `.items` getter.\n /**\n * A **read-only copy** of items in the list.\n *\n * We don't allow adding new items to the ItemList via setting new properties,\n * nor do we allow modifying existing items directly.\n *\n * @deprecated Use {@link ItemList.toObject} instead.\n */\n get items(): DeepReadonly<Record<string, Item<T>>> {\n return new Proxy(this._items, {\n set() {\n console.warn('Modifying `ItemList.items` is not allowed.');\n return false;\n },\n });\n }\n\n /**\n * Check whether the list is empty.\n */\n isEmpty(): boolean {\n return Object.keys(this._items).length === 0;\n }\n\n /**\n * Check whether an item is present in the list.\n */\n has(key: string): boolean {\n return Object.keys(this._items).includes(key);\n }\n\n /**\n * Get the content of an item.\n */\n get(key: string): T {\n return this._items[key].content;\n }\n\n /**\n * Get the priority of an item.\n */\n getPriority(key: string): number {\n return this._items[key].priority;\n }\n\n /**\n * Add an item to the list.\n *\n * @param key A unique key for the item.\n * @param content The item's content.\n * @param priority The priority of the item. Items with a higher priority\n * will be positioned before items with a lower priority.\n */\n add(key: string, content: T, priority: number = 0): this {\n this._items[key] = new Item(content, priority);\n\n return this;\n }\n\n // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n /**\n * Replace an item and/or priority in the list, only if it is already present.\n *\n * If `content` or `priority` are `null`, these values will not be replaced.\n *\n * If the provided `key` is not present, nothing will happen.\n *\n * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n *\n * @param key The key of the item in the list\n * @param content The item's new content\n * @param priority The item's new priority\n *\n * @example <caption>Replace priority and not content.</caption>\n * items.replace('myItem', null, 10);\n *\n * @example <caption>Replace content and not priority.</caption>\n * items.replace('myItem', <p>My new value.</p>);\n *\n * @example <caption>Replace content and priority.</caption>\n * items.replace('myItem', <p>My new value.</p>, 10);\n */\n replace(key: string, content: T | null = null, priority: number | null = null): this {\n if (!this.has(key)) return this;\n\n if (content !== null) {\n this._items[key].content = content;\n }\n\n if (priority !== null) {\n this._items[key].priority = priority;\n }\n\n return this;\n }\n\n /**\n * Replaces an item's content, if the provided item key exists.\n *\n * If the provided `key` is not present, an error will be thrown.\n *\n * @param key The key of the item in the list\n * @param content The item's new content\n *\n * @example <caption>Replace item content.</caption>\n * items.setContent('myItem', <p>My new value.</p>);\n *\n * @example <caption>Replace item content and priority.</caption>\n * items\n * .setContent('myItem', <p>My new value.</p>)\n * .setPriority('myItem', 10);\n *\n * @throws If the provided `key` is not present in the ItemList.\n */\n setContent(key: string, content: T): this {\n if (!this.has(key)) {\n throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n }\n\n // Saves on bundle size to call the deprecated method internally\n return this.replace(key, content);\n }\n\n /**\n * Replaces an item's priority, if the provided item key exists.\n *\n * If the provided `key` is not present, an error will be thrown.\n *\n * @param key The key of the item in the list\n * @param priority The item's new priority\n *\n * @example <caption>Replace item priority.</caption>\n * items.setPriority('myItem', 10);\n *\n * @example <caption>Replace item priority and content.</caption>\n * items\n * .setPriority('myItem', 10)\n * .setContent('myItem', <p>My new value.</p>);\n *\n * @throws If the provided `key` is not present in the ItemList.\n */\n setPriority(key: string, priority: number): this {\n if (!this.has(key)) {\n throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n }\n\n this._items[key].priority = priority;\n\n return this;\n }\n\n /**\n * Remove an item from the list.\n *\n * If the provided `key` is not present, nothing will happen.\n */\n remove(key: string): this {\n delete this._items[key];\n\n return this;\n }\n\n /**\n * Merge another list's items into this one.\n *\n * The list passed to this function will overwrite items which already exist\n * with the same key.\n */\n merge(otherList: ItemList<T>): ItemList<T> {\n Object.keys(otherList._items).forEach((key) => {\n const val = otherList._items[key];\n\n if (val instanceof Item) {\n this._items[key] = val;\n }\n });\n\n return this;\n }\n\n /**\n * Convert the list into an array of item content arranged by priority.\n *\n * This **does not** preserve the original types of primitives and proxies\n * all content values to make `itemName` accessible on them.\n *\n * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n * or strings), these will be converted to their object counterparts if you do\n * not provide `true` to this function.\n *\n * **NOTE:** Modifying any objects in the final array may also update the\n * content of the original ItemList.\n *\n * @param keepPrimitives Converts item content to objects and sets the\n * `itemName` property on them.\n *\n * @see https://github.com/flarum/core/issues/3030\n */\n toArray(keepPrimitives?: false): (T & { itemName: string })[];\n /**\n * Convert the list into an array of item content arranged by priority.\n *\n * Content values that are already objects will be proxied and have\n * `itemName` accessible on them. Primitive values will not have the\n * `itemName` property accessible.\n *\n * **NOTE:** Modifying any objects in the final array may also update the\n * content of the original ItemList.\n *\n * @param keepPrimitives Converts item content to objects and sets the\n * `itemName` property on them.\n */\n toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n const item = this._items[key];\n\n if (!keepPrimitives || isObject(item.content)) {\n // Convert content to object, then proxy it\n return {\n ...item,\n content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n };\n } else {\n // ...otherwise just return a clone of the item.\n return { ...item };\n }\n });\n\n return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n }\n\n /**\n * A read-only map of all keys to their respective items in no particular order.\n *\n * We don't allow adding new items to the ItemList via setting new properties,\n * nor do we allow modifying existing items directly. You should use the\n * {@link ItemList.add}, {@link ItemList.setContent} and\n * {@link ItemList.setPriority} methods instead.\n *\n * To match the old behaviour of the `ItemList.items` property, call\n * `Object.values(ItemList.toObject())`.\n *\n * @example\n * const items = new ItemList();\n * items.add('b', 'My cool value', 20);\n * items.add('a', 'My value', 10);\n * items.toObject();\n * // {\n * // a: { content: 'My value', priority: 10, itemName: 'a' },\n * // b: { content: 'My cool value', priority: 20, itemName: 'b' },\n * // }\n */\n toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n return Object.keys(this._items).reduce((map, key) => {\n const obj = {\n content: this.get(key),\n itemName: key,\n priority: this.getPriority(key),\n };\n\n map[key] = obj;\n\n return map;\n }, {} as Record<string, IItemObject<T>>);\n }\n\n /**\n * Proxies an item's content, adding the `itemName` readonly property to it.\n *\n * @example\n * createItemContentProxy({ foo: 'bar' }, 'myItem');\n * // { foo: 'bar', itemName: 'myItem' }\n *\n * @param content The item's content (objects only)\n * @param key The item's key\n * @return Proxied content\n *\n * @internal\n */\n private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n return new Proxy(content, {\n get(target, property, receiver) {\n if (property === 'itemName') return key;\n\n return Reflect.get(target, property, receiver);\n },\n set(target, property, value, receiver) {\n if (key !== null && property === 'itemName') {\n throw new Error('`itemName` property is read-only');\n }\n\n return Reflect.set(target, property, value, receiver);\n },\n }) as C & { itemName: string };\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport Alert from 'flarum/common/components/Alert';\nimport ItemList from '@flarum/core/src/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component<IUpdaterAttrs> {\n view() {\n const core = app.packageManager.control.coreUpdate;\n\n return [\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-package-manager.admin.updater.updater_title')}</label>\n <p className=\"helpText\">{app.translator.trans('flarum-package-manager.admin.updater.updater_help')}</p>\n {this.lastUpdateCheckView()}\n <div className=\"PackageManager-updaterControls\">{this.controlItems().toArray()}</div>\n {this.availableUpdatesView()}\n </div>,\n core && core.package['latest-major'] ? (\n <MajorUpdater coreUpdate={core.package} updateState={app.packageManager.control.lastUpdateRun.major} />\n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.packageManager.control.lastUpdateCheck?.checkedAt && (\n <p className=\"PackageManager-lastUpdatedAt\">\n <span className=\"PackageManager-lastUpdatedAt-label\">\n {app.translator.trans('flarum-package-manager.admin.updater.last_update_checked_at')}\n </span>\n <span className=\"PackageManager-lastUpdatedAt-value\">{humanTime(app.packageManager.control.lastUpdateCheck.checkedAt)}</span>\n </p>\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.packageManager.control;\n\n if (app.packageManager.control.isLoading()) {\n return (\n <div className=\"PackageManager-extensions\">\n <LoadingIndicator />\n </div>\n );\n }\n\n if (!(state.extensionUpdates.length || state.coreUpdate)) {\n return (\n <div className=\"PackageManager-extensions\">\n <Alert type=\"success\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.updater.up_to_date')}\n </Alert>\n </div>\n );\n }\n\n return (\n <div className=\"PackageManager-extensions\">\n <div className=\"PackageManager-extensions-grid\">\n {state.coreUpdate ? (\n <ExtensionItem\n extension={state.coreUpdate.extension}\n updates={state.coreUpdate.package}\n isCore={true}\n onClickUpdate={() => state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n <ExtensionItem\n extension={extension}\n updates={state.packageUpdates[extension.id]}\n onClickUpdate={() => state.updateExtension(extension)}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n </div>\n </div>\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n <Button\n className=\"Button\"\n icon=\"fas fa-sync-alt\"\n onclick={() => app.packageManager.control.checkForUpdates()}\n loading={app.packageManager.control.isLoading('check')}\n disabled={app.packageManager.control.isLoadingOtherThan('check')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.check_for_updates')}\n </Button>,\n 100\n );\n\n items.add(\n 'globalUpdate',\n <Button\n className=\"Button\"\n icon=\"fas fa-play\"\n onclick={() => app.packageManager.control.updateGlobally()}\n loading={app.packageManager.control.isLoading('global-update')}\n disabled={app.packageManager.control.isLoadingOtherThan('global-update')}\n >\n {app.translator.trans('flarum-package-manager.admin.updater.run_global_update')}\n </Button>\n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component<ComponentAttrs> {\n oninit(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n <div className=\"ExtensionPage-permissions PackageManager-controlSection\">\n <div className=\"ExtensionPage-permissions-header\">\n <div className=\"container\">\n <h2 className=\"ExtensionTitle\">{app.translator.trans('flarum-package-manager.admin.sections.control.title')}</h2>\n </div>\n </div>\n <div className=\"container\">\n {app.data['flarum-package-manager.writable_dirs'] ? (\n <>\n <Installer />\n <Updater />\n </>\n ) : (\n <div className=\"Form-group\">\n <Alert type=\"warning\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.file_permissions')}\n </Alert>\n </div>\n )}\n </div>\n </div>\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport ExtensionPage, { ExtensionPageAttrs } from 'flarum/admin/components/ExtensionPage';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nimport QueueSection from './QueueSection';\nimport ControlSection from './ControlSection';\n\nexport default class SettingsPage extends ExtensionPage {\n sections(vnode: Mithril.VnodeDOM<ExtensionPageAttrs, this>): ItemList<unknown> {\n const items = super.sections(vnode);\n\n items.setPriority('content', 10);\n\n items.add('control', <ControlSection />, 8);\n\n if (parseInt(app.data.settings['flarum-package-manager.queue_jobs'])) {\n items.add('queue', <QueueSection />, 5);\n }\n\n items.setPriority('permissions', 0);\n\n return items;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const BYTE_UNITS = [\n\t'B',\n\t'kB',\n\t'MB',\n\t'GB',\n\t'TB',\n\t'PB',\n\t'EB',\n\t'ZB',\n\t'YB',\n];\n\nconst BIBYTE_UNITS = [\n\t'B',\n\t'kiB',\n\t'MiB',\n\t'GiB',\n\t'TiB',\n\t'PiB',\n\t'EiB',\n\t'ZiB',\n\t'YiB',\n];\n\nconst BIT_UNITS = [\n\t'b',\n\t'kbit',\n\t'Mbit',\n\t'Gbit',\n\t'Tbit',\n\t'Pbit',\n\t'Ebit',\n\t'Zbit',\n\t'Ybit',\n];\n\nconst BIBIT_UNITS = [\n\t'b',\n\t'kibit',\n\t'Mibit',\n\t'Gibit',\n\t'Tibit',\n\t'Pibit',\n\t'Eibit',\n\t'Zibit',\n\t'Yibit',\n];\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number, locale, options) => {\n\tlet result = number;\n\tif (typeof locale === 'string' || Array.isArray(locale)) {\n\t\tresult = number.toLocaleString(locale, options);\n\t} else if (locale === true || options !== undefined) {\n\t\tresult = number.toLocaleString(undefined, options);\n\t}\n\n\treturn result;\n};\n\nexport default function prettyBytes(number, options) {\n\tif (!Number.isFinite(number)) {\n\t\tthrow new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n\t}\n\n\toptions = {\n\t\tbits: false,\n\t\tbinary: false,\n\t\t...options,\n\t};\n\n\tconst UNITS = options.bits\n\t\t? (options.binary ? BIBIT_UNITS : BIT_UNITS)\n\t\t: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0 ${UNITS[0]}`;\n\t}\n\n\tconst isNegative = number < 0;\n\tconst prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n\tif (isNegative) {\n\t\tnumber = -number;\n\t}\n\n\tlet localeOptions;\n\n\tif (options.minimumFractionDigits !== undefined) {\n\t\tlocaleOptions = {minimumFractionDigits: options.minimumFractionDigits};\n\t}\n\n\tif (options.maximumFractionDigits !== undefined) {\n\t\tlocaleOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};\n\t}\n\n\tif (number < 1) {\n\t\tconst numberString = toLocaleString(number, options.locale, localeOptions);\n\t\treturn prefix + numberString + ' ' + UNITS[0];\n\t}\n\n\tconst exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);\n\tnumber /= (options.binary ? 1024 : 1000) ** exponent;\n\n\tif (!localeOptions) {\n\t\tnumber = number.toPrecision(3);\n\t}\n\n\tconst numberString = toLocaleString(Number(number), options.locale, localeOptions);\n\n\tconst unit = UNITS[exponent];\n\n\treturn prefix + numberString + ' ' + unit;\n}\n","import Model from 'flarum/common/Model';\nimport prettyBytes from 'pretty-bytes';\n\nexport type TaskOperations =\n | 'extension_install'\n | 'extension_remove'\n | 'extension_update'\n | 'update_global'\n | 'update_minor'\n | 'update_major'\n | 'update_check'\n | 'why_not';\n\nexport default class Task extends Model {\n status() {\n return Model.attribute<'pending' | 'running' | 'failure' | 'success'>('status').call(this);\n }\n\n operation() {\n return Model.attribute<TaskOperations>('operation').call(this);\n }\n\n command() {\n return Model.attribute<string>('command').call(this);\n }\n\n package() {\n return Model.attribute<string>('package').call(this);\n }\n\n output() {\n return Model.attribute<string>('output').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n startedAt() {\n return Model.attribute<Date, string>('startedAt', Model.transformDate).call(this);\n }\n\n finishedAt() {\n return Model.attribute<Date, string>('finishedAt', Model.transformDate).call(this);\n }\n\n peakMemoryUsed() {\n return prettyBytes(Model.attribute<number>('peakMemoryUsed').call(this) * 1024);\n }\n}\n","import app from 'flarum/admin/app';\nimport Task from '../models/Task';\nimport { ApiQueryParamsPlural } from 'flarum/common/Store';\n\nexport default class QueueState {\n private tasks: Task[] | null = null;\n private limit = 20;\n private offset = 0;\n private total = 0;\n\n load(params?: ApiQueryParamsPlural) {\n this.tasks = null;\n params = {\n page: {\n limit: this.limit,\n offset: this.offset,\n ...params?.page,\n },\n ...params,\n };\n\n return app.store.find<Task[]>('package-manager-tasks', params || {}).then((data) => {\n this.tasks = data;\n this.total = data.payload.meta?.total;\n\n m.redraw();\n\n return data;\n });\n }\n\n getItems() {\n return this.tasks;\n }\n\n getTotalPages(): number {\n return Math.ceil(this.total / this.limit);\n }\n\n pageNumber(): number {\n return Math.ceil(this.offset / this.limit);\n }\n\n hasPrev(): boolean {\n return this.pageNumber() !== 0;\n }\n\n hasNext(): boolean {\n return this.offset + this.limit < this.total;\n }\n\n prev(): void {\n if (this.hasPrev()) {\n this.offset -= this.limit;\n this.load();\n }\n }\n\n next(): void {\n if (this.hasNext()) {\n this.offset += this.limit;\n this.load();\n }\n }\n}\n","import app from 'flarum/admin/app';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport { UpdaterLoadingTypes } from '../components/Updater';\nimport { InstallerLoadingTypes } from '../components/Installer';\nimport { MajorUpdaterLoadingTypes } from '../components/MajorUpdater';\nimport { AsyncBackendResponse } from '../shims';\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport type UpdatedPackage = {\n name: string;\n version: string;\n latest: string;\n 'latest-minor': string | null;\n 'latest-major': string | null;\n 'latest-status': string;\n description: string;\n};\n\nexport type ComposerUpdates = {\n installed: UpdatedPackage[];\n};\n\nexport type LastUpdateCheck = {\n checkedAt: Date | null;\n updates: ComposerUpdates;\n};\n\ntype UpdateType = 'major' | 'minor' | 'global';\ntype UpdateStatus = 'success' | 'failure' | null;\nexport type UpdateState = {\n ranAt: Date | null;\n status: UpdateStatus;\n limitedPackages: string[];\n incompatibleExtensions: string[];\n};\n\nexport type LastUpdateRun = {\n [key in UpdateType]: UpdateState;\n} & {\n limitedPackages: () => string[];\n};\n\nexport type LoadingTypes = UpdaterLoadingTypes | InstallerLoadingTypes | MajorUpdaterLoadingTypes;\n\nexport type CoreUpdate = {\n package: UpdatedPackage;\n extension: Extension;\n};\n\nexport default class ControlSectionState {\n loading: LoadingTypes = null;\n\n public packageUpdates: Record<string, UpdatedPackage> = {};\n public lastUpdateCheck!: LastUpdateCheck;\n public extensionUpdates!: Extension[];\n public coreUpdate: CoreUpdate | null = null;\n get lastUpdateRun(): LastUpdateRun {\n const lastUpdateRun = JSON.parse(app.data.settings['flarum-package-manager.last_update_run']) as LastUpdateRun;\n\n lastUpdateRun.limitedPackages = () => [\n ...lastUpdateRun.major.limitedPackages,\n ...lastUpdateRun.minor.limitedPackages,\n ...lastUpdateRun.global.limitedPackages,\n ];\n\n return lastUpdateRun;\n }\n\n constructor() {\n this.lastUpdateCheck = JSON.parse(app.data.settings['flarum-package-manager.last_update_check']) as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(this.lastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(this.lastUpdateCheck);\n }\n\n isLoading(name: LoadingTypes = null): boolean {\n return (name && this.loading === name) || (!name && this.loading !== null);\n }\n\n isLoadingOtherThan(name: LoadingTypes): boolean {\n return this.loading !== null && this.loading !== name;\n }\n\n setLoading(name: LoadingTypes): void {\n this.loading = name;\n }\n\n checkForUpdates() {\n this.setLoading('check');\n\n app\n .request<AsyncBackendResponse | LastUpdateCheck>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/check-for-updates`,\n errorHandler,\n })\n .then((response) => {\n if ((response as AsyncBackendResponse).processing) {\n jumpToQueue();\n } else {\n this.lastUpdateCheck = response as LastUpdateCheck;\n this.extensionUpdates = this.formatExtensionUpdates(response as LastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(response as LastUpdateCheck);\n m.redraw();\n }\n })\n .finally(() => {\n this.setLoading(null);\n m.redraw();\n });\n }\n\n updateCoreMinor() {\n if (confirm(extractText(app.translator.trans('flarum-package-manager.admin.minor_update_confirmation.content')))) {\n app.modal.show(LoadingModal);\n this.setLoading('minor-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/minor-update`,\n errorHandler,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.update_successful'));\n window.location.reload();\n }\n })\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n }\n\n updateExtension(extension: Extension) {\n app.modal.show(LoadingModal);\n this.setLoading('extension-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${extension.id}`,\n errorHandler,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show(\n { type: 'success' },\n app.translator.trans('flarum-package-manager.admin.extensions.successful_update', {\n extension: extension.extra['flarum-extension'].title,\n })\n );\n window.location.reload();\n }\n })\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.setLoading('global-update');\n\n app\n .request<AsyncBackendResponse | null>({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/package-manager/global-update`,\n errorHandler,\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.updater.global_update_successful'));\n window.location.reload();\n }\n })\n .finally(() => {\n this.setLoading(null);\n app.modal.close();\n m.redraw();\n });\n }\n\n formatExtensionUpdates(lastUpdateCheck: LastUpdateCheck): Extension[] {\n this.packageUpdates = {};\n\n lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => {\n const id = composerPackage.name.replace('/', '-').replace(/(flarum-ext-)|(flarum-)/, '');\n\n const extension = app.data.extensions[id];\n const safeToUpdate = ['semver-safe-update', 'update-possible'].includes(composerPackage['latest-status']);\n\n if (extension && safeToUpdate) {\n this.packageUpdates[extension.id] = composerPackage;\n }\n\n return extension && safeToUpdate;\n });\n\n return (Object.values(app.data.extensions) as Extension[]).filter((extension: Extension) => this.packageUpdates[extension.id]);\n }\n\n formatCoreUpdate(lastUpdateCheck: LastUpdateCheck): CoreUpdate | null {\n const core = lastUpdateCheck?.updates?.installed?.filter((composerPackage: UpdatedPackage) => composerPackage.name === 'flarum/core').pop();\n\n if (!core) return null;\n\n return {\n package: core,\n extension: {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n // @ts-ignore\n backgroundImage: `url(${app.forum.attribute('baseUrl')}/assets/extensions/flarum-package-manager/flarum.svg`,\n },\n extra: {\n 'flarum-extension': {\n title: extractText(app.translator.trans('flarum-package-manager.admin.updater.flarum')),\n },\n },\n },\n };\n }\n}\n","import QueueState from './QueueState';\nimport ControlSectionState from './ControlSectionState';\n\nexport default class PackageManagerState {\n public queue: QueueState = new QueueState();\n public control: ControlSectionState = new ControlSectionState();\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n * - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n * This allows us to use attrs across components without having to pass the vnode to every single\n * method.\n * - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n * the attrs that have been passed into a component.\n * - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n * us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n * - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n /**\n * The root DOM element for the component.\n */\n element!: Element;\n\n /**\n * The attributes passed into the component.\n *\n * @see https://mithril.js.org/components.html#passing-data-to-components\n */\n attrs!: Attrs;\n\n /**\n * Class component state that is persisted between redraws.\n *\n * Updating this will **not** automatically trigger a redraw, unlike\n * other frameworks.\n *\n * This is different to Vnode state, which is always an instance of your\n * class component.\n *\n * This is `undefined` by default.\n */\n state!: State;\n\n /**\n * @inheritdoc\n */\n abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n /**\n * @inheritdoc\n */\n oninit(vnode: Mithril.Vnode<Attrs, this>) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n this.element = vnode.dom;\n }\n\n /**\n * @inheritdoc\n */\n onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n this.setAttrs(vnode.attrs);\n }\n\n /**\n * @inheritdoc\n */\n onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * @inheritdoc\n */\n onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * @inheritdoc\n */\n onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n /**\n * Returns a jQuery object for this component's element. If you pass in a\n * selector string, this method will return a jQuery object, using the current\n * element as its buffer.\n *\n * For example, calling `component.$('li')` will return a jQuery object\n * containing all of the `li` elements inside the DOM element of this\n * component.\n *\n * @param [selector] a jQuery-compatible selector string\n * @returns the jQuery object for the DOM node\n * @final\n */\n $(selector?: string): JQuery {\n const $element = $(this.element) as JQuery<HTMLElement>;\n\n return selector ? $element.find(selector) : $element;\n }\n\n /**\n * Convenience method to attach a component without JSX.\n * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n *\n * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n */\n static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n const componentAttrs = { ...attrs };\n\n return m(this as any, componentAttrs, children);\n }\n\n /**\n * Saves a reference to the vnode attrs after running them through initAttrs,\n * and checking for common issues.\n */\n private setAttrs(attrs: Attrs = {} as Attrs): void {\n (this.constructor as typeof Component).initAttrs(attrs);\n\n if (attrs) {\n if ('children' in attrs) {\n throw new Error(\n `[${\n (this.constructor as typeof Component).name\n }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n );\n }\n\n if ('tag' in attrs) {\n throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n }\n }\n\n this.attrs = attrs;\n }\n\n /**\n * Initialize the component's attrs.\n *\n * This can be used to assign default values for missing, optional attrs.\n */\n static initAttrs(attrs: unknown): void {}\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n {},\n {\n get(_, properties) {\n return Reflect.get(w.app, properties, w.app);\n },\n set(_, properties, value) {\n return Reflect.set(w.app, properties, value, w.app);\n },\n }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","import type Mithril from 'mithril';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icons name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');\n\n return <i aria-hidden=\"true\" {...attrs} />;\n}\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n if (vdom instanceof Array) {\n return vdom.map((element) => extractText(element)).join('');\n } else if (typeof vdom === 'object' && vdom !== null) {\n return vdom.children ? extractText(vdom.children) : String(vdom.text);\n } else {\n return String(vdom);\n }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n /**\n * Custom classes for the loading indicator's container.\n */\n className?: string;\n /**\n * Custom classes for the loading indicator's container.\n */\n containerClassName?: string;\n /**\n * Optional size for the loading indicator.\n */\n size?: 'large' | 'medium' | 'small';\n /**\n * Optional attributes to apply to the loading indicator's container.\n */\n containerAttrs?: Partial<ComponentAttrs>;\n /**\n * Display type of the spinner.\n *\n * @default 'block'\n */\n display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n view() {\n const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n const completeClassName = classList('LoadingIndicator', className);\n const completeContainerClassName = classList(\n 'LoadingIndicator-container',\n display !== 'unset' && `LoadingIndicator-container--${display}`,\n size && `LoadingIndicator-container--${size}`,\n containerClassName\n );\n\n return (\n <div\n aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n role=\"status\"\n {...attrs.containerAttrs}\n data-size={size}\n className={completeContainerClassName}\n >\n <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n </div>\n );\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n /**\n * Class(es) of an optional icon to be rendered within the button.\n *\n * If provided, the button will gain a `has-icon` class.\n */\n icon?: string;\n /**\n * Disables button from user input.\n *\n * Default: `false`\n */\n disabled?: boolean;\n /**\n * Show a loading spinner within the button.\n *\n * If `true`, also disables the button.\n *\n * Default: `false`\n */\n loading?: boolean;\n /**\n * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n * the `<Tooltip>` component.\n *\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n *\n * @deprecated\n */\n title?: string | Mithril.ChildArray;\n /**\n * Accessible text for the button. This should always be present if the button only\n * contains an icon.\n *\n * The textual content of this attribute is passed to the DOM element as `aria-label`.\n */\n 'aria-label'?: string | Mithril.ChildArray;\n /**\n * Button type.\n *\n * Default: `\"button\"`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n */\n type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n // If no `type` attr provided, set to \"button\"\n type ||= 'button';\n\n // Use `title` attribute as `aria-label` if none provided\n ariaLabel ||= title;\n\n // If given a translation object, extract the text.\n if (typeof ariaLabel === 'object') {\n ariaLabel = extractText(ariaLabel);\n }\n\n if (disabled || loading) {\n delete attrs.onclick;\n }\n\n className = classList(_class, className, {\n hasIcon: iconName,\n disabled: disabled || loading,\n loading: loading,\n });\n\n const buttonAttrs = {\n disabled,\n className,\n type,\n 'aria-label': ariaLabel,\n ...attrs,\n };\n\n return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n }\n\n oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n super.oncreate(vnode);\n\n const { 'aria-label': ariaLabel } = this.attrs;\n\n if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n fireDebugWarning(\n '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read \"Button\". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',\n this.element\n );\n }\n }\n\n /**\n * Get the template for the button's content.\n */\n protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n const iconName = this.attrs.icon;\n\n return [\n iconName && icon(iconName, { className: 'Button-icon' }),\n children && <span className=\"Button-label\">{children}</span>,\n this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n ];\n }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n if (!app.forum.attribute('debug')) return;\n\n console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n view() {\n return <li className=\"Dropdown-separator\" />;\n }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n itemClassName?: string;\n key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n isListItem?: boolean;\n isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n const newItems: ModdedChildrenWithItemName[] = [];\n let prevItem: ModdedChildren;\n\n items.filter(Boolean).forEach((item, i: number) => {\n if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n prevItem = item;\n newItems.push(item);\n }\n });\n\n return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n rawItems: ModdedChildrenWithItemName[],\n customTag: VnodeElementTag<Attrs> = 'li',\n attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n const items = rawItems instanceof Array ? rawItems : [rawItems];\n const Tag = customTag;\n\n return withoutUnnecessarySeparators(items).map((item) => {\n const classes = [item.itemName && `item-${item.itemName}`];\n\n if (isVnode(item) && item.tag.isListItem) {\n item.attrs = item.attrs || {};\n item.attrs.key = item.attrs.key || item.itemName;\n item.key = item.attrs.key;\n\n return item;\n }\n\n if (isVnode(item)) {\n classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n if (item.tag.isActive?.(item.attrs)) {\n classes.push('active');\n }\n }\n\n const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n return (\n <Tag className={classList(classes)} key={key} {...attributes}>\n {item}\n </Tag>\n );\n });\n}\n","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n const value = object[property];\n\n delete object[property];\n\n return value;\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n type?: string;\n /** Title of the alert. Optional. */\n title?: Mithril.Children;\n /** Icon used next to the title. Optional. */\n icon?: string;\n /** An array of controls to show in the alert. */\n controls?: Mithril.Children;\n /** Whether or not the alert can be dismissed. */\n dismissible?: boolean;\n /** A callback to run when the alert is dismissed */\n ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n view(vnode: Mithril.VnodeDOM<T, this>) {\n const attrs = Object.assign({}, this.attrs);\n\n const type = extract(attrs, 'type');\n attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n const title = extract(attrs, 'title');\n const icon = extract(attrs, 'icon');\n const content = extract(attrs, 'content') || vnode.children;\n const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n // If the alert is meant to be dismissible (which is the case by default),\n // then we will create a dismiss button to append as the final control in\n // the alert.\n const dismissible = extract(attrs, 'dismissible');\n const ondismiss = extract(attrs, 'ondismiss');\n const dismissControl: Mithril.Vnode[] = [];\n\n if (dismissible || dismissible === undefined) {\n dismissControl.push(\n <Button\n aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n icon=\"fas fa-times\"\n class=\"Button Button--link Button--icon Alert-dismiss\"\n onclick={ondismiss}\n />\n );\n }\n\n return (\n <div {...attrs}>\n {!!title && (\n <div class=\"Alert-title\">\n {!!icon && <span class=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n <span class=\"Alert-title-text\">{title}</span>\n </div>\n )}\n <span class=\"Alert-body\">{content}</span>\n <ul class=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n </div>\n );\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport isExtensionEnabled from 'flarum/admin/utils/isExtensionEnabled';\nimport SettingsPage from './components/SettingsPage';\n\nimport Task from './models/Task';\nimport jumpToQueue from './utils/jumpToQueue';\nimport extractText from 'flarum/common/utils/extractText';\nimport { AsyncBackendResponse } from './shims';\nimport PackageManagerState from './states/PackageManagerState';\nimport Alert from \"@flarum/core/src/common/components/Alert\";\n\napp.initializers.add('flarum-package-manager', (app) => {\n app.store.models['package-manager-tasks'] = Task;\n\n app.packageManager = new PackageManagerState();\n\n app.extensionData\n .for('flarum-package-manager')\n .registerSetting(() => (\n <div className=\"Form-group\">\n <Alert type=\"warning\" dismissible={false}>\n {app.translator.trans('flarum-package-manager.admin.settings.access_warning')}\n </Alert>\n </div>\n ))\n .registerSetting({\n setting: 'flarum-package-manager.queue_jobs',\n label: app.translator.trans('flarum-package-manager.admin.settings.queue_jobs'),\n help: m.trust(\n extractText(\n app.translator.trans('flarum-package-manager.admin.settings.queue_jobs_help', {\n basic_impl_link: 'https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting',\n adv_impl_link: 'https://discuss.flarum.org/d/21873-redis-sessions-cache-queues',\n php_version: `<strong>${app.data.phpVersion}</strong>`,\n folder_perms_link: 'https://docs.flarum.org/install#folder-ownership',\n })\n )\n ),\n default: false,\n type: 'boolean',\n disabled: app.data['flarum-package-manager.using_sync_queue'],\n })\n .registerPage(SettingsPage);\n\n extend(ExtensionPage.prototype, 'topItems', function (items) {\n if (this.extension.id === 'flarum-package-manager' || isExtensionEnabled(this.extension.id)) {\n return;\n }\n\n items.add(\n 'remove',\n <Button\n className=\"Button Button--danger\"\n icon=\"fas fa-times\"\n onclick={() => {\n app.modal.show(LoadingModal);\n\n app\n .request<AsyncBackendResponse | null>({\n url: `${app.forum.attribute('apiUrl')}/package-manager/extensions/${this.extension.id}`,\n method: 'DELETE',\n })\n .then((response) => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({ type: 'success' }, app.translator.trans('flarum-package-manager.admin.extensions.successful_remove'));\n window.location = app.forum.attribute('adminUrl');\n }\n })\n .finally(() => {\n app.modal.close();\n });\n }}\n >\n Remove\n </Button>\n );\n });\n});\n"],"names":["module","exports","t","s","n","i","e","r","o","u","h","a","d","years","months","days","hours","minutes","seconds","milliseconds","weeks","c","p","f","$l","m","l","$","Math","ceil","floor","y","abs","g","negative","format","this","$d","$ms","parseFromMilliseconds","Object","keys","forEach","calMilliseconds","match","slice","map","Number","prototype","reduce","toISOString","toJSON","Y","YY","YYYY","M","MM","D","DD","H","HH","mm","ss","SSS","replace","String","as","get","add","subtract","locale","clone","humanize","fromNow","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","$utils","duration","isDuration","bind","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","length","indexOf","Label","view","vnode","attrs","className","type","classList","children","Component","TaskOutputModal","title","app","task","operation","content","command","output","Modal","Pagination","class","disabled","list","hasPrev","onclick","prev","icon","current","pageNumber","total","getTotalPages","hasNext","next","QueueSection","oninit","id","queueTable","columns","items","ItemList","label","extractText","operationIcon","extension","style","name","extra","running","failure","pending","success","status","startedAt","text","dayjs","finishedAt","start","end","extend","durationTime","diff","humanDuration","peakMemoryUsed","tasks","toArray","item","index","update_check","update_major","update_minor","update_global","extension_install","extension_remove","extension_update","why_not","error","response","errors","includes","code","guessed_cause","jumpToQueue","route","set","setTimeout","document","getElementById","scrollIntoView","block","window","Installer","packageName","Stream","htmlFor","extiverse","href","placeholder","bidi","onsubmit","loading","data","package","LoadingModal","method","url","body","errorHandler","then","processing","extensionId","location","reload","redraw","WhyNotModal","whyNot","oncreate","requestWhyNot","reason","ExtensionItem","updates","onClickUpdate","whyNotWarning","isCore","isDanger","latestVersion","version","v","MajorUpdater","updateState","alt","src","coreUpdate","update","incompatibleExtensions","dismissible","controls","dryRun","pop","incompatible_extensions","_extends","assign","arguments","apply","_defineProperties","props","descriptor","configurable","writable","_createClass","Constructor","protoProps","staticProps","isObject","Item","priority","_items","isEmpty","has","getPriority","setContent","Error","setPriority","remove","merge","otherList","val","keepPrimitives","createItemContentProxy","sort","b","toObject","itemName","Proxy","property","receiver","Reflect","console","warn","Updater","lastUpdateCheckView","controlItems","availableUpdatesView","checkedAt","humanTime","state","extensionUpdates","updateCoreMinor","lastUpdateRun","limitedPackages","packageUpdates","updateExtension","ControlSection","SettingsPage","sections","parseInt","ExtensionPage","BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","options","result","Array","isArray","Task","Model","createdAt","isFinite","TypeError","UNITS","bits","binary","signed","localeOptions","isNegative","prefix","minimumFractionDigits","maximumFractionDigits","exponent","min","log","log10","toPrecision","prettyBytes","QueueState","limit","offset","load","params","page","payload","meta","getItems","ControlSectionState","lastUpdateCheck","JSON","parse","formatExtensionUpdates","formatCoreUpdate","isLoading","isLoadingOtherThan","setLoading","checkForUpdates","confirm","updateGlobally","installed","filter","composerPackage","safeToUpdate","values","backgroundImage","major","minor","global","PackageManagerState","queue","control","element","setAttrs","dom","onbeforeupdate","onupdate","onbeforeremove","onremove","selector","$element","find","component","componentAttrs","initAttrs","w","_","properties","fontClass","toVal","mix","k","str","tmp","x","vdom","join","LoadingIndicator","display","size","containerClassName","completeClassName","completeContainerClassName","translator","trans","role","containerAttrs","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","getButtonContent","getAttribute","forum","attribute","fireDebugWarning","Separator","isListItem","isVnode","isSeparator","tag","extract","object","Alert","ondismiss","dismissControl","push","iconHelper","rawItems","customTag","attributes","prevItem","newItems","Tag","Boolean","classes","itemClassName","isActive","listItems","concat","store","models","packageManager","extensionData","registerSetting","setting","help","trust","basic_impl_link","adv_impl_link","php_version","phpVersion","folder_perms_link","default","registerPage","isExtensionEnabled","modal","show","request","alerts","close"],"sourceRoot":""}