diff --git a/extensions/package-manager/js/dist/admin.js b/extensions/package-manager/js/dist/admin.js index 99dbe7fc08..737efbff3f 100755 --- a/extensions/package-manager/js/dist/admin.js +++ b/extensions/package-manager/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={151:function(e){e.exports=function(){"use strict";var e,t,a=1e3,n=6e4,s=36e5,r=864e5,i=/\[([^\]]+)]|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,o=31536e6,l=2628e6,m=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:o,months:l,days:r,hours:s,minutes:n,seconds:a,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof b},c=function(e,t,a){return new b(e,a,t.$l)},g=function(e){return t.p(e)+"s"},p=function(e){return e<0},h=function(e){return p(e)?Math.ceil(e):Math.floor(e)},f=function(e){return Math.abs(e)},x=function(e,t){return e?p(e)?{negative:!0,format:""+f(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){function p(e,t,a){var n=this;if(this.$d={},this.$l=a,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return c(e*u[g(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[g(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(m);if(s){var r=s.slice(2).map((function(e){return null!=e?Number(e):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 f=p.prototype;return f.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,a){return t+(e.$d[a]||0)*u[a]}),0)},f.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/l),e%=l,this.$d.days=h(e/r),e%=r,this.$d.hours=h(e/s),e%=s,this.$d.minutes=h(e/n),e%=n,this.$d.seconds=h(e/a),e%=a,this.$d.milliseconds=e},f.toISOString=function(){var e=x(this.$d.years,"Y"),t=x(this.$d.months,"M"),a=+this.$d.days||0;this.$d.weeks&&(a+=7*this.$d.weeks);var n=x(a,"D"),s=x(this.$d.hours,"H"),r=x(this.$d.minutes,"M"),i=this.$d.seconds||0;this.$d.milliseconds&&(i+=this.$d.milliseconds/1e3,i=Math.round(1e3*i)/1e3);var o=x(i,"S"),l=e.negative||t.negative||n.negative||s.negative||r.negative||o.negative,m=s.format||r.format||o.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+n.format+m+s.format+r.format+o.format;return"P"===u||"-P"===u?"P0D":u},f.toJSON=function(){return this.toISOString()},f.format=function(e){var a=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return a.replace(i,(function(e,t){return t||String(n[e])}))},f.as=function(e){return this.$ms/u[g(e)]},f.get=function(e){var t=this.$ms,a=g(e);return"milliseconds"===a?t%=1e3:t="weeks"===a?h(t/u[a]):this.$d[a],t||0},f.add=function(e,t,a){var n;return n=t?e*u[g(t)]:d(e)?e.$ms:c(e,this).$ms,c(this.$ms+n*(a?-1:1),this)},f.subtract=function(e,t){return this.add(e,t,!0)},f.locale=function(e){var t=this.clone();return t.$l=e,t},f.clone=function(){return c(this.$ms,this)},f.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},f.valueOf=function(){return this.asMilliseconds()},f.milliseconds=function(){return this.get("milliseconds")},f.asMilliseconds=function(){return this.as("milliseconds")},f.seconds=function(){return this.get("seconds")},f.asSeconds=function(){return this.as("seconds")},f.minutes=function(){return this.get("minutes")},f.asMinutes=function(){return this.as("minutes")},f.hours=function(){return this.get("hours")},f.asHours=function(){return this.as("hours")},f.days=function(){return this.get("days")},f.asDays=function(){return this.as("days")},f.weeks=function(){return this.get("weeks")},f.asWeeks=function(){return this.as("weeks")},f.months=function(){return this.get("months")},f.asMonths=function(){return this.as("months")},f.years=function(){return this.get("years")},f.asYears=function(){return this.as("years")},p}(),v=function(e,t,a){return e.add(t.years()*a,"y").add(t.months()*a,"M").add(t.days()*a,"d").add(t.hours()*a,"h").add(t.minutes()*a,"m").add(t.seconds()*a,"s").add(t.milliseconds()*a,"ms")};return function(a,n,s){e=s,t=s().$utils(),s.duration=function(e,t){var a=s.locale();return c(e,{$l:a},t)},s.isDuration=d;var r=n.prototype.add,i=n.prototype.subtract;n.prototype.add=function(e,t){return d(e)?v(this,e,1):r.bind(this)(e,t)},n.prototype.subtract=function(e,t){return d(e)?v(this,e,-1):i.bind(this)(e,t)}}}()}},t={};function a(n){flarum.reg._webpack_runtimes["flarum-extension-manager"]||=a;var s=t[n];if(void 0!==s)return s.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";a.r(n),a.d(n,{extend:()=>Je});const e=flarum.reg.get("core","common/extend"),t=flarum.reg.get("core","admin/app");var s=a.n(t);const r=flarum.reg.get("core","admin/components/ExtensionPage");var i=a.n(r);const o=flarum.reg.get("core","common/components/Button");var l=a.n(o);const u=flarum.reg.get("core","admin/components/LoadingModal");var d=a.n(u);const c=flarum.reg.get("core","admin/utils/isExtensionEnabled");var g=a.n(c);function p(){s().modal.close(),m.route.set(s().route("extension",{id:"flarum-extension-manager"})),s().extensionManager.queue.load({},!0),setTimeout((()=>{document.getElementById("ExtensionManager-queueSection")?.scrollIntoView({block:"nearest"})}),200)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t,a){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=h(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}window.jumpToQueue=p,flarum.reg.add("flarum-extension-manager","admin/utils/jumpToQueue",p);class x{constructor(){f(this,"polling",null),f(this,"tasks",null),f(this,"limit",20),f(this,"offset",0),f(this,"total",0),f(this,"loading",!1)}load(e,t){return void 0===t&&(t=!1),this.loading=!0,e={page:{limit:this.limit,offset:this.offset,...e?.page},...e},s().store.find("extension-manager-tasks",e||{}).then((e=>{this.tasks=e,this.total=e.payload.meta?.page?.total||0,m.redraw();const a=e?.find((e=>"pending"===e.status()||"running"===e.status()));return a?this.pollQueue(t):t?(s().extensionManager.control.setLoading(null),window.location.reload()):s().extensionManager.control.isLoading()&&s().extensionManager.control.setLoading(null),this.loading=!1,e}))}isLoading(){return this.loading}getItems(){return this.tasks}getTotalItems(){return this.total}getTotalPages(){return Math.ceil(this.total/this.limit)}pageNumber(){return Math.ceil(this.offset/this.limit)}getPerPage(){return this.limit}hasPrev(){return 0!==this.pageNumber()}hasNext(){return this.offset+this.limit{this.load({},e)}),6e3)}hasPending(){return!!this.tasks?.find((e=>"pending"===e.status()||"running"===e.status()))}}function b(e){s().extensionManager.control.setLoading(null);const t=e.response.errors[0];if(!["composer_command_failure","extension_already_installed","extension_not_installed"].includes(t.code))throw e;switch(s().alerts.clear(),t.code){case"composer_command_failure":t.guessed_cause?(s().alerts.show({type:"error"},s().translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${t.guessed_cause}`)),s().modal.close()):s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.composer_command_failure"));break;case"extension_already_installed":s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.extension_already_installed")),s().modal.close();break;case"extension_not_installed":s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.extension_not_installed")),s().modal.close()}}flarum.reg.add("flarum-extension-manager","admin/states/QueueState",x);const v=flarum.reg.get("core","common/utils/extractText");var y=a.n(v);class _{get lastUpdateRun(){const e=JSON.parse(s().data.settings["flarum-extension-manager.last_update_run"]);return e.limitedPackages=()=>[...e.major.limitedPackages,...e.minor.limitedPackages,...e.global.limitedPackages],e}constructor(){f(this,"loading",null),f(this,"packageUpdates",{}),f(this,"lastUpdateCheck",void 0),f(this,"extensionUpdates",void 0),f(this,"coreUpdate",null),this.lastUpdateCheck=JSON.parse(s().data.settings["flarum-extension-manager.last_update_check"]),this.extensionUpdates=this.formatExtensionUpdates(this.lastUpdateCheck),this.coreUpdate=this.formatCoreUpdate(this.lastUpdateCheck)}isLoading(e){return void 0===e&&(e=null),e&&this.loading===e||!e&&null!==this.loading}hasOperationRunning(){return this.isLoading()||s().extensionManager.queue.hasPending()}setLoading(e){this.loading=e}requirePackage(e){s().extensionManager.control.setLoading("extension-install"),s().modal.show(d()),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/extensions`,body:{data:e}}).then((e=>{if(e.processing)p();else{const t=e.id;s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.extensions.successful_install",{extension:t})),window.location.href=`${s().forum.attribute("adminUrl")}#/extension/${t}`,window.location.reload()}})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}checkForUpdates(){this.setLoading("check"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/check-for-updates`}).then((e=>{e.processing?p():(this.lastUpdateCheck=e,this.extensionUpdates=this.formatExtensionUpdates(e),this.coreUpdate=this.formatCoreUpdate(e),this.setLoading(null),m.redraw())})).catch(b).finally((()=>{m.redraw()}))}updateCoreMinor(){confirm(y()(s().translator.trans("flarum-extension-manager.admin.minor_update_confirmation.content")))&&(s().modal.show(d()),this.setLoading("minor-update"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/minor-update`}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.update_successful")),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()})))}updateExtension(e,t){s().modal.show(d()),this.setLoading("extension-update"),s().request({method:"PATCH",url:`${s().forum.attribute("apiUrl")}/extension-manager/extensions/${e.id}`,body:{data:{updateMode:t}}}).then((t=>{t?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.extensions.successful_update",{extension:e.extra["flarum-extension"].title})),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}updateGlobally(){s().modal.show(d()),this.setLoading("global-update"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/global-update`}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.updater.global_update_successful")),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}formatExtensionUpdates(e){return this.packageUpdates={},e?.updates?.installed?.filter((e=>{const t=e.name.replace("/","-").replace(/(flarum-ext-)|(flarum-)/,""),a=s().data.extensions[t],n=["semver-safe-update","update-possible"].includes(e["latest-status"]);return a&&n&&(this.packageUpdates[a.id]=e),a&&n})),Object.values(s().data.extensions).filter((e=>this.packageUpdates[e.id]))}formatCoreUpdate(e){const t=e?.updates?.installed?.filter((e=>"flarum/core"===e.name)).pop();return t?{package:t,extension:{id:"flarum-core",name:"flarum/core",version:s().data.settings.version,icon:{name:"",backgroundImage:`url(${s().data.resources[0].attributes.baseUrl}/assets/extensions/flarum-extension-manager/flarum.svg`},extra:{"flarum-extension":{title:y()(s().translator.trans("flarum-extension-manager.admin.updater.flarum"))}},links:{}}}:null}majorUpdate(e){let{dryRun:t}=e;s().extensionManager.control.setLoading(t?"major-update-dry-run":"major-update"),s().modal.show(d());const a=this.lastUpdateRun.major;s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/major-update`,body:{data:{dryRun:t}}}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.update_successful")),window.location.reload())})).catch(b).catch((e=>{s().modal.close(),a.status="failure",a.incompatibleExtensions=e.response?.errors?.pop()?.incompatible_extensions})).finally((()=>{m.redraw()}))}}flarum.reg.add("flarum-extension-manager","admin/states/ControlSectionState",_);const k=flarum.reg.get("core","common/states/PaginatedListState");var N=a.n(k);class M extends(N()){get type(){return"external-extensions"}constructor(){super({sort:"-downloads"},1,12)}sortMap(){return{"-createdAt":{sort:"-createdAt",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.latest",{},!0)},"-downloads":{sort:"-downloads",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.top",{},!0)}}}}flarum.reg.add("flarum-extension-manager","admin/states/ExtensionListState",M);class w{constructor(){f(this,"queue",new x),f(this,"control",new _),f(this,"extensions",new M)}}flarum.reg.add("flarum-extension-manager","admin/states/ExtensionManagerState",w);const E=flarum.reg.get("core","common/extenders");var S=a.n(E);const B=flarum.reg.get("core","common/Component");var U=a.n(B);const $=flarum.reg.get("core","common/components/LoadingIndicator");var C=a.n($);const q=flarum.reg.get("core","common/components/Tooltip");var P=a.n(q);const T=flarum.reg.get("core","common/components/Icon");var j=a.n(T);const F=flarum.reg.get("core","common/utils/ItemList");var L=a.n(F);const I=flarum.reg.get("core","common/components/Link");var A=a.n(I);const D=flarum.reg.get("core","common/components/Pagination");var O=a.n(D);const R=flarum.reg.get("core","common/utils/classList");var Y=a.n(R);class W extends(U()){view(e){const{className:t,type:a,...n}=this.attrs;return m("span",Object.assign({className:Y()(["Label",`Label--${this.attrs.type}`,t])},n),e.children)}}flarum.reg.add("flarum-extension-manager","admin/components/Label",W);const G=flarum.reg.get("core","common/components/Modal");var V=a.n(G);class H extends(V()){className(){return"Modal--large QuickModal"}title(){return s().translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`)}content(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},"failure"===this.attrs.task.status()&&m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&s().translator.trans("flarum-extension-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))}}flarum.reg.add("flarum-extension-manager","admin/components/TaskOutputModal",H);var z=a(151),Q=a.n(z);function J(e,t){dayjs.extend(Q());const a=dayjs(t).diff(e);return dayjs.duration(a).humanize()}flarum.reg.add("flarum-extension-manager","admin/utils/humanDuration",J);class Z extends(U()){oninit(e){super.oninit(e),s().extensionManager.queue.load()}view(){return m("section",{id:"ExtensionManager-queueSection",className:"ExtensionPage-settings ExtensionManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header ExtensionManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},s().translator.trans("flarum-extension-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:()=>s().extensionManager.queue.load(),"aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.refresh"),disabled:s().extensionManager.control.isLoading()}))),m("div",{className:"container"},this.queueTable()))}columns(){const e=new(L());return e.add("operation",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.operation")),content:e=>m("div",{className:"ExtensionManager-queueTable-operation"},m("span",{className:"ExtensionManager-queueTable-operation-icon"},this.operationIcon(e.operation())),m("span",{className:"ExtensionManager-queueTable-operation-name"},s().translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${e.operation()}`)))},80),e.add("package",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.package")),content:e=>{const t=s().data.extensions[e.package()?.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return t?m(A(),{className:"ExtensionManager-queueTable-package",href:s().route("extension",{id:t.id})},m("div",{className:"ExtensionManager-queueTable-package-icon ExtensionIcon",style:t.icon},!!t.icon&&m(j(),{name:t.icon.name})),m("div",{className:"ExtensionManager-queueTable-package-details"},m("span",{className:"ExtensionManager-queueTable-package-title"},t.extra["flarum-extension"].title),m("span",{className:"ExtensionManager-queueTable-package-name"},e.package()))):e.package()}},75),e.add("status",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.status")),content:e=>m("[",null,m(W,{className:"ExtensionManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[e.status()]},s().translator.trans(`flarum-extension-manager.admin.sections.queue.statuses.${e.status()}`)),["pending","running"].includes(e.status())&&m(C(),{size:"small",display:"inline"}))},70),e.add("elapsedTime",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.elapsed_time")),content:e=>e.startedAt()&&e.finishedAt()?m(P(),{text:`${dayjs(e.startedAt()).format("LL LTS")} ${dayjs(e.finishedAt()).format("LL LTS")}`},m("span",null,J(e.startedAt(),e.finishedAt()))):s().translator.trans("flarum-extension-manager.admin.sections.queue.task_just_started")},65),e.add("memoryUsed",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.peak_memory_used")),content:e=>m("span",null,e.peakMemoryUsed())},60),e.add("details",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details")),content:e=>m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details"),onclick:()=>s().modal.show(H,{task:e}),disabled:["pending","running"].includes(e.status())}),className:"Table-controls"},55),e}queueTable(){const e=s().extensionManager.queue.getItems();if(!e)return m(C(),null);if(e&&!e.length)return m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("flarum-extension-manager.admin.sections.queue.none"));const t=this.columns();return m("[",null,m("div",{className:Y()("Table-container",{"loading-container":e&&s().extensionManager.queue.isLoading()})},m("table",{className:"Table ExtensionManager-queueTable"},m("thead",null,m("tr",null,t.toArray().map(((e,t)=>m("th",{key:t},e.label))))),m("tbody",null,e.map(((e,a)=>m("tr",{key:a},t.toArray().map(((t,a)=>{const{label:n,content:s,...r}=t;return m("td",Object.assign({key:a},r),s(e))}))))))),e&&s().extensionManager.queue.isLoading()&&m(C(),{size:"large"})),m(O(),{total:s().extensionManager.queue.getTotalItems(),currentPage:s().extensionManager.queue.pageNumber()+1,perPage:s().extensionManager.queue.getPerPage(),onChange:e=>s().extensionManager.queue.goto(e)}))}operationIcon(e){return m(j(),{name:{update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[e]})}}flarum.reg.add("flarum-extension-manager","admin/components/QueueSection",Z);const K=flarum.reg.get("core","common/utils/Stream");var X=a.n(K);class ee extends(U()){constructor(){super(...arguments),f(this,"packageName",void 0)}oninit(e){super.oninit(e),this.packageName=X()("")}view(){return m("div",{className:"Form-group ExtensionManager-installer"},m("label",{htmlFor:"install-extension"},s().translator.trans("flarum-extension-manager.admin.extensions.install")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.extensions.install_help",{link:m("a",{href:"https://flarum.org/extensions"},"flarum.org"),semantic_link:m("a",{href:"https://devhints.io/semver"}),code:m("code",null)})),m("div",{className:"FormControl-container"},m("input",{className:"FormControl",id:"install-extension",placeholder:"vendor/package-name",bidi:this.packageName}),m(l(),{className:"Button",icon:"fas fa-download",onclick:this.onsubmit.bind(this),loading:s().extensionManager.control.isLoading("extension-install"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.extensions.proceed"))))}data(){return{package:this.packageName()}}onsubmit(){s().extensionManager.control.requirePackage(this.data())}}flarum.reg.add("flarum-extension-manager","admin/components/Installer",ee);const te=flarum.reg.get("core","common/helpers/humanTime");var ae=a.n(te);const ne=flarum.reg.get("core","common/components/Alert");var se=a.n(ne);class re extends(V()){constructor(){super(...arguments),f(this,"loading",!0),f(this,"whyNot",null)}className(){return"Modal--large WhyNotModal"}title(){return s().translator.trans("flarum-extension-manager.admin.why_not_modal.title")}oncreate(e){super.oncreate(e),this.requestWhyNot()}content(){return m("div",{className:"Modal-body"},this.loading?m(C(),null):m("pre",{className:"WhyNotModal-contents"},this.whyNot))}requestWhyNot(){s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/why-not`,body:{data:{package:this.attrs.package}}}).then((e=>{this.loading=!1,this.whyNot=e.data.reason,m.redraw()})).catch(b)}}flarum.reg.add("flarum-extension-manager","admin/components/WhyNotModal",re);const ie=flarum.reg.get("core","common/components/Badge");var oe=a.n(ie);const le=flarum.reg.get("core","common/utils/formatAmount");var me=a.n(le);const ue=flarum.reg.get("core","common/Model");var de=a.n(ue);let ce=function(e){return e.Stable="stable",e.Alpha="alpha",e.Beta="beta",e.RC="rc",e.Dev="dev",e}({});function ge(e){return[ce.Stable,ce.RC].includes(pe(e))}function pe(e){const t=e.split("-");if(1===t.length)return ce.Stable;switch(t[1].split(".")[0].toLowerCase()){case"alpha":return ce.Alpha;case"beta":return ce.Beta;case"rc":return ce.RC;default:return ce.Dev}}flarum.reg.add("flarum-extension-manager","admin/utils/versions",{VersionStability:ce,isProductionReady:ge,stability:pe});class he extends(de()){constructor(){super(...arguments),f(this,"extensionId",de().attribute("extensionId")),f(this,"name",de().attribute("name")),f(this,"title",de().attribute("title")),f(this,"description",de().attribute("description")),f(this,"iconUrl",de().attribute("iconUrl")),f(this,"icon",de().attribute("icon")),f(this,"highestVersion",de().attribute("highestVersion")),f(this,"httpUri",de().attribute("httpUri")),f(this,"discussUri",de().attribute("discussUri")),f(this,"vendor",de().attribute("vendor")),f(this,"isPremium",de().attribute("isPremium")),f(this,"isLocale",de().attribute("isLocale")),f(this,"locale",de().attribute("locale")),f(this,"latestFlarumVersionSupported",de().attribute("latestFlarumVersionSupported")),f(this,"downloads",de().attribute("downloads")),f(this,"installed",!1)}isSupported(){const e=s().data.settings.version,t=this.latestFlarumVersionSupported();return e.split("-")[1]===t.split("-")[1]&&e.split(".")[0]===t.split(".")[0]}isProductionReady(){return ge(this.highestVersion())}toLocalExtension(){return{id:this.extensionId(),name:this.name(),version:this.highestVersion(),description:this.description(),icon:this.icon()||{name:"fas fa-box-open",backgroundColor:"#117187",color:"#fff"},links:{discuss:this.discussUri(),website:this.httpUri()},extra:{"flarum-extension":{title:this.title()}}}}}flarum.reg.add("flarum-extension-manager","admin/models/ExternalExtension",he);const fe=flarum.reg.get("core","common/components/Dropdown");var xe=a.n(fe);const be=flarum.reg.get("core","common/components/LinkButton");var ve=a.n(be);class ye extends(U()){getExtension(){return this.attrs.extension instanceof he?this.attrs.extension.toLocalExtension():this.attrs.extension}view(){const e=this.getExtension(),{isCore:t,isDanger:a}=this.attrs;return m("div",{className:Y()("ExtensionCard",{"ExtensionCard--core":t,"ExtensionCard--danger":a})},m("div",{className:"ExtensionCard-header"},this.icon(),m(P(),{text:e.name},m("h4",null,e.extra["flarum-extension"].title)),this.attrs.extension instanceof he&&m("div",{className:"ExtensionCard-badges"},this.badges().toArray()),m("div",{className:"ExtensionCard-actions"},this.actionItems().toArray())),m("div",{className:"ExtensionCard-body"},m("p",null,e.description)),m("div",{className:"ExtensionCard-footer"},m("div",{className:"ExtensionCard-meta"},this.metaItems().toArray())))}icon(){const e=this.getExtension();this.attrs.extension instanceof he&&e.id in s().data.extensions&&(e.icon=s().data.extensions[e.id].icon);const t=e.icon||{};return!e.icon?.name&&this.attrs.extension instanceof he&&!(e.id in s().data.extensions)&&this.attrs.extension.iconUrl()&&(t.backgroundImage=`url(${this.attrs.extension.iconUrl()})`),m("span",{className:"ExtensionIcon",style:e.icon},e.icon?.name?m(j(),{name:e.icon.name}):null)}badges(){const e=new(L()),t=this.attrs.extension;return t.isSupported()?e.add("compatible",m(oe(),{icon:"fas fa-check",type:"success",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.compatible"),className:"Badge--flat Badge--square"})):e.add("incompatible",m(oe(),{icon:"fas fa-times",type:"danger",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.incompatible"),className:"Badge--flat Badge--square"})),t.isPremium()&&e.add("premium",m(oe(),{icon:"fas fa-dollar-sign",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.premium"),className:"ExtensionCard-badge--premium Badge--flat Badge--square"})),t.isProductionReady()||e.add("unstable",m(oe(),{icon:"fas fa-flask",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.unstable"),className:"Badge--flat Badge--square Badge--danger"})),"fof"===t.name().split("/")[0]&&e.add("fof",m(oe(),{icon:"fas fa-users",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.fof"),className:"Badge--flat Badge--square"})),"flarum"===t.name().split("/")[0]&&e.add("flarum",m(oe(),{icon:"fab fa-flarum",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.flarum"),className:"ExtensionCard-badge--flarum Badge--flat Badge--square"})),e}metaItems(){const e=new(L()),{updates:t,isCore:a}=this.attrs,n=t?t["latest-minor"]??(t["latest-major"]&&!a?t["latest-major"]:null):null;return this.attrs.extension instanceof he?e.add("downloads",m("span",null,m(j(),{name:"fas fa-circle-down"}),s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.downloads",{count:this.attrs.extension.downloads(),formattedCount:me()(this.attrs.extension.downloads())}))):e.add("version",m("div",{className:"ExtensionCard-version"},m("span",{className:"ExtensionCard-version-current"},this.version(t.version)),n?m("[",null,m(j(),{name:"fas fa-arrow-right"}),m(W,{className:"ExtensionCard-version-latest",type:t["latest-minor"]?"success":"warning"},this.version(n))):null)),this.attrs.extension instanceof he&&(e.add("version",m("div",{className:"ExtensionCard-version"},"v",this.version(this.attrs.extension.highestVersion()))),e.add("link",m(ve(),{className:"Button Button--ua-reset Button--link Button--icon",href:this.attrs.extension.httpUri(),target:"_blank",icon:"fas fa-external-link-alt",external:!0}))),e}actionItems(){const e=new(L()),{updates:t,extension:a,onClickUpdate:n,whyNotWarning:r}=this.attrs;return a instanceof he?a.extensionId()in s().data.extensions?e.add("installed",m(l(),{className:"Button Button--icon Button--flat Button--success",icon:"fas fa-check-circle",disabled:!0})):e.add("install",m(l(),{className:"Button Button--icon Button--flat",icon:"fas fa-cloud-arrow-down",onclick:()=>{s().extensionManager.control.requirePackage({package:a.name()})}})):(n&&"function"==typeof n?e.add("update",m(P(),{text:s().translator.trans("flarum-extension-manager.admin.extensions.update")},m(l(),{icon:"fas fa-cloud-arrow-down",className:"Button Button--icon Button--flat",onclick:n,"aria-label":s().translator.trans("flarum-extension-manager.admin.extensions.update")}))):n&&e.add("update",m(xe(),{buttonClassName:"Button Button--icon Button--flat",icon:"fas fa-ellipsis",label:s().translator.trans("flarum-extension-manager.admin.extensions.update")},m(l(),{icon:"fas fa-cloud-arrow-down",onclick:n.soft},s().translator.trans("flarum-extension-manager.admin.extensions.update_soft_label")),m(l(),{icon:"fas fa-rotate",onclick:n.hard,disabled:!t["direct-dependency"]},s().translator.trans("flarum-extension-manager.admin.extensions.update_hard_label")))),r&&e.add("whyNot",m(P(),{text:s().translator.trans("flarum-extension-manager.admin.extensions.check_why_it_failed_updating")},m(l(),{icon:"fas fa-exclamation-circle",className:"Button Button--icon Button--flat Button--danger",onclick:()=>s().modal.show(re,{package:a.name}),"aria-label":s().translator.trans("flarum-extension-manager.admin.extensions.check_why_it_failed_updating")})))),e}version(e){return"v"===e.charAt(0)?e.substring(1):e}}flarum.reg.add("flarum-extension-manager","admin/components/ExtensionCard",ye);class _e extends(U()){constructor(){super(...arguments),f(this,"updateState",void 0)}oninit(e){super.oninit(e),this.updateState=this.attrs.updateState}view(){return m("div",{className:Y()("Form-group Form-group--danger ExtensionManager-majorUpdate",{"ExtensionManager-majorUpdate--failed":"failure"===this.updateState.status,"ExtensionManager-majorUpdate--incompatibleExtensions":this.updateState.incompatibleExtensions.length})},m("img",{alt:"flarum logo",src:s().forum.attribute("baseUrl")+"/assets/extensions/flarum-extension-manager/flarum.svg"}),m("label",null,s().translator.trans("flarum-extension-manager.admin.major_updater.title",{version:this.attrs.coreUpdate["latest-major"]})),m("p",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.major_updater.description")),m("div",{className:"ExtensionManager-updaterControls"},m(P(),{text:s().translator.trans("flarum-extension-manager.admin.major_updater.dry_run_help")},m(l(),{className:"Button",icon:"fas fa-vial",onclick:this.update.bind(this,!0),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.major_updater.dry_run"))),m(l(),{className:"Button Button--danger",icon:"fas fa-play",onclick:this.update.bind(this,!1),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.major_updater.update"))),this.updateState.incompatibleExtensions.length?m("div",{className:"ExtensionManager-majorUpdate-incompatibleExtensions ExtensionManager-extensions-grid"},this.updateState.incompatibleExtensions.map((e=>m(ye,{extension:s().data.extensions[e.replace("flarum-","").replace("flarum-ext-","").replace("/","-")],updates:{},onClickUpdate:null,isDanger:!0})))):null,"failure"===this.updateState.status?m(se(),{type:"error",className:"ExtensionManager-majorUpdate-failure",dismissible:!1,controls:[m(l(),{className:"Button Button--text ExtensionManager-majorUpdate-failure-details",icon:"fas fa-question-circle",onclick:()=>s().modal.show(re,{package:"flarum/core"})},s().translator.trans("flarum-extension-manager.admin.major_updater.failure.why"))]},m("p",{className:"ExtensionManager-majorUpdate-failure-desc"},s().translator.trans("flarum-extension-manager.admin.major_updater.failure.desc"))):null)}update(e){s().extensionManager.control.majorUpdate({dryRun:e})}}flarum.reg.add("flarum-extension-manager","admin/components/MajorUpdater",_e);const ke=flarum.reg.get("core","common/components/InfoTile");var Ne=a.n(ke);class Me extends(U()){view(){const e=s().extensionManager.control.coreUpdate;return[m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.updater.updater_title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.updater.updater_help")),this.lastUpdateCheckView(),m("div",{className:"ExtensionManager-updaterControls"},this.controlItems().toArray()),this.availableUpdatesView()),e&&e.package["latest-major"]&&ge(e.package["latest-major"])?m(_e,{coreUpdate:e.package,updateState:s().extensionManager.control.lastUpdateRun.major}):null]}lastUpdateCheckView(){return s().extensionManager.control.lastUpdateCheck?.checkedAt&&m("p",{className:"ExtensionManager-lastUpdatedAt"},m("span",{className:"ExtensionManager-lastUpdatedAt-label"},s().translator.trans("flarum-extension-manager.admin.updater.last_update_checked_at")),m("span",{className:"ExtensionManager-lastUpdatedAt-value"},ae()(s().extensionManager.control.lastUpdateCheck.checkedAt)))||null}availableUpdatesView(){const e=s().extensionManager.control;if(s().extensionManager.control.isLoading("check")||s().extensionManager.control.isLoading("global-update"))return m("div",{className:"ExtensionManager-extensions"},m(C(),null));const t=e.coreUpdate&&e.coreUpdate.package["latest-minor"];return e.extensionUpdates.length||t?m("div",{className:"ExtensionManager-extensions"},m("div",{className:"ExtensionManager-extensions-grid"},t?m(ye,{extension:e.coreUpdate.extension,updates:e.coreUpdate.package,isCore:!0,onClickUpdate:()=>e.updateCoreMinor(),whyNotWarning:e.lastUpdateRun.limitedPackages().includes("flarum/core")}):null,e.extensionUpdates.map((t=>m(ye,{extension:t,updates:e.packageUpdates[t.id],onClickUpdate:{soft:()=>e.updateExtension(t,"soft"),hard:()=>e.updateExtension(t,"hard")},whyNotWarning:e.lastUpdateRun.limitedPackages().includes(t.name)}))))):m("div",{className:"ExtensionManager-extensions ExtensionManager-extensions--empty"},m(Ne(),{icon:"fas fa-plug-circle-check"},s().translator.trans("flarum-extension-manager.admin.updater.up_to_date")))}controlItems(){const e=new(L());return e.add("updateCheck",m(l(),{className:"Button",icon:"fas fa-sync-alt",onclick:()=>s().extensionManager.control.checkForUpdates(),loading:s().extensionManager.control.isLoading("check"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.updater.check_for_updates")),100),e.add("globalUpdate",m(l(),{className:"Button",icon:"fas fa-play",onclick:()=>s().extensionManager.control.updateGlobally(),loading:s().extensionManager.control.isLoading("global-update"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.updater.run_global_update"))),e}}flarum.reg.add("flarum-extension-manager","admin/components/Updater",Me);const we=flarum.reg.get("core","common/components/Form");var Ee=a.n(we);class Se extends(U()){oninit(e){super.oninit(e)}view(){return m("div",{className:"ExtensionPage-settings ExtensionManager-controlSection"},m("div",{className:"container"},m(Ee(),null,m(ee,null),m(Me,null))))}}flarum.reg.add("flarum-extension-manager","admin/components/ControlSection",Se);const Be=flarum.reg.get("core","common/components/FormGroup");var Ue=a.n(Be);class $e extends(U()){constructor(){super(...arguments),f(this,"settings",{}),f(this,"initialSettings",null),f(this,"loading",!1),f(this,"type",void 0)}oninit(e){super.oninit(e),this.submit(!0)}className(){return""}view(){return m("div",{className:Y()("FormSection",this.className())},m("label",null,this.title()),this.content(),m("div",{className:"Form-group Form-controls"},this.submitButton()))}submitButton(){return[m(l(),{className:"Button Button--primary",loading:this.loading,onclick:()=>this.submit(!1),disabled:!this.isDirty()},s().translator.trans("core.admin.settings.submit_button"))]}customSettingComponents(){return Ue().prototype.customFieldComponents()}setting(e){return this.settings[e]??(this.settings[e]=X()())}submit(e){this.loading=!0;const t={};Object.keys(this.settings).forEach((e=>{t[e]=this.settings[e]()})),s().request({method:"POST",url:s().forum.attribute("apiUrl")+"/extension-manager/composer",body:{type:this.type,data:e?null:t}}).then((e=>{let{data:t}=e;Object.keys(t).forEach((e=>{this.settings[e]=X()(t[e])})),this.initialSettings=Array.isArray(t)?{}:t})).finally((()=>{this.loading=!1,m.redraw()}))}isDirty(){return JSON.stringify(this.initialSettings)!==JSON.stringify(this.settings)}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureJson",$e);const Ce=flarum.reg.get("core","common/components/Select");var qe=a.n(Ce);class Pe extends(V()){constructor(){super(...arguments),f(this,"name",void 0),f(this,"repository",void 0)}oninit(e){super.oninit(e),this.name=X()(this.attrs.name||""),this.repository=X()(this.attrs.repository||{type:"composer",url:""})}className(){return"RepositoryModal Modal--small"}title(){const e=this.attrs.repository?"edit":"add";return s().translator.trans(`flarum-extension-manager.admin.composer.${e}_repository_label`)}content(){const e={composer:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.composer"),vcs:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.vcs"),path:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.path")};return m("div",{className:"Modal-body"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.name_label")),m("input",{className:"FormControl",bidi:this.name})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.type_label")),m(qe(),{options:e,value:this.repository().type,onchange:e=>this.repository({...this.repository(),type:e})})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.url")),m("input",{className:"FormControl",onchange:e=>this.repository({...this.repository(),url:e.target.value}),value:this.repository().url})),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",onclick:this.submit.bind(this)},s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.submit_button")))))}submit(){this.attrs.onsubmit(this.repository(),this.name()),this.hide()}}flarum.reg.add("flarum-extension-manager","admin/components/RepositoryModal",Pe);class Te extends $e{constructor(){super(...arguments),f(this,"type","composer")}title(){return s().translator.trans("flarum-extension-manager.admin.composer.title")}className(){return"ConfigureComposer"}content(){return m("div",{className:"Form ExtensionManager-SettingsGroups-content"},this.attrs.buildSettingComponent.call(this,{setting:"minimum-stability",label:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.label"),help:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.help"),type:"select",options:{stable:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.stable"),RC:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.rc"),beta:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.beta"),alpha:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.alpha"),dev:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.dev")}}),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.label")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.composer.repositories.help")),m("div",{className:"ConfigureComposer-repositories"},Object.keys(this.setting("repositories")()||{}).map((e=>{const t=this.setting("repositories")()[e];return m("div",{className:"ButtonGroup ButtonGroup--full"},m(l(),{className:"Button",icon:{composer:"fas fa-cubes",vcs:"fas fa-code-branch",path:"fas fa-folder"}[t.type],onclick:()=>s().modal.show(Pe,{name:e,repository:t,onsubmit:(t,a)=>{const n=this.setting("repositories")();delete n[e],this.setting("repositories")(n),this.onchange(t,a)}})},e," (",t.type,")"),m(l(),{className:"Button Button--icon",icon:"fas fa-trash","aria-label":s().translator.trans("flarum-extension-manager.admin.composer.delete_repository_label"),onclick:()=>{if(confirm(y()(s().translator.trans("flarum-extension-manager.admin.composer.delete_repository_confirmation")))){const t={...this.setting("repositories")()};delete t[e],this.setting("repositories")(t)}}}))})))))}submitButton(){const e=super.submitButton();return e.push(m(l(),{className:"Button",onclick:()=>s().modal.show(Pe,{onsubmit:this.onchange.bind(this)})},s().translator.trans("flarum-extension-manager.admin.composer.add_repository_label"))),e}onchange(e,t){this.setting("repositories")({...this.setting("repositories")(),[t]:e})}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureComposer",Te);class je extends(V()){constructor(){super(...arguments),f(this,"type",void 0),f(this,"host",void 0),f(this,"token",void 0)}oninit(e){super.oninit(e),this.type=X()(this.attrs.type||"bearer"),this.host=X()(this.attrs.host||""),this.token=X()(this.attrs.token||"")}className(){return"AuthMethodModal Modal--small"}title(){const e=this.attrs.host?"edit":"add";return s().translator.trans(`flarum-extension-manager.admin.auth_config.${e}_label`)}content(){const e={"github-oauth":s().translator.trans("flarum-extension-manager.admin.auth_config.types.github-oauth"),"gitlab-oauth":s().translator.trans("flarum-extension-manager.admin.auth_config.types.gitlab-oauth"),"gitlab-token":s().translator.trans("flarum-extension-manager.admin.auth_config.types.gitlab-token"),bearer:s().translator.trans("flarum-extension-manager.admin.auth_config.types.bearer")};return m("div",{className:"Modal-body"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.type_label")),m(qe(),{options:e,value:this.type(),onchange:this.type})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.host_label")),m("input",{className:"FormControl",bidi:this.host,placeholder:s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.host_placeholder")})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.token_label")),m("textarea",{className:"FormControl",oninput:e=>this.token(e.target.value),rows:"6",placeholder:this.token().startsWith("unchanged:")?y()(s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.unchanged_token_placeholder")):""},this.token().startsWith("unchanged:")?"":this.token())),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",onclick:this.submit.bind(this)},s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.submit_button")))))}submit(){this.attrs.onsubmit(this.type(),this.host(),this.token()),this.hide()}}flarum.reg.add("flarum-extension-manager","admin/components/AuthMethodModal",je);class Fe extends $e{constructor(){super(...arguments),f(this,"type","auth")}title(){return s().translator.trans("flarum-extension-manager.admin.auth_config.title")}className(){return"ConfigureAuth"}content(){const e=Object.keys(this.settings),t=e.length&&e.every((e=>{const t=this.settings[e]();return Array.isArray(t)?t.length:Object.keys(t).length}));return m("div",{className:"ExtensionManager-SettingsGroups-content"},t?e.map((e=>{const t=this.settings[e]();return m("div",{className:"Form-group"},m("label",null,s().translator.trans(`flarum-extension-manager.admin.auth_config.types.${e}`)),m("div",{className:"ConfigureAuth-hosts"},Object.keys(t).map((a=>{const n=t[a];return m("div",{className:"ButtonGroup ButtonGroup--full"},m(l(),{className:"Button",icon:"fas fa-key",onclick:()=>s().modal.show(je,{type:e,host:a,token:n,onsubmit:this.onchange.bind(this,a)})},a),m(l(),{className:"Button Button--icon",icon:"fas fa-trash","aria-label":s().translator.trans("flarum-extension-manager.admin.auth_config.delete_label"),onclick:()=>{if(confirm(y()(s().translator.trans("flarum-extension-manager.admin.auth_config.delete_confirmation")))){const t={...this.setting(e)()};delete t[a],Object.keys(t).length?this.setting(e)(t):delete this.settings[e]}}}))}))))})):m("span",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.auth_config.no_auth_methods_configured")))}submitButton(){const e=super.submitButton();return e.push(m(l(),{className:"Button",loading:this.loading,onclick:()=>s().modal.show(je,{onsubmit:this.onchange.bind(this,null)})},s().translator.trans("flarum-extension-manager.admin.auth_config.add_label"))),e}onchange(e,t,a,n){const s={...this.setting(t)()};e&&delete s[e],s[a]=n,this.setting(t)(s)}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureAuth",Fe);const Le=flarum.reg.get("core","common/components/Input");var Ie=a.n(Le);const Ae=flarum.reg.get("core","common/helpers/listItems");var De=a.n(Ae);const Oe=flarum.reg.get("core","common/utils/throttleDebounce");class Re extends(U()){constructor(){super(...arguments),f(this,"search",X()("")),f(this,"warningsDismissed",X()(!1)),f(this,"applySearch",(0,Oe.throttle)(1200,(e=>{const t=s().extensionManager.extensions.getParams();s().extensionManager.extensions.refreshParams({...t,filter:{...t.filter,q:e}},1)})))}oninit(e){super.oninit(e),s().extensionManager.extensions.goto(1),this.warningsDismissed("true"===localStorage.getItem("flarum-extension-manager.warningsDismissed"))}load(e){void 0===e&&(e=1),s().extensionManager.extensions.goto(e)}view(){return m("div",{className:"ExtensionPage-settings ExtensionManager-DiscoverSection"},m("div",{className:"container"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.discover.title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.sections.discover.description"),this.warningsDismissed()&&m(l(),{className:"Button Button--text Button--warning Button--more",icon:"fas fa-exclamation-triangle",onclick:()=>this.setWarningDismissed(!1)}))),!this.warningsDismissed()&&m("div",{className:"ExtensionManager-warnings Form-group"},m(se(),{className:"ExtensionManager-primaryWarning",type:"warning",dismissible:!0,ondismiss:()=>this.setWarningDismissed(!0)},m("ul",null,De()(this.warningItems().toArray())))),m("div",{className:"Tabs"},m("div",{className:"Tabs-nav"},this.tabItems().toArray()),m("div",{className:"Tabs-content"},m("hr",{className:"Tabs-divider"}),m("div",{className:"ExtensionManager-DiscoverSection-toolbar"},m("div",{className:"ExtensionManager-DiscoverSection-toolbar-primary"},this.toolbarPrimaryItems().toArray()),m("div",{className:"ExtensionManager-DiscoverSection-toolbar-secondary"},this.toolbarSecondaryItems().toArray())),this.extensionList(),m("div",{className:"ExtensionManager-DiscoverSection-footer"},this.footerItems().toArray()))))))}tabFilters(){return{"":{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.discover"),active:()=>!s().extensionManager.extensions.getParams().filter?.type},extension:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.extensions"),active:()=>"extension"===s().extensionManager.extensions.getParams().filter?.type},locale:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.languages"),active:()=>"locale"===s().extensionManager.extensions.getParams().filter?.type},theme:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.themes"),active:()=>"theme"===s().extensionManager.extensions.getParams().filter?.type}}}tabItems(){const e=new(L()),t=this.tabFilters();return Object.keys(t).forEach((a=>{const n=t[a];e.add(a,m(l(),{className:"Button Button--link",active:n.active(),onclick:()=>{s().extensionManager.extensions.changeFilter("type",a)}},n.label))})),e}warningItems(){const e=new(L());return e.add("accessWarning",s().translator.trans("flarum-extension-manager.admin.settings.access_warning")),s().data.debugEnabled&&e.add("devModeWarning",s().translator.trans("flarum-extension-manager.admin.settings.debug_mode_warning")),e}toolbarPrimaryItems(){const e=new(L());return e.add("search",m(Ie(),{value:this.search(),onchange:e=>{this.search(e),this.applySearch(e)},inputAttrs:{className:"FormControl-alt"},clearable:!0,placeholder:s().translator.trans("flarum-extension-manager.admin.sections.discover.search"),prefixIcon:"fas fa-search"})),e}toolbarSecondaryItems(){const e=new(L()),t=s().extensionManager.extensions.sortMap(),a=Object.keys(t).reduce(((e,a)=>{const n=t[a];return e[a]="string"!=typeof n?n.label:n,e}),{});e.add("sort",m(xe(),{buttonClassName:"Button",label:a[s().extensionManager.extensions.getParams().sort]||Object.keys(t).map((e=>a[e]))[0],accessibleToggleLabel:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.toggle_dropdown_accessible_label")},Object.keys(a).map((e=>{const t=a[e],n=s().extensionManager.extensions.getParams().sort===e;return m(l(),{icon:!n||"fas fa-check",onclick:()=>s().extensionManager.extensions.changeSort(e),active:n},t)}))));const n=(s().extensionManager.extensions.getParams().filter?.is?.[0]??null)||"all";return e.add("party",m(xe(),{buttonClassName:"Button",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter."+n),accessibleToggleLabel:s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter.toggle_dropdown_accessible_label")},["all","premium"].map((e=>m(l(),{icon:n!==e||"fas fa-check",onclick:()=>{s().extensionManager.extensions.changeFilter("is","all"===e?void 0:[e])},active:n===e},s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter."+e)))))),e}extensionList(){return!s().extensionManager.extensions.hasItems()&&s().extensionManager.extensions.isLoading()?m(C(),{display:"block"}):s().extensionManager.extensions.hasItems()?m("div",{className:Y()("ExtensionManager-DiscoverSection-list",{"loading-container":s().extensionManager.extensions.isLoading()})},m("div",{className:"ExtensionManager-DiscoverSection-list-inner"},s().extensionManager.extensions.getPages().map((e=>e.items.map((e=>m(ye,{extension:e,key:e.name()})))))),s().extensionManager.extensions.hasItems()&&s().extensionManager.extensions.isLoading()&&m(C(),{size:"large"})):m("div",{className:"ExtensionManager-DiscoverSection-list ExtensionManager-DiscoverSection-list--empty"},m(Ne(),{icon:"fas fa-plug-circle-exclamation"},s().translator.trans("flarum-extension-manager.admin.sections.discover.empty_results")))}footerItems(){const e=new(L());return e.add("pagination",m(O(),{total:s().extensionManager.extensions.totalItems,perPage:s().extensionManager.extensions.pageSize,currentPage:s().extensionManager.extensions.getLocation().page,onChange:e=>{s().extensionManager.extensions.getLocation().page!==e&&this.load(e)}})),e.add("premiumTermsLink",m(ve(),{className:"Button Button--link",href:"https://flarum.org/terms/premium-extensions",external:!0,target:"_blank",icon:"fas fa-circle-info"},s().translator.trans("flarum-extension-manager.admin.sections.discover.premium_extension_terms"))),e}setWarningDismissed(e){this.warningsDismissed(e),localStorage.setItem("flarum-extension-manager.warningsDismissed",e?"true":"false")}}flarum.reg.add("flarum-extension-manager","admin/components/DiscoverSection",Re);class Ye extends(i()){content(){const e=s().registry.getSettings(this.extension.id);return m("div",{className:"ExtensionPage-settings"},m("div",{className:"container"},e?[m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.settings.title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.sections.settings.description"))),m("div",{className:"FormSectionGroup ExtensionManager-SettingsGroups"},m("div",{className:"FormSection"},m("label",null,s().translator.trans("flarum-extension-manager.admin.settings.title")),m("div",{className:"Form"},e.map(this.buildSettingComponent.bind(this))),m("div",{className:"Form-group Form--controls"},this.submitButton())),m(Te,{buildSettingComponent:this.buildSettingComponent}),m(Fe,{buildSettingComponent:this.buildSettingComponent}))]:m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("core.admin.extension.no_settings"))))}sections(e){const t=super.sections(e),a=s().data["flarum-extension-manager.writable_dirs"],n=s().data["flarum-extension-manager.missing_functions"];return!a||n&&0!==n.length?t.add("warning",m("div",{className:"ExtensionPage-settings"},m("div",{className:"container"},m("div",{className:"Form-group"},m(se(),{type:"error",dismissible:!1},s().data["flarum-extension-manager.writable_dirs"]?s().translator.trans("flarum-extension-manager.admin.required_php_functions",{functions:s().data["flarum-extension-manager.missing_functions"].join(", ")}):s().translator.trans("flarum-extension-manager.admin.file_permissions"))))),10):(t.add("discover",m(Re,null),15),t.add("control",m(Se,null),10)),t.setPriority("content",8),"0"!==s().data.settings["flarum-extension-manager.queue_jobs"]&&s().data.settings["flarum-extension-manager.queue_jobs"]&&t.add("queue",m(Z,null),5),t.remove("permissions"),t}onsaved(){super.onsaved(),m.redraw()}}flarum.reg.add("flarum-extension-manager","admin/components/SettingsPage",Ye);const We=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Ge=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Ve=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],He=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ze=(e,t,a)=>{let n=e;return"string"==typeof t||Array.isArray(t)?n=e.toLocaleString(t,a):!0!==t&&void 0===a||(n=e.toLocaleString(void 0,a)),n};class Qe extends(de()){status(){return de().attribute("status").call(this)}operation(){return de().attribute("operation").call(this)}command(){return de().attribute("command").call(this)}package(){return de().attribute("package").call(this)}output(){return de().attribute("output").call(this)}guessedCause(){return de().attribute("guessedCause").call(this)}createdAt(){return de().attribute("createdAt",de().transformDate).call(this)}startedAt(){return de().attribute("startedAt",de().transformDate).call(this)}finishedAt(){return de().attribute("finishedAt",de().transformDate).call(this)}peakMemoryUsed(){return function(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const a=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?He:Ve:t.binary?Ge:We,n=t.space?" ":"";if(t.signed&&0===e)return` 0${n}${a[0]}`;const s=e<0,r=s?"-":t.signed?"+":"";let i;if(s&&(e=-e),void 0!==t.minimumFractionDigits&&(i={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1)return r+ze(e,t.locale,i)+n+a[0];const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),a.length-1);return e/=(t.binary?1024:1e3)**o,i||(e=e.toPrecision(3)),r+ze(Number(e),t.locale,i)+n+a[o]}(1024*de().attribute("peakMemoryUsed").call(this))}}flarum.reg.add("flarum-extension-manager","admin/models/Task",Qe);const Je=[(new(S().Store)).add("extension-manager-tasks",Qe).add("external-extensions",he),(new(S().Admin)).setting((()=>({setting:"flarum-extension-manager.queue_jobs",label:s().translator.trans("flarum-extension-manager.admin.settings.queue_jobs"),help:s().translator.trans("flarum-extension-manager.admin.settings.queue_jobs_help",{basic_impl_link:m("a",{href:"https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting"}),adv_impl_link:m("a",{href:"https://discuss.flarum.org/d/21873-redis-sessions-cache-queues"}),php_version:m("strong",null,s().data.phpVersion),folder_perms_link:m("a",{href:"https://docs.flarum.org/install#folder-ownership"})}),type:"boolean",disabled:s().data["flarum-extension-manager.using_sync_queue"]}))).setting((()=>({setting:"flarum-extension-manager.task_retention_days",label:s().translator.trans("flarum-extension-manager.admin.settings.task_retention_days"),help:s().translator.trans("flarum-extension-manager.admin.settings.task_retention_days_help"),type:"number"}))).page(Ye).generalIndexItems("settings",(()=>[{id:"minimum-stability",label:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.label",{},!0),help:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.help",{},!0)},{id:"repositories",label:s().translator.trans("flarum-extension-manager.admin.composer.repositories.label",{},!0),help:s().translator.trans("flarum-extension-manager.admin.composer.repositories.help",{},!0)},{id:"composer-auth",label:s().translator.trans("flarum-extension-manager.admin.auth_config.title",{},!0)},{id:"updates",label:s().translator.trans("flarum-extension-manager.admin.updater.updater_title",{},!0),help:s().translator.trans("flarum-extension-manager.admin.updater.updater_help",{},!0)}]))];s().initializers.add("flarum-extension-manager",(t=>{t.extensionManager=new w,t.data["flarum-extension-manager.using_sync_queue"]&&(t.data.settings["flarum-extension-manager.queue_jobs"]="0"),(0,e.extend)(i().prototype,"topItems",(function(e){"flarum-extension-manager"===this.extension.id||g()(this.extension.id)||e.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:()=>{t.modal.show(d()),t.request({url:`${t.forum.attribute("apiUrl")}/extension-manager/extensions/${this.extension.id}`,method:"DELETE"}).then((e=>{e?.processing?p():(t.alerts.show({type:"success"},t.translator.trans("flarum-extension-manager.admin.extensions.successful_remove")),window.location=t.forum.attribute("adminUrl"))})).finally((()=>{t.modal.close()}))}},t.translator.trans("flarum-extension-manager.admin.extensions.remove")))}))}))})(),module.exports=n})(); +(()=>{var e={151:function(e){e.exports=function(){"use strict";var e,t,a=1e3,n=6e4,s=36e5,r=864e5,i=/\[([^\]]+)]|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,o=31536e6,l=2628e6,m=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:o,months:l,days:r,hours:s,minutes:n,seconds:a,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof b},c=function(e,t,a){return new b(e,a,t.$l)},g=function(e){return t.p(e)+"s"},p=function(e){return e<0},h=function(e){return p(e)?Math.ceil(e):Math.floor(e)},f=function(e){return Math.abs(e)},x=function(e,t){return e?p(e)?{negative:!0,format:""+f(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){function p(e,t,a){var n=this;if(this.$d={},this.$l=a,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return c(e*u[g(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[g(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var s=e.match(m);if(s){var r=s.slice(2).map((function(e){return null!=e?Number(e):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 f=p.prototype;return f.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,a){return t+(e.$d[a]||0)*u[a]}),0)},f.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/l),e%=l,this.$d.days=h(e/r),e%=r,this.$d.hours=h(e/s),e%=s,this.$d.minutes=h(e/n),e%=n,this.$d.seconds=h(e/a),e%=a,this.$d.milliseconds=e},f.toISOString=function(){var e=x(this.$d.years,"Y"),t=x(this.$d.months,"M"),a=+this.$d.days||0;this.$d.weeks&&(a+=7*this.$d.weeks);var n=x(a,"D"),s=x(this.$d.hours,"H"),r=x(this.$d.minutes,"M"),i=this.$d.seconds||0;this.$d.milliseconds&&(i+=this.$d.milliseconds/1e3,i=Math.round(1e3*i)/1e3);var o=x(i,"S"),l=e.negative||t.negative||n.negative||s.negative||r.negative||o.negative,m=s.format||r.format||o.format?"T":"",u=(l?"-":"")+"P"+e.format+t.format+n.format+m+s.format+r.format+o.format;return"P"===u||"-P"===u?"P0D":u},f.toJSON=function(){return this.toISOString()},f.format=function(e){var a=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return a.replace(i,(function(e,t){return t||String(n[e])}))},f.as=function(e){return this.$ms/u[g(e)]},f.get=function(e){var t=this.$ms,a=g(e);return"milliseconds"===a?t%=1e3:t="weeks"===a?h(t/u[a]):this.$d[a],t||0},f.add=function(e,t,a){var n;return n=t?e*u[g(t)]:d(e)?e.$ms:c(e,this).$ms,c(this.$ms+n*(a?-1:1),this)},f.subtract=function(e,t){return this.add(e,t,!0)},f.locale=function(e){var t=this.clone();return t.$l=e,t},f.clone=function(){return c(this.$ms,this)},f.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},f.valueOf=function(){return this.asMilliseconds()},f.milliseconds=function(){return this.get("milliseconds")},f.asMilliseconds=function(){return this.as("milliseconds")},f.seconds=function(){return this.get("seconds")},f.asSeconds=function(){return this.as("seconds")},f.minutes=function(){return this.get("minutes")},f.asMinutes=function(){return this.as("minutes")},f.hours=function(){return this.get("hours")},f.asHours=function(){return this.as("hours")},f.days=function(){return this.get("days")},f.asDays=function(){return this.as("days")},f.weeks=function(){return this.get("weeks")},f.asWeeks=function(){return this.as("weeks")},f.months=function(){return this.get("months")},f.asMonths=function(){return this.as("months")},f.years=function(){return this.get("years")},f.asYears=function(){return this.as("years")},p}(),v=function(e,t,a){return e.add(t.years()*a,"y").add(t.months()*a,"M").add(t.days()*a,"d").add(t.hours()*a,"h").add(t.minutes()*a,"m").add(t.seconds()*a,"s").add(t.milliseconds()*a,"ms")};return function(a,n,s){e=s,t=s().$utils(),s.duration=function(e,t){var a=s.locale();return c(e,{$l:a},t)},s.isDuration=d;var r=n.prototype.add,i=n.prototype.subtract;n.prototype.add=function(e,t){return d(e)?v(this,e,1):r.bind(this)(e,t)},n.prototype.subtract=function(e,t){return d(e)?v(this,e,-1):i.bind(this)(e,t)}}}()}},t={};function a(n){flarum.reg._webpack_runtimes["flarum-extension-manager"]||=a;var s=t[n];if(void 0!==s)return s.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";a.r(n),a.d(n,{extend:()=>Je});const e=flarum.reg.get("core","common/extend"),t=flarum.reg.get("core","admin/app");var s=a.n(t);const r=flarum.reg.get("core","admin/components/ExtensionPage");var i=a.n(r);const o=flarum.reg.get("core","common/components/Button");var l=a.n(o);const u=flarum.reg.get("core","admin/components/LoadingModal");var d=a.n(u);const c=flarum.reg.get("core","admin/utils/isExtensionEnabled");var g=a.n(c);function p(){s().modal.close(),m.route.set(s().route("extension",{id:"flarum-extension-manager"})),s().extensionManager.queue.load({},!0),setTimeout((()=>{document.getElementById("ExtensionManager-queueSection")?.scrollIntoView({block:"nearest"})}),200)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t,a){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=h(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}window.jumpToQueue=p,flarum.reg.add("flarum-extension-manager","admin/utils/jumpToQueue",p);class x{constructor(){f(this,"polling",null),f(this,"tasks",null),f(this,"limit",20),f(this,"offset",0),f(this,"total",0),f(this,"loading",!1)}load(e,t){return void 0===t&&(t=!1),this.loading=!0,e={page:{limit:this.limit,offset:this.offset,...e?.page},...e},s().store.find("extension-manager-tasks",e||{}).then((e=>{this.tasks=e,this.total=e.payload.meta?.page?.total||0,m.redraw();const a=e?.find((e=>"pending"===e.status()||"running"===e.status()));return a?this.pollQueue(t):t?(s().extensionManager.control.setLoading(null),window.location.reload()):s().extensionManager.control.isLoading()&&s().extensionManager.control.setLoading(null),this.loading=!1,e}))}isLoading(){return this.loading}getItems(){return this.tasks}getTotalItems(){return this.total}getTotalPages(){return Math.ceil(this.total/this.limit)}pageNumber(){return Math.ceil(this.offset/this.limit)}getPerPage(){return this.limit}hasPrev(){return 0!==this.pageNumber()}hasNext(){return this.offset+this.limit{this.load({},e)}),6e3)}hasPending(){return!!this.tasks?.find((e=>"pending"===e.status()||"running"===e.status()))}}function b(e){s().extensionManager.control.setLoading(null);const t=e.response.errors[0];if(!["composer_command_failure","extension_already_installed","extension_not_installed"].includes(t.code))throw e;switch(s().alerts.clear(),t.code){case"composer_command_failure":t.guessed_cause?(s().alerts.show({type:"error"},s().translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${t.guessed_cause}`)),s().modal.close()):s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.composer_command_failure"));break;case"extension_already_installed":s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.extension_already_installed")),s().modal.close();break;case"extension_not_installed":s().alerts.show({type:"error"},s().translator.trans("flarum-extension-manager.admin.exceptions.extension_not_installed")),s().modal.close()}}flarum.reg.add("flarum-extension-manager","admin/states/QueueState",x);const v=flarum.reg.get("core","common/utils/extractText");var y=a.n(v);class _{get lastUpdateRun(){const e=JSON.parse(s().data.settings["flarum-extension-manager.last_update_run"]);return e.limitedPackages=()=>[...e.major.limitedPackages,...e.minor.limitedPackages,...e.global.limitedPackages],e}constructor(){f(this,"loading",null),f(this,"packageUpdates",{}),f(this,"lastUpdateCheck",void 0),f(this,"extensionUpdates",void 0),f(this,"coreUpdate",null),this.lastUpdateCheck=JSON.parse(s().data.settings["flarum-extension-manager.last_update_check"]),this.extensionUpdates=this.formatExtensionUpdates(this.lastUpdateCheck),this.coreUpdate=this.formatCoreUpdate(this.lastUpdateCheck)}isLoading(e){return void 0===e&&(e=null),e&&this.loading===e||!e&&null!==this.loading}hasOperationRunning(){return this.isLoading()||s().extensionManager.queue.hasPending()}setLoading(e){this.loading=e}requirePackage(e){s().extensionManager.control.setLoading("extension-install"),s().modal.show(d()),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/extensions`,body:{data:e}}).then((e=>{if(e.processing)p();else{const t=e.id;s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.extensions.successful_install",{extension:t})),window.location.href=`${s().forum.attribute("adminUrl")}#/extension/${t}`,window.location.reload()}})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}checkForUpdates(){this.setLoading("check"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/check-for-updates`}).then((e=>{e.processing?p():(this.lastUpdateCheck=e,this.extensionUpdates=this.formatExtensionUpdates(e),this.coreUpdate=this.formatCoreUpdate(e),this.setLoading(null),m.redraw())})).catch(b).finally((()=>{m.redraw()}))}updateCoreMinor(){confirm(y()(s().translator.trans("flarum-extension-manager.admin.minor_update_confirmation.content")))&&(s().modal.show(d()),this.setLoading("minor-update"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/minor-update`}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.update_successful")),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()})))}updateExtension(e,t){s().modal.show(d()),this.setLoading("extension-update"),s().request({method:"PATCH",url:`${s().forum.attribute("apiUrl")}/extension-manager/extensions/${e.id}`,body:{data:{updateMode:t}}}).then((t=>{t?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.extensions.successful_update",{extension:e.extra["flarum-extension"].title})),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}updateGlobally(){s().modal.show(d()),this.setLoading("global-update"),s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/global-update`}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.updater.global_update_successful")),window.location.reload())})).catch(b).finally((()=>{s().modal.close(),m.redraw()}))}formatExtensionUpdates(e){return this.packageUpdates={},e?.updates?.installed?.filter((e=>{const t=e.name.replace("/","-").replace(/(flarum-ext-)|(flarum-)/,""),a=s().data.extensions[t],n=["semver-safe-update","update-possible"].includes(e["latest-status"]);return a&&n&&(this.packageUpdates[a.id]=e),a&&n})),Object.values(s().data.extensions).filter((e=>this.packageUpdates[e.id]))}formatCoreUpdate(e){const t=e?.updates?.installed?.filter((e=>"flarum/core"===e.name)).pop();return t?{package:t,extension:{id:"flarum-core",name:"flarum/core",version:s().data.settings.version,icon:{name:"",backgroundImage:`url(${s().data.resources[0].attributes.baseUrl}/assets/extensions/flarum-extension-manager/flarum.svg`},extra:{"flarum-extension":{title:y()(s().translator.trans("flarum-extension-manager.admin.updater.flarum"))}},links:{}}}:null}majorUpdate(e){let{dryRun:t}=e;s().extensionManager.control.setLoading(t?"major-update-dry-run":"major-update"),s().modal.show(d());const a=this.lastUpdateRun.major;s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/major-update`,body:{data:{dryRun:t}}}).then((e=>{e?.processing?p():(s().alerts.show({type:"success"},s().translator.trans("flarum-extension-manager.admin.update_successful")),window.location.reload())})).catch(b).catch((e=>{s().modal.close(),a.status="failure",a.incompatibleExtensions=e.response?.errors?.pop()?.incompatible_extensions})).finally((()=>{m.redraw()}))}}flarum.reg.add("flarum-extension-manager","admin/states/ControlSectionState",_);const k=flarum.reg.get("core","common/states/PaginatedListState");var N=a.n(k);class M extends(N()){get type(){return"external-extensions"}constructor(){super({sort:"-downloads"},1,12)}sortMap(){return{"-createdAt":{sort:"-createdAt",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.latest",{},!0)},"-downloads":{sort:"-downloads",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.top",{},!0)}}}}flarum.reg.add("flarum-extension-manager","admin/states/ExtensionListState",M);class w{constructor(){f(this,"queue",new x),f(this,"control",new _),f(this,"extensions",new M)}}flarum.reg.add("flarum-extension-manager","admin/states/ExtensionManagerState",w);const E=flarum.reg.get("core","common/extenders");var S=a.n(E);const B=flarum.reg.get("core","common/Component");var U=a.n(B);const $=flarum.reg.get("core","common/components/LoadingIndicator");var C=a.n($);const q=flarum.reg.get("core","common/components/Tooltip");var P=a.n(q);const T=flarum.reg.get("core","common/components/Icon");var j=a.n(T);const F=flarum.reg.get("core","common/utils/ItemList");var L=a.n(F);const I=flarum.reg.get("core","common/components/Link");var A=a.n(I);const D=flarum.reg.get("core","common/components/Pagination");var O=a.n(D);const R=flarum.reg.get("core","common/utils/classList");var Y=a.n(R);class W extends(U()){view(e){const{className:t,type:a,...n}=this.attrs;return m("span",Object.assign({className:Y()(["Label",`Label--${this.attrs.type}`,t])},n),e.children)}}flarum.reg.add("flarum-extension-manager","admin/components/Label",W);const G=flarum.reg.get("core","common/components/Modal");var V=a.n(G);class H extends(V()){className(){return"Modal--large QuickModal"}title(){return s().translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`)}content(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},"failure"===this.attrs.task.status()&&m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&s().translator.trans("flarum-extension-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))}}flarum.reg.add("flarum-extension-manager","admin/components/TaskOutputModal",H);var z=a(151),Q=a.n(z);function J(e,t){dayjs.extend(Q());const a=dayjs(t).diff(e);return dayjs.duration(a).humanize()}flarum.reg.add("flarum-extension-manager","admin/utils/humanDuration",J);class Z extends(U()){oninit(e){super.oninit(e),s().extensionManager.queue.load()}view(){return m("section",{id:"ExtensionManager-queueSection",className:"ExtensionPage-settings ExtensionManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header ExtensionManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},s().translator.trans("flarum-extension-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:()=>s().extensionManager.queue.load(),"aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.refresh"),disabled:s().extensionManager.control.isLoading()}))),m("div",{className:"container"},this.queueTable()))}columns(){const e=new(L());return e.add("operation",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.operation")),content:e=>m("div",{className:"ExtensionManager-queueTable-operation"},m("span",{className:"ExtensionManager-queueTable-operation-icon"},this.operationIcon(e.operation())),m("span",{className:"ExtensionManager-queueTable-operation-name"},s().translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${e.operation()}`)))},80),e.add("package",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.package")),content:e=>{const t=s().data.extensions[e.package()?.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return t?m(A(),{className:"ExtensionManager-queueTable-package",href:s().route("extension",{id:t.id})},m("div",{className:"ExtensionManager-queueTable-package-icon ExtensionIcon",style:t.icon},!!t.icon&&m(j(),{name:t.icon.name})),m("div",{className:"ExtensionManager-queueTable-package-details"},m("span",{className:"ExtensionManager-queueTable-package-title"},t.extra["flarum-extension"].title),m("span",{className:"ExtensionManager-queueTable-package-name"},e.package()))):e.package()}},75),e.add("status",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.status")),content:e=>m("[",null,m(W,{className:"ExtensionManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[e.status()]},s().translator.trans(`flarum-extension-manager.admin.sections.queue.statuses.${e.status()}`)),["pending","running"].includes(e.status())&&m(C(),{size:"small",display:"inline"}))},70),e.add("elapsedTime",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.elapsed_time")),content:e=>e.startedAt()&&e.finishedAt()?m(P(),{text:`${dayjs(e.startedAt()).format("LL LTS")} ${dayjs(e.finishedAt()).format("LL LTS")}`},m("span",null,J(e.startedAt(),e.finishedAt()))):s().translator.trans("flarum-extension-manager.admin.sections.queue.task_just_started")},65),e.add("memoryUsed",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.peak_memory_used")),content:e=>m("span",null,e.peakMemoryUsed())},60),e.add("details",{label:y()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details")),content:e=>m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details"),onclick:()=>s().modal.show(H,{task:e}),disabled:["pending","running"].includes(e.status())}),className:"Table-controls"},55),e}queueTable(){const e=s().extensionManager.queue.getItems();if(!e)return m(C(),null);if(e&&!e.length)return m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("flarum-extension-manager.admin.sections.queue.none"));const t=this.columns();return m("[",null,m("div",{className:Y()("Table-container",{"loading-container":e&&s().extensionManager.queue.isLoading()})},m("table",{className:"Table ExtensionManager-queueTable"},m("thead",null,m("tr",null,t.toArray().map(((e,t)=>m("th",{key:t},e.label))))),m("tbody",null,e.map(((e,a)=>m("tr",{key:a},t.toArray().map(((t,a)=>{const{label:n,content:s,...r}=t;return m("td",Object.assign({key:a},r),s(e))}))))))),e&&s().extensionManager.queue.isLoading()&&m(C(),{size:"large"})),m(O(),{total:s().extensionManager.queue.getTotalItems(),currentPage:s().extensionManager.queue.pageNumber()+1,perPage:s().extensionManager.queue.getPerPage(),onChange:e=>s().extensionManager.queue.goto(e)}))}operationIcon(e){return m(j(),{name:{update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[e]})}}flarum.reg.add("flarum-extension-manager","admin/components/QueueSection",Z);const K=flarum.reg.get("core","common/utils/Stream");var X=a.n(K);class ee extends(U()){constructor(){super(...arguments),f(this,"packageName",void 0)}oninit(e){super.oninit(e),this.packageName=X()("")}view(){return m("div",{className:"Form-group ExtensionManager-installer"},m("label",{htmlFor:"install-extension"},s().translator.trans("flarum-extension-manager.admin.extensions.install")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.extensions.install_help",{link:m("a",{href:"https://flarum.org/extensions"},"flarum.org"),semantic_link:m("a",{href:"https://devhints.io/semver"}),code:m("code",null)})),m("div",{className:"FormControl-container"},m("input",{className:"FormControl",id:"install-extension",placeholder:"vendor/package-name",bidi:this.packageName}),m(l(),{className:"Button",icon:"fas fa-download",onclick:this.onsubmit.bind(this),loading:s().extensionManager.control.isLoading("extension-install"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.extensions.proceed"))))}data(){return{package:this.packageName()}}onsubmit(){s().extensionManager.control.requirePackage(this.data())}}flarum.reg.add("flarum-extension-manager","admin/components/Installer",ee);const te=flarum.reg.get("core","common/helpers/humanTime");var ae=a.n(te);const ne=flarum.reg.get("core","common/components/Alert");var se=a.n(ne);class re extends(V()){constructor(){super(...arguments),f(this,"loading",!0),f(this,"whyNot",null)}className(){return"Modal--large WhyNotModal"}title(){return s().translator.trans("flarum-extension-manager.admin.why_not_modal.title")}oncreate(e){super.oncreate(e),this.requestWhyNot()}content(){return m("div",{className:"Modal-body"},this.loading?m(C(),null):m("pre",{className:"WhyNotModal-contents"},this.whyNot))}requestWhyNot(){s().request({method:"POST",url:`${s().forum.attribute("apiUrl")}/extension-manager/why-not`,body:{data:{package:this.attrs.package}}}).then((e=>{this.loading=!1,this.whyNot=e.data.reason,m.redraw()})).catch(b)}}flarum.reg.add("flarum-extension-manager","admin/components/WhyNotModal",re);const ie=flarum.reg.get("core","common/components/Badge");var oe=a.n(ie);const le=flarum.reg.get("core","common/utils/formatAmount");var me=a.n(le);const ue=flarum.reg.get("core","common/Model");var de=a.n(ue);let ce=function(e){return e.Stable="stable",e.Alpha="alpha",e.Beta="beta",e.RC="rc",e.Dev="dev",e}({});function ge(e){return[ce.Stable].includes(pe(e))}function pe(e){const t=e.split("-");if(1===t.length)return ce.Stable;switch(t[1].split(".")[0].toLowerCase()){case"alpha":return ce.Alpha;case"beta":return ce.Beta;case"rc":return ce.RC;default:return ce.Dev}}flarum.reg.add("flarum-extension-manager","admin/utils/versions",{VersionStability:ce,isProductionReady:ge,stability:pe});class he extends(de()){constructor(){super(...arguments),f(this,"extensionId",de().attribute("extensionId")),f(this,"name",de().attribute("name")),f(this,"title",de().attribute("title")),f(this,"description",de().attribute("description")),f(this,"iconUrl",de().attribute("iconUrl")),f(this,"icon",de().attribute("icon")),f(this,"highestVersion",de().attribute("highestVersion")),f(this,"httpUri",de().attribute("httpUri")),f(this,"discussUri",de().attribute("discussUri")),f(this,"vendor",de().attribute("vendor")),f(this,"isPremium",de().attribute("isPremium")),f(this,"isLocale",de().attribute("isLocale")),f(this,"locale",de().attribute("locale")),f(this,"latestFlarumVersionSupported",de().attribute("latestFlarumVersionSupported")),f(this,"downloads",de().attribute("downloads")),f(this,"installed",!1)}isSupported(){const e=s().data.settings.version,t=this.latestFlarumVersionSupported();return e.split("-")[1]===t.split("-")[1]&&e.split(".")[0]===t.split(".")[0]}isProductionReady(){return ge(this.highestVersion())}toLocalExtension(){return{id:this.extensionId(),name:this.name(),version:this.highestVersion(),description:this.description(),icon:this.icon()||{name:"fas fa-box-open",backgroundColor:"#117187",color:"#fff"},links:{discuss:this.discussUri(),website:this.httpUri()},extra:{"flarum-extension":{title:this.title()}}}}}flarum.reg.add("flarum-extension-manager","admin/models/ExternalExtension",he);const fe=flarum.reg.get("core","common/components/Dropdown");var xe=a.n(fe);const be=flarum.reg.get("core","common/components/LinkButton");var ve=a.n(be);class ye extends(U()){getExtension(){return this.attrs.extension instanceof he?this.attrs.extension.toLocalExtension():this.attrs.extension}view(){const e=this.getExtension(),{isCore:t,isDanger:a}=this.attrs;return m("div",{className:Y()("ExtensionCard",{"ExtensionCard--core":t,"ExtensionCard--danger":a})},m("div",{className:"ExtensionCard-header"},this.icon(),m(P(),{text:e.name},m("h4",null,e.extra["flarum-extension"].title)),this.attrs.extension instanceof he&&m("div",{className:"ExtensionCard-badges"},this.badges().toArray()),m("div",{className:"ExtensionCard-actions"},this.actionItems().toArray())),m("div",{className:"ExtensionCard-body"},m("p",null,e.description)),m("div",{className:"ExtensionCard-footer"},m("div",{className:"ExtensionCard-meta"},this.metaItems().toArray())))}icon(){const e=this.getExtension();this.attrs.extension instanceof he&&e.id in s().data.extensions&&(e.icon=s().data.extensions[e.id].icon);const t=e.icon||{};return!e.icon?.name&&this.attrs.extension instanceof he&&!(e.id in s().data.extensions)&&this.attrs.extension.iconUrl()&&(t.backgroundImage=`url(${this.attrs.extension.iconUrl()})`),m("span",{className:"ExtensionIcon",style:e.icon},e.icon?.name?m(j(),{name:e.icon.name}):null)}badges(){const e=new(L()),t=this.attrs.extension;return t.isSupported()?e.add("compatible",m(oe(),{icon:"fas fa-check",type:"success",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.compatible"),className:"Badge--flat Badge--square"})):e.add("incompatible",m(oe(),{icon:"fas fa-times",type:"danger",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.incompatible"),className:"Badge--flat Badge--square"})),t.isPremium()&&e.add("premium",m(oe(),{icon:"fas fa-dollar-sign",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.premium"),className:"ExtensionCard-badge--premium Badge--flat Badge--square"})),t.isProductionReady()||e.add("unstable",m(oe(),{icon:"fas fa-flask",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.unstable"),className:"Badge--flat Badge--square Badge--danger"})),"fof"===t.name().split("/")[0]&&e.add("fof",m(oe(),{icon:"fas fa-users",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.fof"),className:"Badge--flat Badge--square"})),"flarum"===t.name().split("/")[0]&&e.add("flarum",m(oe(),{icon:"fab fa-flarum",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.badges.flarum"),className:"ExtensionCard-badge--flarum Badge--flat Badge--square"})),e}metaItems(){const e=new(L()),{updates:t,isCore:a}=this.attrs,n=t?t["latest-minor"]??(t["latest-major"]&&!a?t["latest-major"]:null):null;return this.attrs.extension instanceof he?e.add("downloads",m("span",null,m(j(),{name:"fas fa-circle-down"}),s().translator.trans("flarum-extension-manager.admin.sections.discover.extension.downloads",{count:this.attrs.extension.downloads(),formattedCount:me()(this.attrs.extension.downloads())}))):e.add("version",m("div",{className:"ExtensionCard-version"},m("span",{className:"ExtensionCard-version-current"},this.version(t.version)),n?m("[",null,m(j(),{name:"fas fa-arrow-right"}),m(W,{className:"ExtensionCard-version-latest",type:t["latest-minor"]?"success":"warning"},this.version(n))):null)),this.attrs.extension instanceof he&&(e.add("version",m("div",{className:"ExtensionCard-version"},"v",this.version(this.attrs.extension.highestVersion()))),e.add("link",m(ve(),{className:"Button Button--ua-reset Button--link Button--icon",href:this.attrs.extension.httpUri(),target:"_blank",icon:"fas fa-external-link-alt",external:!0}))),e}actionItems(){const e=new(L()),{updates:t,extension:a,onClickUpdate:n,whyNotWarning:r}=this.attrs;return a instanceof he?a.extensionId()in s().data.extensions?e.add("installed",m(l(),{className:"Button Button--icon Button--flat Button--success",icon:"fas fa-check-circle",disabled:!0})):e.add("install",m(l(),{className:"Button Button--icon Button--flat",icon:"fas fa-cloud-arrow-down",onclick:()=>{s().extensionManager.control.requirePackage({package:a.name()})}})):(n&&"function"==typeof n?e.add("update",m(P(),{text:s().translator.trans("flarum-extension-manager.admin.extensions.update")},m(l(),{icon:"fas fa-cloud-arrow-down",className:"Button Button--icon Button--flat",onclick:n,"aria-label":s().translator.trans("flarum-extension-manager.admin.extensions.update")}))):n&&e.add("update",m(xe(),{buttonClassName:"Button Button--icon Button--flat",icon:"fas fa-ellipsis",label:s().translator.trans("flarum-extension-manager.admin.extensions.update")},m(l(),{icon:"fas fa-cloud-arrow-down",onclick:n.soft},s().translator.trans("flarum-extension-manager.admin.extensions.update_soft_label")),m(l(),{icon:"fas fa-rotate",onclick:n.hard,disabled:!t["direct-dependency"]},s().translator.trans("flarum-extension-manager.admin.extensions.update_hard_label")))),r&&e.add("whyNot",m(P(),{text:s().translator.trans("flarum-extension-manager.admin.extensions.check_why_it_failed_updating")},m(l(),{icon:"fas fa-exclamation-circle",className:"Button Button--icon Button--flat Button--danger",onclick:()=>s().modal.show(re,{package:a.name}),"aria-label":s().translator.trans("flarum-extension-manager.admin.extensions.check_why_it_failed_updating")})))),e}version(e){return"v"===e.charAt(0)?e.substring(1):e}}flarum.reg.add("flarum-extension-manager","admin/components/ExtensionCard",ye);class _e extends(U()){constructor(){super(...arguments),f(this,"updateState",void 0)}oninit(e){super.oninit(e),this.updateState=this.attrs.updateState}view(){return m("div",{className:Y()("Form-group Form-group--danger ExtensionManager-majorUpdate",{"ExtensionManager-majorUpdate--failed":"failure"===this.updateState.status,"ExtensionManager-majorUpdate--incompatibleExtensions":this.updateState.incompatibleExtensions.length})},m("img",{alt:"flarum logo",src:s().forum.attribute("baseUrl")+"/assets/extensions/flarum-extension-manager/flarum.svg"}),m("label",null,s().translator.trans("flarum-extension-manager.admin.major_updater.title",{version:this.attrs.coreUpdate["latest-major"]})),m("p",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.major_updater.description")),m("div",{className:"ExtensionManager-updaterControls"},m(P(),{text:s().translator.trans("flarum-extension-manager.admin.major_updater.dry_run_help")},m(l(),{className:"Button",icon:"fas fa-vial",onclick:this.update.bind(this,!0),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.major_updater.dry_run"))),m(l(),{className:"Button Button--danger",icon:"fas fa-play",onclick:this.update.bind(this,!1),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.major_updater.update"))),this.updateState.incompatibleExtensions.length?m("div",{className:"ExtensionManager-majorUpdate-incompatibleExtensions ExtensionManager-extensions-grid"},this.updateState.incompatibleExtensions.map((e=>m(ye,{extension:s().data.extensions[e.replace("flarum-","").replace("flarum-ext-","").replace("/","-")],updates:{},onClickUpdate:null,isDanger:!0})))):null,"failure"===this.updateState.status?m(se(),{type:"error",className:"ExtensionManager-majorUpdate-failure",dismissible:!1,controls:[m(l(),{className:"Button Button--text ExtensionManager-majorUpdate-failure-details",icon:"fas fa-question-circle",onclick:()=>s().modal.show(re,{package:"flarum/core"})},s().translator.trans("flarum-extension-manager.admin.major_updater.failure.why"))]},m("p",{className:"ExtensionManager-majorUpdate-failure-desc"},s().translator.trans("flarum-extension-manager.admin.major_updater.failure.desc"))):null)}update(e){s().extensionManager.control.majorUpdate({dryRun:e})}}flarum.reg.add("flarum-extension-manager","admin/components/MajorUpdater",_e);const ke=flarum.reg.get("core","common/components/InfoTile");var Ne=a.n(ke);class Me extends(U()){view(){const e=s().extensionManager.control.coreUpdate;return[m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.updater.updater_title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.updater.updater_help")),this.lastUpdateCheckView(),m("div",{className:"ExtensionManager-updaterControls"},this.controlItems().toArray()),this.availableUpdatesView()),e&&e.package["latest-major"]&&ge(e.package["latest-major"])?m(_e,{coreUpdate:e.package,updateState:s().extensionManager.control.lastUpdateRun.major}):null]}lastUpdateCheckView(){return s().extensionManager.control.lastUpdateCheck?.checkedAt&&m("p",{className:"ExtensionManager-lastUpdatedAt"},m("span",{className:"ExtensionManager-lastUpdatedAt-label"},s().translator.trans("flarum-extension-manager.admin.updater.last_update_checked_at")),m("span",{className:"ExtensionManager-lastUpdatedAt-value"},ae()(s().extensionManager.control.lastUpdateCheck.checkedAt)))||null}availableUpdatesView(){const e=s().extensionManager.control;if(s().extensionManager.control.isLoading("check")||s().extensionManager.control.isLoading("global-update"))return m("div",{className:"ExtensionManager-extensions"},m(C(),null));const t=e.coreUpdate&&e.coreUpdate.package["latest-minor"];return e.extensionUpdates.length||t?m("div",{className:"ExtensionManager-extensions"},m("div",{className:"ExtensionManager-extensions-grid"},t?m(ye,{extension:e.coreUpdate.extension,updates:e.coreUpdate.package,isCore:!0,onClickUpdate:()=>e.updateCoreMinor(),whyNotWarning:e.lastUpdateRun.limitedPackages().includes("flarum/core")}):null,e.extensionUpdates.map((t=>m(ye,{extension:t,updates:e.packageUpdates[t.id],onClickUpdate:{soft:()=>e.updateExtension(t,"soft"),hard:()=>e.updateExtension(t,"hard")},whyNotWarning:e.lastUpdateRun.limitedPackages().includes(t.name)}))))):m("div",{className:"ExtensionManager-extensions ExtensionManager-extensions--empty"},m(Ne(),{icon:"fas fa-plug-circle-check"},s().translator.trans("flarum-extension-manager.admin.updater.up_to_date")))}controlItems(){const e=new(L());return e.add("updateCheck",m(l(),{className:"Button",icon:"fas fa-sync-alt",onclick:()=>s().extensionManager.control.checkForUpdates(),loading:s().extensionManager.control.isLoading("check"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.updater.check_for_updates")),100),e.add("globalUpdate",m(l(),{className:"Button",icon:"fas fa-play",onclick:()=>s().extensionManager.control.updateGlobally(),loading:s().extensionManager.control.isLoading("global-update"),disabled:s().extensionManager.control.hasOperationRunning()},s().translator.trans("flarum-extension-manager.admin.updater.run_global_update"))),e}}flarum.reg.add("flarum-extension-manager","admin/components/Updater",Me);const we=flarum.reg.get("core","common/components/Form");var Ee=a.n(we);class Se extends(U()){oninit(e){super.oninit(e)}view(){return m("div",{className:"ExtensionPage-settings ExtensionManager-controlSection"},m("div",{className:"container"},m(Ee(),null,m(ee,null),m(Me,null))))}}flarum.reg.add("flarum-extension-manager","admin/components/ControlSection",Se);const Be=flarum.reg.get("core","common/components/FormGroup");var Ue=a.n(Be);class $e extends(U()){constructor(){super(...arguments),f(this,"settings",{}),f(this,"initialSettings",null),f(this,"loading",!1),f(this,"type",void 0)}oninit(e){super.oninit(e),this.submit(!0)}className(){return""}view(){return m("div",{className:Y()("FormSection",this.className())},m("label",null,this.title()),this.content(),m("div",{className:"Form-group Form-controls"},this.submitButton()))}submitButton(){return[m(l(),{className:"Button Button--primary",loading:this.loading,onclick:()=>this.submit(!1),disabled:!this.isDirty()},s().translator.trans("core.admin.settings.submit_button"))]}customSettingComponents(){return Ue().prototype.customFieldComponents()}setting(e){return this.settings[e]??(this.settings[e]=X()())}submit(e){this.loading=!0;const t={};Object.keys(this.settings).forEach((e=>{t[e]=this.settings[e]()})),s().request({method:"POST",url:s().forum.attribute("apiUrl")+"/extension-manager/composer",body:{type:this.type,data:e?null:t}}).then((e=>{let{data:t}=e;Object.keys(t).forEach((e=>{this.settings[e]=X()(t[e])})),this.initialSettings=Array.isArray(t)?{}:t})).finally((()=>{this.loading=!1,m.redraw()}))}isDirty(){return JSON.stringify(this.initialSettings)!==JSON.stringify(this.settings)}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureJson",$e);const Ce=flarum.reg.get("core","common/components/Select");var qe=a.n(Ce);class Pe extends(V()){constructor(){super(...arguments),f(this,"name",void 0),f(this,"repository",void 0)}oninit(e){super.oninit(e),this.name=X()(this.attrs.name||""),this.repository=X()(this.attrs.repository||{type:"composer",url:""})}className(){return"RepositoryModal Modal--small"}title(){const e=this.attrs.repository?"edit":"add";return s().translator.trans(`flarum-extension-manager.admin.composer.${e}_repository_label`)}content(){const e={composer:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.composer"),vcs:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.vcs"),path:s().translator.trans("flarum-extension-manager.admin.composer.repositories.types.path")};return m("div",{className:"Modal-body"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.name_label")),m("input",{className:"FormControl",bidi:this.name})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.type_label")),m(qe(),{options:e,value:this.repository().type,onchange:e=>this.repository({...this.repository(),type:e})})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.url")),m("input",{className:"FormControl",onchange:e=>this.repository({...this.repository(),url:e.target.value}),value:this.repository().url})),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",onclick:this.submit.bind(this)},s().translator.trans("flarum-extension-manager.admin.composer.repositories.add_modal.submit_button")))))}submit(){this.attrs.onsubmit(this.repository(),this.name()),this.hide()}}flarum.reg.add("flarum-extension-manager","admin/components/RepositoryModal",Pe);class Te extends $e{constructor(){super(...arguments),f(this,"type","composer")}title(){return s().translator.trans("flarum-extension-manager.admin.composer.title")}className(){return"ConfigureComposer"}content(){return m("div",{className:"Form ExtensionManager-SettingsGroups-content"},this.attrs.buildSettingComponent.call(this,{setting:"minimum-stability",label:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.label"),help:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.help"),type:"select",options:{stable:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.stable"),RC:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.rc"),beta:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.beta"),alpha:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.alpha"),dev:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.options.dev")}}),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.composer.repositories.label")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.composer.repositories.help")),m("div",{className:"ConfigureComposer-repositories"},Object.keys(this.setting("repositories")()||{}).map((e=>{const t=this.setting("repositories")()[e];return m("div",{className:"ButtonGroup ButtonGroup--full"},m(l(),{className:"Button",icon:{composer:"fas fa-cubes",vcs:"fas fa-code-branch",path:"fas fa-folder"}[t.type],onclick:()=>s().modal.show(Pe,{name:e,repository:t,onsubmit:(t,a)=>{const n=this.setting("repositories")();delete n[e],this.setting("repositories")(n),this.onchange(t,a)}})},e," (",t.type,")"),m(l(),{className:"Button Button--icon",icon:"fas fa-trash","aria-label":s().translator.trans("flarum-extension-manager.admin.composer.delete_repository_label"),onclick:()=>{if(confirm(y()(s().translator.trans("flarum-extension-manager.admin.composer.delete_repository_confirmation")))){const t={...this.setting("repositories")()};delete t[e],this.setting("repositories")(t)}}}))})))))}submitButton(){const e=super.submitButton();return e.push(m(l(),{className:"Button",onclick:()=>s().modal.show(Pe,{onsubmit:this.onchange.bind(this)})},s().translator.trans("flarum-extension-manager.admin.composer.add_repository_label"))),e}onchange(e,t){this.setting("repositories")({...this.setting("repositories")(),[t]:e})}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureComposer",Te);class je extends(V()){constructor(){super(...arguments),f(this,"type",void 0),f(this,"host",void 0),f(this,"token",void 0)}oninit(e){super.oninit(e),this.type=X()(this.attrs.type||"bearer"),this.host=X()(this.attrs.host||""),this.token=X()(this.attrs.token||"")}className(){return"AuthMethodModal Modal--small"}title(){const e=this.attrs.host?"edit":"add";return s().translator.trans(`flarum-extension-manager.admin.auth_config.${e}_label`)}content(){const e={"github-oauth":s().translator.trans("flarum-extension-manager.admin.auth_config.types.github-oauth"),"gitlab-oauth":s().translator.trans("flarum-extension-manager.admin.auth_config.types.gitlab-oauth"),"gitlab-token":s().translator.trans("flarum-extension-manager.admin.auth_config.types.gitlab-token"),bearer:s().translator.trans("flarum-extension-manager.admin.auth_config.types.bearer")};return m("div",{className:"Modal-body"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.type_label")),m(qe(),{options:e,value:this.type(),onchange:this.type})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.host_label")),m("input",{className:"FormControl",bidi:this.host,placeholder:s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.host_placeholder")})),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.token_label")),m("textarea",{className:"FormControl",oninput:e=>this.token(e.target.value),rows:"6",placeholder:this.token().startsWith("unchanged:")?y()(s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.unchanged_token_placeholder")):""},this.token().startsWith("unchanged:")?"":this.token())),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",onclick:this.submit.bind(this)},s().translator.trans("flarum-extension-manager.admin.auth_config.add_modal.submit_button")))))}submit(){this.attrs.onsubmit(this.type(),this.host(),this.token()),this.hide()}}flarum.reg.add("flarum-extension-manager","admin/components/AuthMethodModal",je);class Fe extends $e{constructor(){super(...arguments),f(this,"type","auth")}title(){return s().translator.trans("flarum-extension-manager.admin.auth_config.title")}className(){return"ConfigureAuth"}content(){const e=Object.keys(this.settings),t=e.length&&e.every((e=>{const t=this.settings[e]();return Array.isArray(t)?t.length:Object.keys(t).length}));return m("div",{className:"ExtensionManager-SettingsGroups-content"},t?e.map((e=>{const t=this.settings[e]();return m("div",{className:"Form-group"},m("label",null,s().translator.trans(`flarum-extension-manager.admin.auth_config.types.${e}`)),m("div",{className:"ConfigureAuth-hosts"},Object.keys(t).map((a=>{const n=t[a];return m("div",{className:"ButtonGroup ButtonGroup--full"},m(l(),{className:"Button",icon:"fas fa-key",onclick:()=>s().modal.show(je,{type:e,host:a,token:n,onsubmit:this.onchange.bind(this,a)})},a),m(l(),{className:"Button Button--icon",icon:"fas fa-trash","aria-label":s().translator.trans("flarum-extension-manager.admin.auth_config.delete_label"),onclick:()=>{if(confirm(y()(s().translator.trans("flarum-extension-manager.admin.auth_config.delete_confirmation")))){const t={...this.setting(e)()};delete t[a],Object.keys(t).length?this.setting(e)(t):delete this.settings[e]}}}))}))))})):m("span",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.auth_config.no_auth_methods_configured")))}submitButton(){const e=super.submitButton();return e.push(m(l(),{className:"Button",loading:this.loading,onclick:()=>s().modal.show(je,{onsubmit:this.onchange.bind(this,null)})},s().translator.trans("flarum-extension-manager.admin.auth_config.add_label"))),e}onchange(e,t,a,n){const s={...this.setting(t)()};e&&delete s[e],s[a]=n,this.setting(t)(s)}}flarum.reg.add("flarum-extension-manager","admin/components/ConfigureAuth",Fe);const Le=flarum.reg.get("core","common/components/Input");var Ie=a.n(Le);const Ae=flarum.reg.get("core","common/helpers/listItems");var De=a.n(Ae);const Oe=flarum.reg.get("core","common/utils/throttleDebounce");class Re extends(U()){constructor(){super(...arguments),f(this,"search",X()("")),f(this,"warningsDismissed",X()(!1)),f(this,"applySearch",(0,Oe.throttle)(1200,(e=>{const t=s().extensionManager.extensions.getParams();s().extensionManager.extensions.refreshParams({...t,filter:{...t.filter,q:e}},1)})))}oninit(e){super.oninit(e),s().extensionManager.extensions.goto(1),this.warningsDismissed("true"===localStorage.getItem("flarum-extension-manager.warningsDismissed"))}load(e){void 0===e&&(e=1),s().extensionManager.extensions.goto(e)}view(){return m("div",{className:"ExtensionPage-settings ExtensionManager-DiscoverSection"},m("div",{className:"container"},m(Ee(),null,m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.discover.title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.sections.discover.description"),this.warningsDismissed()&&m(l(),{className:"Button Button--text Button--warning Button--more",icon:"fas fa-exclamation-triangle",onclick:()=>this.setWarningDismissed(!1)}))),!this.warningsDismissed()&&m("div",{className:"ExtensionManager-warnings Form-group"},m(se(),{className:"ExtensionManager-primaryWarning",type:"warning",dismissible:!0,ondismiss:()=>this.setWarningDismissed(!0)},m("ul",null,De()(this.warningItems().toArray())))),m("div",{className:"Tabs"},m("div",{className:"Tabs-nav"},this.tabItems().toArray()),m("div",{className:"Tabs-content"},m("hr",{className:"Tabs-divider"}),m("div",{className:"ExtensionManager-DiscoverSection-toolbar"},m("div",{className:"ExtensionManager-DiscoverSection-toolbar-primary"},this.toolbarPrimaryItems().toArray()),m("div",{className:"ExtensionManager-DiscoverSection-toolbar-secondary"},this.toolbarSecondaryItems().toArray())),this.extensionList(),m("div",{className:"ExtensionManager-DiscoverSection-footer"},this.footerItems().toArray()))))))}tabFilters(){return{"":{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.discover"),active:()=>!s().extensionManager.extensions.getParams().filter?.type},extension:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.extensions"),active:()=>"extension"===s().extensionManager.extensions.getParams().filter?.type},locale:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.languages"),active:()=>"locale"===s().extensionManager.extensions.getParams().filter?.type},theme:{label:s().translator.trans("flarum-extension-manager.admin.sections.discover.tabs.themes"),active:()=>"theme"===s().extensionManager.extensions.getParams().filter?.type}}}tabItems(){const e=new(L()),t=this.tabFilters();return Object.keys(t).forEach((a=>{const n=t[a];e.add(a,m(l(),{className:"Button Button--link",active:n.active(),onclick:()=>{s().extensionManager.extensions.changeFilter("type",a)}},n.label))})),e}warningItems(){const e=new(L());return e.add("accessWarning",s().translator.trans("flarum-extension-manager.admin.settings.access_warning")),s().data.debugEnabled&&e.add("devModeWarning",s().translator.trans("flarum-extension-manager.admin.settings.debug_mode_warning")),e}toolbarPrimaryItems(){const e=new(L());return e.add("search",m(Ie(),{value:this.search(),onchange:e=>{this.search(e),this.applySearch(e)},inputAttrs:{className:"FormControl-alt"},clearable:!0,placeholder:s().translator.trans("flarum-extension-manager.admin.sections.discover.search"),prefixIcon:"fas fa-search"})),e}toolbarSecondaryItems(){const e=new(L()),t=s().extensionManager.extensions.sortMap(),a=Object.keys(t).reduce(((e,a)=>{const n=t[a];return e[a]="string"!=typeof n?n.label:n,e}),{});e.add("sort",m(xe(),{buttonClassName:"Button",label:a[s().extensionManager.extensions.getParams().sort]||Object.keys(t).map((e=>a[e]))[0],accessibleToggleLabel:s().translator.trans("flarum-extension-manager.admin.sections.discover.sort.toggle_dropdown_accessible_label")},Object.keys(a).map((e=>{const t=a[e],n=s().extensionManager.extensions.getParams().sort===e;return m(l(),{icon:!n||"fas fa-check",onclick:()=>s().extensionManager.extensions.changeSort(e),active:n},t)}))));const n=(s().extensionManager.extensions.getParams().filter?.is?.[0]??null)||"all";return e.add("party",m(xe(),{buttonClassName:"Button",label:s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter."+n),accessibleToggleLabel:s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter.toggle_dropdown_accessible_label")},["all","premium"].map((e=>m(l(),{icon:n!==e||"fas fa-check",onclick:()=>{s().extensionManager.extensions.changeFilter("is","all"===e?void 0:[e])},active:n===e},s().translator.trans("flarum-extension-manager.admin.sections.discover.party_filter."+e)))))),e}extensionList(){return!s().extensionManager.extensions.hasItems()&&s().extensionManager.extensions.isLoading()?m(C(),{display:"block"}):s().extensionManager.extensions.hasItems()?m("div",{className:Y()("ExtensionManager-DiscoverSection-list",{"loading-container":s().extensionManager.extensions.isLoading()})},m("div",{className:"ExtensionManager-DiscoverSection-list-inner"},s().extensionManager.extensions.getPages().map((e=>e.items.map((e=>m(ye,{extension:e,key:e.name()})))))),s().extensionManager.extensions.hasItems()&&s().extensionManager.extensions.isLoading()&&m(C(),{size:"large"})):m("div",{className:"ExtensionManager-DiscoverSection-list ExtensionManager-DiscoverSection-list--empty"},m(Ne(),{icon:"fas fa-plug-circle-exclamation"},s().translator.trans("flarum-extension-manager.admin.sections.discover.empty_results")))}footerItems(){const e=new(L());return e.add("pagination",m(O(),{total:s().extensionManager.extensions.totalItems,perPage:s().extensionManager.extensions.pageSize,currentPage:s().extensionManager.extensions.getLocation().page,onChange:e=>{s().extensionManager.extensions.getLocation().page!==e&&this.load(e)}})),e.add("premiumTermsLink",m(ve(),{className:"Button Button--link",href:"https://flarum.org/terms/premium-extensions",external:!0,target:"_blank",icon:"fas fa-circle-info"},s().translator.trans("flarum-extension-manager.admin.sections.discover.premium_extension_terms"))),e}setWarningDismissed(e){this.warningsDismissed(e),localStorage.setItem("flarum-extension-manager.warningsDismissed",e?"true":"false")}}flarum.reg.add("flarum-extension-manager","admin/components/DiscoverSection",Re);class Ye extends(i()){content(){const e=s().registry.getSettings(this.extension.id);return m("div",{className:"ExtensionPage-settings"},m("div",{className:"container"},e?[m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.settings.title")),m("div",{className:"helpText"},s().translator.trans("flarum-extension-manager.admin.sections.settings.description"))),m("div",{className:"FormSectionGroup ExtensionManager-SettingsGroups"},m("div",{className:"FormSection"},m("label",null,s().translator.trans("flarum-extension-manager.admin.settings.title")),m("div",{className:"Form"},e.map(this.buildSettingComponent.bind(this))),m("div",{className:"Form-group Form--controls"},this.submitButton())),m(Te,{buildSettingComponent:this.buildSettingComponent}),m(Fe,{buildSettingComponent:this.buildSettingComponent}))]:m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("core.admin.extension.no_settings"))))}sections(e){const t=super.sections(e),a=s().data["flarum-extension-manager.writable_dirs"],n=s().data["flarum-extension-manager.missing_functions"];return!a||n&&0!==n.length?t.add("warning",m("div",{className:"ExtensionPage-settings"},m("div",{className:"container"},m("div",{className:"Form-group"},m(se(),{type:"error",dismissible:!1},s().data["flarum-extension-manager.writable_dirs"]?s().translator.trans("flarum-extension-manager.admin.required_php_functions",{functions:s().data["flarum-extension-manager.missing_functions"].join(", ")}):s().translator.trans("flarum-extension-manager.admin.file_permissions"))))),10):(t.add("discover",m(Re,null),15),t.add("control",m(Se,null),10)),t.setPriority("content",8),"0"!==s().data.settings["flarum-extension-manager.queue_jobs"]&&s().data.settings["flarum-extension-manager.queue_jobs"]&&t.add("queue",m(Z,null),5),t.remove("permissions"),t}onsaved(){super.onsaved(),m.redraw()}}flarum.reg.add("flarum-extension-manager","admin/components/SettingsPage",Ye);const We=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Ge=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Ve=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],He=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ze=(e,t,a)=>{let n=e;return"string"==typeof t||Array.isArray(t)?n=e.toLocaleString(t,a):!0!==t&&void 0===a||(n=e.toLocaleString(void 0,a)),n};class Qe extends(de()){status(){return de().attribute("status").call(this)}operation(){return de().attribute("operation").call(this)}command(){return de().attribute("command").call(this)}package(){return de().attribute("package").call(this)}output(){return de().attribute("output").call(this)}guessedCause(){return de().attribute("guessedCause").call(this)}createdAt(){return de().attribute("createdAt",de().transformDate).call(this)}startedAt(){return de().attribute("startedAt",de().transformDate).call(this)}finishedAt(){return de().attribute("finishedAt",de().transformDate).call(this)}peakMemoryUsed(){return function(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const a=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?He:Ve:t.binary?Ge:We,n=t.space?" ":"";if(t.signed&&0===e)return` 0${n}${a[0]}`;const s=e<0,r=s?"-":t.signed?"+":"";let i;if(s&&(e=-e),void 0!==t.minimumFractionDigits&&(i={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1)return r+ze(e,t.locale,i)+n+a[0];const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),a.length-1);return e/=(t.binary?1024:1e3)**o,i||(e=e.toPrecision(3)),r+ze(Number(e),t.locale,i)+n+a[o]}(1024*de().attribute("peakMemoryUsed").call(this))}}flarum.reg.add("flarum-extension-manager","admin/models/Task",Qe);const Je=[(new(S().Store)).add("extension-manager-tasks",Qe).add("external-extensions",he),(new(S().Admin)).setting((()=>({setting:"flarum-extension-manager.queue_jobs",label:s().translator.trans("flarum-extension-manager.admin.settings.queue_jobs"),help:s().translator.trans("flarum-extension-manager.admin.settings.queue_jobs_help",{basic_impl_link:m("a",{href:"https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting"}),adv_impl_link:m("a",{href:"https://discuss.flarum.org/d/21873-redis-sessions-cache-queues"}),php_version:m("strong",null,s().data.phpVersion),folder_perms_link:m("a",{href:"https://docs.flarum.org/install#folder-ownership"})}),type:"boolean",disabled:s().data["flarum-extension-manager.using_sync_queue"]}))).setting((()=>({setting:"flarum-extension-manager.task_retention_days",label:s().translator.trans("flarum-extension-manager.admin.settings.task_retention_days"),help:s().translator.trans("flarum-extension-manager.admin.settings.task_retention_days_help"),type:"number"}))).page(Ye).generalIndexItems("settings",(()=>[{id:"minimum-stability",label:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.label",{},!0),help:s().translator.trans("flarum-extension-manager.admin.composer.minimum_stability.help",{},!0)},{id:"repositories",label:s().translator.trans("flarum-extension-manager.admin.composer.repositories.label",{},!0),help:s().translator.trans("flarum-extension-manager.admin.composer.repositories.help",{},!0)},{id:"composer-auth",label:s().translator.trans("flarum-extension-manager.admin.auth_config.title",{},!0)},{id:"updates",label:s().translator.trans("flarum-extension-manager.admin.updater.updater_title",{},!0),help:s().translator.trans("flarum-extension-manager.admin.updater.updater_help",{},!0)}]))];s().initializers.add("flarum-extension-manager",(t=>{t.extensionManager=new w,t.data["flarum-extension-manager.using_sync_queue"]&&(t.data.settings["flarum-extension-manager.queue_jobs"]="0"),(0,e.extend)(i().prototype,"topItems",(function(e){"flarum-extension-manager"===this.extension.id||g()(this.extension.id)||e.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:()=>{t.modal.show(d()),t.request({url:`${t.forum.attribute("apiUrl")}/extension-manager/extensions/${this.extension.id}`,method:"DELETE"}).then((e=>{e?.processing?p():(t.alerts.show({type:"success"},t.translator.trans("flarum-extension-manager.admin.extensions.successful_remove")),window.location=t.forum.attribute("adminUrl"))})).finally((()=>{t.modal.close()}))}},t.translator.trans("flarum-extension-manager.admin.extensions.remove")))}))}))})(),module.exports=n})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/package-manager/js/dist/admin.js.map b/extensions/package-manager/js/dist/admin.js.map index 17ecb52963..7ca2e54f87 100755 --- a/extensions/package-manager/js/dist/admin.js.map +++ b/extensions/package-manager/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"6BAAoEA,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,CAAC,EAAEC,EAAE,SAASrB,EAAEC,EAAEC,GAAG,OAAO,IAAIkB,EAAEpB,EAAEE,EAAED,EAAEqB,GAAG,EAAEC,EAAE,SAASvB,GAAG,OAAOC,EAAEuB,EAAExB,GAAG,GAAG,EAAEyB,EAAE,SAASzB,GAAG,OAAOA,EAAE,CAAC,EAAE0B,EAAE,SAAS1B,GAAG,OAAOyB,EAAEzB,GAAG2B,KAAKC,KAAK5B,GAAG2B,KAAKE,MAAM7B,EAAE,EAAE8B,EAAE,SAAS9B,GAAG,OAAO2B,KAAKI,IAAI/B,EAAE,EAAEgC,EAAE,SAAShC,EAAEC,GAAG,OAAOD,EAAEyB,EAAEzB,GAAG,CAACiC,UAAS,EAAGC,OAAO,GAAGJ,EAAE9B,GAAGC,GAAG,CAACgC,UAAS,EAAGC,OAAO,GAAGlC,EAAEC,GAAG,CAACgC,UAAS,EAAGC,OAAO,GAAG,EAAEd,EAAE,WAAW,SAASK,EAAEzB,EAAEC,EAAEC,GAAG,IAAIC,EAAEgC,KAAK,GAAGA,KAAKC,GAAG,CAAC,EAAED,KAAKb,GAAGpB,OAAE,IAASF,IAAImC,KAAKE,IAAI,EAAEF,KAAKG,yBAAyBrC,EAAE,OAAOoB,EAA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AQ,WACPxD,MAAK8B,IACFA,GAAU8B,WACZ1F,KAEA0Y,EAAIK,OAAO7U,KAAK,CACdC,KAAM,WACLuU,EAAIM,WAAW5U,MAAM,gEACxB/C,OAAOsB,SAAW+V,EAAII,MAAMtT,UAAU,YACxC,IACCQ,SAAQ,KACT0S,EAAIE,MAAM3Y,OAAO,GACjB,GAEHyY,EAAIM,WAAW5U,MAAM,qDAC1B,GAAE,G","sources":["webpack://@flarum/extension-manager/../../../node_modules/dayjs/plugin/duration.js","webpack://@flarum/extension-manager/webpack/bootstrap","webpack://@flarum/extension-manager/webpack/runtime/compat get default export","webpack://@flarum/extension-manager/webpack/runtime/define property getters","webpack://@flarum/extension-manager/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/extension-manager/webpack/runtime/make namespace object","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/components/ExtensionPage')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/components/LoadingModal')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/utils/isExtensionEnabled')\"","webpack://@flarum/extension-manager/./src/admin/utils/jumpToQueue.ts","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/extension-manager/./src/admin/states/QueueState.ts","webpack://@flarum/extension-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/extension-manager/./src/admin/states/ControlSectionState.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/extension-manager/./src/admin/states/ExtensionListState.ts","webpack://@flarum/extension-manager/./src/admin/states/ExtensionManagerState.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Pagination')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/extension-manager/./src/admin/components/Label.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/extension-manager/./src/admin/components/TaskOutputModal.tsx","webpack://@flarum/extension-manager/./src/admin/utils/humanDuration.ts","webpack://@flarum/extension-manager/./src/admin/components/QueueSection.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/extension-manager/./src/admin/components/Installer.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/extension-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/formatAmount')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/extension-manager/./src/admin/utils/versions.ts","webpack://@flarum/extension-manager/./src/admin/models/ExternalExtension.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/extension-manager/./src/admin/components/ExtensionCard.tsx","webpack://@flarum/extension-manager/./src/admin/components/MajorUpdater.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/InfoTile')\"","webpack://@flarum/extension-manager/./src/admin/components/Updater.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/extension-manager/./src/admin/components/ControlSection.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/FormGroup')\"","webpack://@flarum/extension-manager/./src/admin/components/ConfigureJson.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Select')\"","webpack://@flarum/extension-manager/./src/admin/components/RepositoryModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureComposer.tsx","webpack://@flarum/extension-manager/./src/admin/components/AuthMethodModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureAuth.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Input')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/helpers/listItems')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/extension-manager/./src/admin/components/DiscoverSection.tsx","webpack://@flarum/extension-manager/./src/admin/components/SettingsPage.tsx","webpack://@flarum/extension-manager/../../../node_modules/pretty-bytes/index.js","webpack://@flarum/extension-manager/./src/admin/models/Task.ts","webpack://@flarum/extension-manager/./src/admin/extend.tsx","webpack://@flarum/extension-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,d=2628e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(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)},v=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},g=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*h[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)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,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=v(this.$d.years,\"Y\"),s=v(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,\"D\"),e=v(this.$d.hours,\"H\"),r=v(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,\"S\"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",h=(d?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===h||\"-P\"===h?\"P0D\":h},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/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[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.valueOf=function(){return this.asMilliseconds()},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}(),p=function(t,s,n){return t.add(s.years()*n,\"y\").add(s.months()*n,\"M\").add(s.days()*n,\"d\").add(s.hours()*n,\"h\").add(s.minutes()*n,\"m\").add(s.seconds()*n,\"s\").add(s.milliseconds()*n,\"ms\")};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)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\tflarum.reg._webpack_runtimes[\"flarum-extension-manager\"] ||= __webpack_require__;// 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.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/ExtensionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/LoadingModal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/utils/isExtensionEnabled');","import app from 'flarum/admin/app';\n\n// @ts-ignore\nwindow.jumpToQueue = jumpToQueue;\nexport default function jumpToQueue() {\n app.modal.close();\n m.route.set(app.route('extension', {\n id: 'flarum-extension-manager'\n }));\n app.extensionManager.queue.load({}, true);\n setTimeout(() => {\n document.getElementById('ExtensionManager-queueSection')?.scrollIntoView({\n block: 'nearest'\n });\n }, 200);\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/jumpToQueue', jumpToQueue);","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nexport default class QueueState {\n constructor() {\n _defineProperty(this, \"polling\", null);\n _defineProperty(this, \"tasks\", null);\n _defineProperty(this, \"limit\", 20);\n _defineProperty(this, \"offset\", 0);\n _defineProperty(this, \"total\", 0);\n _defineProperty(this, \"loading\", false);\n }\n load(params, actionTaken) {\n if (actionTaken === void 0) {\n actionTaken = false;\n }\n this.loading = true;\n params = {\n page: {\n limit: this.limit,\n offset: this.offset,\n ...params?.page\n },\n ...params\n };\n return app.store.find('extension-manager-tasks', params || {}).then(data => {\n this.tasks = data;\n this.total = data.payload.meta?.page?.total || 0;\n m.redraw();\n\n // Check if there is a pending or running task\n const pendingTask = data?.find(task => task.status() === 'pending' || task.status() === 'running');\n if (pendingTask) {\n this.pollQueue(actionTaken);\n } else if (actionTaken) {\n app.extensionManager.control.setLoading(null);\n\n // Refresh the page\n window.location.reload();\n } else if (app.extensionManager.control.isLoading()) {\n app.extensionManager.control.setLoading(null);\n }\n this.loading = false;\n return data;\n });\n }\n isLoading() {\n return this.loading;\n }\n getItems() {\n return this.tasks;\n }\n getTotalItems() {\n return this.total;\n }\n getTotalPages() {\n return Math.ceil(this.total / this.limit);\n }\n pageNumber() {\n return Math.ceil(this.offset / this.limit);\n }\n getPerPage() {\n return this.limit;\n }\n hasPrev() {\n return this.pageNumber() !== 0;\n }\n hasNext() {\n return this.offset + this.limit < this.total;\n }\n prev() {\n if (this.hasPrev()) {\n this.offset -= this.limit;\n this.load();\n }\n }\n next() {\n if (this.hasNext()) {\n this.offset += this.limit;\n this.load();\n }\n }\n goto(page) {\n this.offset = (page - 1) * this.limit;\n this.load();\n }\n pollQueue(actionTaken) {\n if (actionTaken === void 0) {\n actionTaken = false;\n }\n if (this.polling) {\n clearTimeout(this.polling);\n }\n this.polling = setTimeout(() => {\n this.load({}, actionTaken);\n }, 6000);\n }\n hasPending() {\n return !!this.tasks?.find(task => task.status() === 'pending' || task.status() === 'running');\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/QueueState', QueueState);","import app from 'flarum/admin/app';\nexport default function (e) {\n app.extensionManager.control.setLoading(null);\n const error = e.response.errors[0];\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n app.alerts.clear();\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({\n type: 'error'\n }, app.translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n case 'extension_already_installed':\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n case 'extension_not_installed':\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport extractText from 'flarum/common/utils/extractText';\nexport default class ControlSectionState {\n get lastUpdateRun() {\n const lastUpdateRun = JSON.parse(app.data.settings['flarum-extension-manager.last_update_run']);\n lastUpdateRun.limitedPackages = () => [...lastUpdateRun.major.limitedPackages, ...lastUpdateRun.minor.limitedPackages, ...lastUpdateRun.global.limitedPackages];\n return lastUpdateRun;\n }\n constructor() {\n _defineProperty(this, \"loading\", null);\n _defineProperty(this, \"packageUpdates\", {});\n _defineProperty(this, \"lastUpdateCheck\", void 0);\n _defineProperty(this, \"extensionUpdates\", void 0);\n _defineProperty(this, \"coreUpdate\", null);\n this.lastUpdateCheck = JSON.parse(app.data.settings['flarum-extension-manager.last_update_check']);\n this.extensionUpdates = this.formatExtensionUpdates(this.lastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(this.lastUpdateCheck);\n }\n isLoading(name) {\n if (name === void 0) {\n name = null;\n }\n return name && this.loading === name || !name && this.loading !== null;\n }\n hasOperationRunning() {\n return this.isLoading() || app.extensionManager.queue.hasPending();\n }\n setLoading(name) {\n this.loading = name;\n }\n requirePackage(data) {\n app.extensionManager.control.setLoading('extension-install');\n app.modal.show(LoadingModal);\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions`,\n body: {\n data\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-extension-manager.admin.extensions.successful_install', {\n extension: extensionId\n }));\n window.location.href = `${app.forum.attribute('adminUrl')}#/extension/${extensionId}`;\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n checkForUpdates() {\n this.setLoading('check');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/check-for-updates`\n }).then(response => {\n if (response.processing) {\n jumpToQueue();\n } else {\n this.lastUpdateCheck = response;\n this.extensionUpdates = this.formatExtensionUpdates(response);\n this.coreUpdate = this.formatCoreUpdate(response);\n this.setLoading(null);\n m.redraw();\n }\n }).catch(errorHandler).finally(() => {\n m.redraw();\n });\n }\n updateCoreMinor() {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.minor_update_confirmation.content')))) {\n app.modal.show(LoadingModal);\n this.setLoading('minor-update');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/minor-update`\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n }\n updateExtension(extension, updateMode) {\n app.modal.show(LoadingModal);\n this.setLoading('extension-update');\n app.request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions/${extension.id}`,\n body: {\n data: {\n updateMode\n }\n }\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.extensions.successful_update', {\n extension: extension.extra['flarum-extension'].title\n }));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.setLoading('global-update');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/global-update`\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.updater.global_update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n formatExtensionUpdates(lastUpdateCheck) {\n this.packageUpdates = {};\n lastUpdateCheck?.updates?.installed?.filter(composerPackage => {\n const id = composerPackage.name.replace('/', '-').replace(/(flarum-ext-)|(flarum-)/, '');\n const extension = app.data.extensions[id];\n const safeToUpdate = ['semver-safe-update', 'update-possible'].includes(composerPackage['latest-status']);\n if (extension && safeToUpdate) {\n this.packageUpdates[extension.id] = composerPackage;\n }\n return extension && safeToUpdate;\n });\n return Object.values(app.data.extensions).filter(extension => this.packageUpdates[extension.id]);\n }\n formatCoreUpdate(lastUpdateCheck) {\n const core = lastUpdateCheck?.updates?.installed?.filter(composerPackage => composerPackage.name === 'flarum/core').pop();\n if (!core) return null;\n return {\n package: core,\n extension: {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n name: '',\n // @ts-ignore\n backgroundImage: `url(${app.data.resources[0]['attributes']['baseUrl']}/assets/extensions/flarum-extension-manager/flarum.svg`\n },\n extra: {\n 'flarum-extension': {\n title: extractText(app.translator.trans('flarum-extension-manager.admin.updater.flarum'))\n }\n },\n links: {}\n }\n };\n }\n majorUpdate(_ref) {\n let {\n dryRun\n } = _ref;\n app.extensionManager.control.setLoading(dryRun ? 'major-update-dry-run' : 'major-update');\n app.modal.show(LoadingModal);\n const updateState = this.lastUpdateRun.major;\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/major-update`,\n body: {\n data: {\n dryRun\n }\n }\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).catch(e => {\n app.modal.close();\n updateState.status = 'failure';\n updateState.incompatibleExtensions = e.response?.errors?.pop()?.incompatible_extensions;\n }).finally(() => {\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ControlSectionState', ControlSectionState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import app from 'flarum/admin/app';\nimport PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class ExtensionListState extends PaginatedListState {\n get type() {\n return 'external-extensions';\n }\n constructor() {\n super({\n sort: '-downloads'\n }, 1, 12);\n }\n sortMap() {\n return {\n '-createdAt': {\n sort: '-createdAt',\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.latest', {}, true)\n },\n '-downloads': {\n sort: '-downloads',\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.top', {}, true)\n }\n };\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ExtensionListState', ExtensionListState);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport QueueState from './QueueState';\nimport ControlSectionState from './ControlSectionState';\nimport ExtensionListState from './ExtensionListState';\nexport default class ExtensionManagerState {\n constructor() {\n _defineProperty(this, \"queue\", new QueueState());\n _defineProperty(this, \"control\", new ControlSectionState());\n _defineProperty(this, \"extensions\", new ExtensionListState());\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ExtensionManagerState', ExtensionManagerState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Tooltip');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Pagination');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class Label extends Component {\n view(vnode) {\n const {\n className,\n type,\n ...attrs\n } = this.attrs;\n return m(\"span\", Object.assign({\n className: classList(['Label', `Label--${this.attrs.type}`, className])\n }, attrs), vnode.children);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Label', Label);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","import app from 'flarum/admin/app';\nimport Modal from 'flarum/common/components/Modal';\nexport default class TaskOutputModal extends Modal {\n className() {\n return 'Modal--large QuickModal';\n }\n title() {\n return app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`);\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(\"div\", {\n className: \"TaskOutputModal-data\"\n }, this.attrs.task.status() === 'failure' && m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-guessed-cause\"\n }, this.attrs.task.guessedCause() && app.translator.trans('flarum-extension-manager.admin.exceptions.guessed_cause.' + this.attrs.task.guessedCause()) || app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown'))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.command')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-command\"\n }, m(\"code\", null, \"$ composer \", this.attrs.task.command()))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.output')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-output\"\n }, m(\"code\", null, m(\"pre\", null, this.attrs.task.output()))))));\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/TaskOutputModal', TaskOutputModal);","import duration from 'dayjs/plugin/duration';\nexport default function humanDuration(start, end) {\n dayjs.extend(duration);\n const durationTime = dayjs(end).diff(start);\n return dayjs.duration(durationTime).humanize();\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/humanDuration', humanDuration);","import app from 'flarum/admin/app';\nimport Component 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 Icon from 'flarum/common/components/Icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport Link from 'flarum/common/components/Link';\nimport Pagination from 'flarum/common/components/Pagination';\nimport classList from 'flarum/common/utils/classList';\nimport Label from './Label';\nimport TaskOutputModal from './TaskOutputModal';\nimport humanDuration from '../utils/humanDuration';\nexport default class QueueSection extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n app.extensionManager.queue.load();\n }\n view() {\n return m(\"section\", {\n id: \"ExtensionManager-queueSection\",\n className: \"ExtensionPage-settings ExtensionManager-queueSection\"\n }, m(\"div\", {\n className: \"ExtensionPage-permissions-header ExtensionManager-queueSection-header\"\n }, m(\"div\", {\n className: \"container\"\n }, m(\"h2\", {\n className: \"ExtensionTitle\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.queue.title')), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-sync-alt\",\n onclick: () => app.extensionManager.queue.load(),\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.sections.queue.refresh'),\n disabled: app.extensionManager.control.isLoading()\n }))), m(\"div\", {\n className: \"container\"\n }, this.queueTable()));\n }\n columns() {\n const items = new ItemList();\n items.add('operation', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.operation')),\n content: task => m(\"div\", {\n className: \"ExtensionManager-queueTable-operation\"\n }, m(\"span\", {\n className: \"ExtensionManager-queueTable-operation-icon\"\n }, this.operationIcon(task.operation())), m(\"span\", {\n className: \"ExtensionManager-queueTable-operation-name\"\n }, app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${task.operation()}`)))\n }, 80);\n items.add('package', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.package')),\n content: task => {\n const extension = app.data.extensions[task.package()?.replace(/(\\/flarum-|\\/flarum-ext-|\\/)/g, '-')];\n return extension ? m(Link, {\n className: \"ExtensionManager-queueTable-package\",\n href: app.route('extension', {\n id: extension.id\n })\n }, m(\"div\", {\n className: \"ExtensionManager-queueTable-package-icon ExtensionIcon\",\n style: extension.icon\n }, !!extension.icon && m(Icon, {\n name: extension.icon.name\n })), m(\"div\", {\n className: \"ExtensionManager-queueTable-package-details\"\n }, m(\"span\", {\n className: \"ExtensionManager-queueTable-package-title\"\n }, extension.extra['flarum-extension'].title), m(\"span\", {\n className: \"ExtensionManager-queueTable-package-name\"\n }, task.package()))) : task.package();\n }\n }, 75);\n items.add('status', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.status')),\n content: task => m('[', null, m(Label, {\n className: \"ExtensionManager-queueTable-status\",\n type: {\n running: 'neutral',\n failure: 'error',\n pending: 'warning',\n success: 'success'\n }[task.status()]\n }, app.translator.trans(`flarum-extension-manager.admin.sections.queue.statuses.${task.status()}`)), ['pending', 'running'].includes(task.status()) && m(LoadingIndicator, {\n size: \"small\",\n display: \"inline\"\n }))\n }, 70);\n items.add('elapsedTime', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.elapsed_time')),\n content: task => !task.startedAt() || !task.finishedAt() ? app.translator.trans('flarum-extension-manager.admin.sections.queue.task_just_started') : m(Tooltip, {\n text: `${dayjs(task.startedAt()).format('LL LTS')} ${dayjs(task.finishedAt()).format('LL LTS')}`\n }, m(\"span\", null, humanDuration(task.startedAt(), task.finishedAt())))\n }, 65);\n items.add('memoryUsed', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.peak_memory_used')),\n content: task => m(\"span\", null, task.peakMemoryUsed())\n }, 60);\n items.add('details', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.details')),\n content: task => m(Button, {\n className: \"Button Button--icon Table-controls-item\",\n icon: \"fas fa-file-alt\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.details')\n // @todo fix in core\n // @ts-ignore\n ,\n onclick: () => app.modal.show(TaskOutputModal, {\n task\n }),\n disabled: ['pending', 'running'].includes(task.status())\n }),\n className: 'Table-controls'\n }, 55);\n return items;\n }\n queueTable() {\n const tasks = app.extensionManager.queue.getItems();\n if (!tasks) {\n return m(LoadingIndicator, null);\n }\n if (tasks && !tasks.length) {\n return m(\"h3\", {\n className: \"ExtensionPage-subHeader\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.queue.none'));\n }\n const columns = this.columns();\n return m('[', null, m(\"div\", {\n className: classList('Table-container', {\n 'loading-container': tasks && app.extensionManager.queue.isLoading()\n })\n }, m(\"table\", {\n className: \"Table ExtensionManager-queueTable\"\n }, m(\"thead\", null, m(\"tr\", null, columns.toArray().map((item, index) => m(\"th\", {\n key: index\n }, item.label)))), m(\"tbody\", null, tasks.map((task, index) => m(\"tr\", {\n key: index\n }, columns.toArray().map((item, index) => {\n const {\n label,\n content,\n ...attrs\n } = item;\n return m(\"td\", Object.assign({\n key: index\n }, attrs), content(task));\n }))))), tasks && app.extensionManager.queue.isLoading() && m(LoadingIndicator, {\n size: \"large\"\n })), m(Pagination, {\n total: app.extensionManager.queue.getTotalItems(),\n currentPage: app.extensionManager.queue.pageNumber() + 1,\n perPage: app.extensionManager.queue.getPerPage(),\n onChange: page => app.extensionManager.queue.goto(page)\n }));\n }\n operationIcon(operation) {\n return m(Icon, {\n name: {\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}\nflarum.reg.add('flarum-extension-manager', 'admin/components/QueueSection', QueueSection);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/Stream');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\nexport default class Installer extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"packageName\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.packageName = Stream('');\n }\n view() {\n return m(\"div\", {\n className: \"Form-group ExtensionManager-installer\"\n }, m(\"label\", {\n htmlFor: \"install-extension\"\n }, app.translator.trans('flarum-extension-manager.admin.extensions.install')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.extensions.install_help', {\n link: m(\"a\", {\n href: \"https://flarum.org/extensions\"\n }, \"flarum.org\"),\n semantic_link: m(\"a\", {\n href: \"https://devhints.io/semver\"\n }),\n code: m(\"code\", null)\n })), m(\"div\", {\n className: \"FormControl-container\"\n }, m(\"input\", {\n className: \"FormControl\",\n id: \"install-extension\",\n placeholder: \"vendor/package-name\",\n bidi: this.packageName\n }), m(Button, {\n className: \"Button\",\n icon: \"fas fa-download\",\n onclick: this.onsubmit.bind(this),\n loading: app.extensionManager.control.isLoading('extension-install'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.extensions.proceed'))));\n }\n data() {\n return {\n package: this.packageName()\n };\n }\n onsubmit() {\n app.extensionManager.control.requirePackage(this.data());\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Installer', Installer);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport errorHandler from '../utils/errorHandler';\nexport default class WhyNotModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"loading\", true);\n _defineProperty(this, \"whyNot\", null);\n }\n className() {\n return 'Modal--large WhyNotModal';\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.why_not_modal.title');\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n this.requestWhyNot();\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, this.loading ? m(LoadingIndicator, null) : m(\"pre\", {\n className: \"WhyNotModal-contents\"\n }, this.whyNot));\n }\n requestWhyNot() {\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package\n }\n }\n }).then(response => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n }).catch(errorHandler);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/WhyNotModal', WhyNotModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/formatAmount');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","export let VersionStability = /*#__PURE__*/function (VersionStability) {\n VersionStability[\"Stable\"] = \"stable\";\n VersionStability[\"Alpha\"] = \"alpha\";\n VersionStability[\"Beta\"] = \"beta\";\n VersionStability[\"RC\"] = \"rc\";\n VersionStability[\"Dev\"] = \"dev\";\n return VersionStability;\n}({});\nexport function isProductionReady(version) {\n return [VersionStability.Stable, VersionStability.RC].includes(stability(version));\n}\nexport function stability(version) {\n const split = version.split('-');\n if (split.length === 1) {\n return VersionStability.Stable;\n }\n const stab = split[1].split('.')[0].toLowerCase();\n switch (stab) {\n case 'alpha':\n return VersionStability.Alpha;\n case 'beta':\n return VersionStability.Beta;\n case 'rc':\n return VersionStability.RC;\n default:\n return VersionStability.Dev;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/versions', { VersionStability: VersionStability,isProductionReady: isProductionReady,stability: stability, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Model from 'flarum/common/Model';\nimport app from 'flarum/admin/app';\nimport { isProductionReady } from '../utils/versions';\nexport default class ExternalExtension extends Model {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"extensionId\", Model.attribute('extensionId'));\n _defineProperty(this, \"name\", Model.attribute('name'));\n _defineProperty(this, \"title\", Model.attribute('title'));\n _defineProperty(this, \"description\", Model.attribute('description'));\n _defineProperty(this, \"iconUrl\", Model.attribute('iconUrl'));\n _defineProperty(this, \"icon\", Model.attribute('icon'));\n _defineProperty(this, \"highestVersion\", Model.attribute('highestVersion'));\n _defineProperty(this, \"httpUri\", Model.attribute('httpUri'));\n _defineProperty(this, \"discussUri\", Model.attribute('discussUri'));\n _defineProperty(this, \"vendor\", Model.attribute('vendor'));\n _defineProperty(this, \"isPremium\", Model.attribute('isPremium'));\n _defineProperty(this, \"isLocale\", Model.attribute('isLocale'));\n _defineProperty(this, \"locale\", Model.attribute('locale'));\n _defineProperty(this, \"latestFlarumVersionSupported\", Model.attribute('latestFlarumVersionSupported'));\n _defineProperty(this, \"downloads\", Model.attribute('downloads'));\n _defineProperty(this, \"installed\", false);\n }\n isSupported() {\n const currentVersion = app.data.settings.version;\n const latestCompatibleVersion = this.latestFlarumVersionSupported();\n\n // If stability is not the same, it's not compatible.\n if (currentVersion.split('-')[1] !== latestCompatibleVersion.split('-')[1]) {\n return false;\n }\n\n // Minor versions are compatible.\n return currentVersion.split('.')[0] === latestCompatibleVersion.split('.')[0];\n }\n isProductionReady() {\n return isProductionReady(this.highestVersion());\n }\n toLocalExtension() {\n return {\n id: this.extensionId(),\n name: this.name(),\n version: this.highestVersion(),\n description: this.description(),\n icon: this.icon() || {\n name: 'fas fa-box-open',\n backgroundColor: '#117187',\n color: '#fff'\n },\n links: {\n discuss: this.discussUri(),\n website: this.httpUri()\n },\n extra: {\n 'flarum-extension': {\n title: this.title()\n }\n }\n };\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/models/ExternalExtension', ExternalExtension);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Component from 'flarum/common/Component';\nimport Icon from 'flarum/common/components/Icon';\nimport Badge from 'flarum/common/components/Badge';\nimport app from 'flarum/admin/app';\nimport Button from 'flarum/common/components/Button';\nimport formatAmount from 'flarum/common/utils/formatAmount';\nimport ExternalExtension from '../models/ExternalExtension';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport Label from './Label';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport WhyNotModal from './WhyNotModal';\nimport LinkButton from 'flarum/common/components/LinkButton';\nexport default class ExtensionCard extends Component {\n getExtension() {\n return this.attrs.extension instanceof ExternalExtension ? this.attrs.extension.toLocalExtension() : this.attrs.extension;\n }\n view() {\n const extension = this.getExtension();\n const {\n isCore,\n isDanger\n } = this.attrs;\n return m(\"div\", {\n className: classList('ExtensionCard', {\n 'ExtensionCard--core': isCore,\n 'ExtensionCard--danger': isDanger\n })\n }, m(\"div\", {\n className: \"ExtensionCard-header\"\n }, this.icon(), m(Tooltip, {\n text: extension.name\n }, m(\"h4\", null, extension.extra['flarum-extension'].title)), this.attrs.extension instanceof ExternalExtension && m(\"div\", {\n className: \"ExtensionCard-badges\"\n }, this.badges().toArray()), m(\"div\", {\n className: \"ExtensionCard-actions\"\n }, this.actionItems().toArray())), m(\"div\", {\n className: \"ExtensionCard-body\"\n }, m(\"p\", null, extension.description)), m(\"div\", {\n className: \"ExtensionCard-footer\"\n }, m(\"div\", {\n className: \"ExtensionCard-meta\"\n }, this.metaItems().toArray())));\n }\n icon() {\n const extension = this.getExtension();\n if (this.attrs.extension instanceof ExternalExtension && extension.id in app.data.extensions) {\n extension.icon = app.data.extensions[extension.id].icon;\n }\n const style = extension.icon || {};\n if (!extension.icon?.name && this.attrs.extension instanceof ExternalExtension && !(extension.id in app.data.extensions) && this.attrs.extension.iconUrl()) {\n style.backgroundImage = `url(${this.attrs.extension.iconUrl()})`;\n }\n return m(\"span\", {\n className: \"ExtensionIcon\",\n style: extension.icon\n }, extension.icon?.name ? m(Icon, {\n name: extension.icon.name\n }) : null);\n }\n badges() {\n const items = new ItemList();\n const extension = this.attrs.extension;\n if (extension.isSupported()) {\n items.add('compatible', m(Badge, {\n icon: \"fas fa-check\",\n type: \"success\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.compatible'),\n className: \"Badge--flat Badge--square\"\n }));\n } else {\n items.add('incompatible', m(Badge, {\n icon: \"fas fa-times\",\n type: \"danger\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.incompatible'),\n className: \"Badge--flat Badge--square\"\n }));\n }\n if (extension.isPremium()) {\n items.add('premium', m(Badge, {\n icon: \"fas fa-dollar-sign\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.premium'),\n className: \"ExtensionCard-badge--premium Badge--flat Badge--square\"\n }));\n }\n if (!extension.isProductionReady()) {\n items.add('unstable', m(Badge, {\n icon: \"fas fa-flask\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.unstable'),\n className: \"Badge--flat Badge--square Badge--danger\"\n }));\n }\n if (extension.name().split('/')[0] === 'fof') {\n items.add('fof', m(Badge, {\n icon: \"fas fa-users\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.fof'),\n className: \"Badge--flat Badge--square\"\n }));\n }\n if (extension.name().split('/')[0] === 'flarum') {\n items.add('flarum', m(Badge, {\n icon: \"fab fa-flarum\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.flarum'),\n className: \"ExtensionCard-badge--flarum Badge--flat Badge--square\"\n }));\n }\n return items;\n }\n metaItems() {\n const items = new ItemList();\n const {\n updates,\n isCore\n } = this.attrs;\n const latestVersion = updates ? updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null) : null;\n if (this.attrs.extension instanceof ExternalExtension) {\n items.add('downloads', m(\"span\", null, m(Icon, {\n name: \"fas fa-circle-down\"\n }), app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.downloads', {\n count: this.attrs.extension.downloads(),\n formattedCount: formatAmount(this.attrs.extension.downloads())\n })));\n } else {\n items.add('version', m(\"div\", {\n className: \"ExtensionCard-version\"\n }, m(\"span\", {\n className: \"ExtensionCard-version-current\"\n }, this.version(updates['version'])), latestVersion ? m('[', null, m(Icon, {\n name: \"fas fa-arrow-right\"\n }), m(Label, {\n className: \"ExtensionCard-version-latest\",\n type: updates['latest-minor'] ? 'success' : 'warning'\n }, this.version(latestVersion))) : null));\n }\n if (this.attrs.extension instanceof ExternalExtension) {\n items.add('version', m(\"div\", {\n className: \"ExtensionCard-version\"\n }, \"v\", this.version(this.attrs.extension.highestVersion())));\n items.add('link', m(LinkButton, {\n className: \"Button Button--ua-reset Button--link Button--icon\",\n href: this.attrs.extension.httpUri(),\n target: \"_blank\",\n icon: \"fas fa-external-link-alt\",\n external: true\n }));\n }\n return items;\n }\n actionItems() {\n const items = new ItemList();\n const {\n updates,\n extension,\n onClickUpdate,\n whyNotWarning\n } = this.attrs;\n if (extension instanceof ExternalExtension) {\n if (!(extension.extensionId() in app.data.extensions)) {\n items.add('install', m(Button, {\n className: \"Button Button--icon Button--flat\",\n icon: \"fas fa-cloud-arrow-down\",\n onclick: () => {\n app.extensionManager.control.requirePackage({\n package: extension.name()\n });\n }\n }));\n } else {\n items.add('installed', m(Button, {\n className: \"Button Button--icon Button--flat Button--success\",\n icon: \"fas fa-check-circle\",\n disabled: true\n }));\n }\n } else {\n if (onClickUpdate && typeof onClickUpdate === 'function') {\n items.add('update', m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.extensions.update')\n }, m(Button, {\n icon: \"fas fa-cloud-arrow-down\",\n className: \"Button Button--icon Button--flat\",\n onclick: onClickUpdate,\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.extensions.update')\n })));\n } else if (onClickUpdate) {\n items.add('update', m(Dropdown, {\n buttonClassName: \"Button Button--icon Button--flat\",\n icon: \"fas fa-ellipsis\",\n label: app.translator.trans('flarum-extension-manager.admin.extensions.update')\n }, m(Button, {\n icon: \"fas fa-cloud-arrow-down\",\n onclick: onClickUpdate.soft\n }, app.translator.trans('flarum-extension-manager.admin.extensions.update_soft_label')), m(Button, {\n icon: \"fas fa-rotate\",\n onclick: onClickUpdate.hard,\n disabled: !updates['direct-dependency']\n }, app.translator.trans('flarum-extension-manager.admin.extensions.update_hard_label'))));\n }\n if (whyNotWarning) items.add('whyNot', m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')\n }, m(Button, {\n icon: \"fas fa-exclamation-circle\",\n className: \"Button Button--icon Button--flat Button--danger\",\n onclick: () => app.modal.show(WhyNotModal, {\n package: extension.name\n }),\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')\n })));\n }\n return items;\n }\n version(v) {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ExtensionCard', ExtensionCard);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionCard from './ExtensionCard';\nimport classList from 'flarum/common/utils/classList';\nexport default class MajorUpdater extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"updateState\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.updateState = this.attrs.updateState;\n }\n view() {\n return m(\"div\", {\n className: classList('Form-group Form-group--danger ExtensionManager-majorUpdate', {\n 'ExtensionManager-majorUpdate--failed': this.updateState.status === 'failure',\n 'ExtensionManager-majorUpdate--incompatibleExtensions': this.updateState.incompatibleExtensions.length\n })\n }, m(\"img\", {\n alt: \"flarum logo\",\n src: app.forum.attribute('baseUrl') + '/assets/extensions/flarum-extension-manager/flarum.svg'\n }), m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.major_updater.title', {\n version: this.attrs.coreUpdate['latest-major']\n })), m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.description')), m(\"div\", {\n className: \"ExtensionManager-updaterControls\"\n }, m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run_help')\n }, m(Button, {\n className: \"Button\",\n icon: \"fas fa-vial\",\n onclick: this.update.bind(this, true),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run'))), m(Button, {\n className: \"Button Button--danger\",\n icon: \"fas fa-play\",\n onclick: this.update.bind(this, false),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.update'))), this.updateState.incompatibleExtensions.length ? m(\"div\", {\n className: \"ExtensionManager-majorUpdate-incompatibleExtensions ExtensionManager-extensions-grid\"\n }, this.updateState.incompatibleExtensions.map(extension => m(ExtensionCard, {\n extension: app.data.extensions[extension.replace('flarum-', '').replace('flarum-ext-', '').replace('/', '-')],\n updates: {},\n onClickUpdate: null,\n isDanger: true\n }))) : null, this.updateState.status === 'failure' ? m(Alert, {\n type: \"error\",\n className: \"ExtensionManager-majorUpdate-failure\",\n dismissible: false,\n controls: [m(Button, {\n className: \"Button Button--text ExtensionManager-majorUpdate-failure-details\",\n icon: \"fas fa-question-circle\",\n onclick: () => app.modal.show(WhyNotModal, {\n package: 'flarum/core'\n })\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.failure.why'))]\n }, m(\"p\", {\n className: \"ExtensionManager-majorUpdate-failure-desc\"\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.failure.desc'))) : null);\n }\n update(dryRun) {\n app.extensionManager.control.majorUpdate({\n dryRun\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/MajorUpdater', MajorUpdater);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/InfoTile');","import app from 'flarum/admin/app';\nimport Component 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 ItemList from 'flarum/common/utils/ItemList';\nimport InfoTile from 'flarum/common/components/InfoTile';\nimport ExtensionCard from './ExtensionCard';\nimport { isProductionReady } from '../utils/versions';\nexport default class Updater extends Component {\n view() {\n const core = app.extensionManager.control.coreUpdate;\n return [m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.updater.updater_title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.updater_help')), this.lastUpdateCheckView(), m(\"div\", {\n className: \"ExtensionManager-updaterControls\"\n }, this.controlItems().toArray()), this.availableUpdatesView()), core && core.package['latest-major'] && isProductionReady(core.package['latest-major']) ? m(MajorUpdater, {\n coreUpdate: core.package,\n updateState: app.extensionManager.control.lastUpdateRun.major\n }) : null];\n }\n lastUpdateCheckView() {\n return app.extensionManager.control.lastUpdateCheck?.checkedAt && m(\"p\", {\n className: \"ExtensionManager-lastUpdatedAt\"\n }, m(\"span\", {\n className: \"ExtensionManager-lastUpdatedAt-label\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.last_update_checked_at')), m(\"span\", {\n className: \"ExtensionManager-lastUpdatedAt-value\"\n }, humanTime(app.extensionManager.control.lastUpdateCheck.checkedAt))) || null;\n }\n availableUpdatesView() {\n const state = app.extensionManager.control;\n if (app.extensionManager.control.isLoading('check') || app.extensionManager.control.isLoading('global-update')) {\n return m(\"div\", {\n className: \"ExtensionManager-extensions\"\n }, m(LoadingIndicator, null));\n }\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return m(\"div\", {\n className: \"ExtensionManager-extensions ExtensionManager-extensions--empty\"\n }, m(InfoTile, {\n icon: \"fas fa-plug-circle-check\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.up_to_date')));\n }\n return m(\"div\", {\n className: \"ExtensionManager-extensions\"\n }, m(\"div\", {\n className: \"ExtensionManager-extensions-grid\"\n }, hasMinorCoreUpdate ? m(ExtensionCard, {\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 }) : null, state.extensionUpdates.map(extension => m(ExtensionCard, {\n extension: extension,\n updates: state.packageUpdates[extension.id],\n onClickUpdate: {\n soft: () => state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard')\n },\n whyNotWarning: state.lastUpdateRun.limitedPackages().includes(extension.name)\n }))));\n }\n controlItems() {\n const items = new ItemList();\n items.add('updateCheck', m(Button, {\n className: \"Button\",\n icon: \"fas fa-sync-alt\",\n onclick: () => app.extensionManager.control.checkForUpdates(),\n loading: app.extensionManager.control.isLoading('check'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.updater.check_for_updates')), 100);\n items.add('globalUpdate', m(Button, {\n className: \"Button\",\n icon: \"fas fa-play\",\n onclick: () => app.extensionManager.control.updateGlobally(),\n loading: app.extensionManager.control.isLoading('global-update'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.updater.run_global_update')));\n return items;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Updater', Updater);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import Component from 'flarum/common/Component';\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Form from 'flarum/common/components/Form';\nexport default class ControlSection extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n }\n view() {\n return m(\"div\", {\n className: \"ExtensionPage-settings ExtensionManager-controlSection\"\n }, m(\"div\", {\n className: \"container\"\n }, m(Form, null, m(Installer, null), m(Updater, null))));\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ControlSection', ControlSection);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FormGroup');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport FormGroup from 'flarum/common/components/FormGroup';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nexport default class ConfigureJson extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"settings\", {});\n _defineProperty(this, \"initialSettings\", null);\n _defineProperty(this, \"loading\", false);\n _defineProperty(this, \"type\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.submit(true);\n }\n className() {\n return '';\n }\n view() {\n return m(\"div\", {\n className: classList('FormSection', this.className())\n }, m(\"label\", null, this.title()), this.content(), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, this.submitButton()));\n }\n submitButton() {\n return [m(Button, {\n className: \"Button Button--primary\",\n loading: this.loading,\n onclick: () => this.submit(false),\n disabled: !this.isDirty()\n }, app.translator.trans('core.admin.settings.submit_button'))];\n }\n customSettingComponents() {\n return FormGroup.prototype.customFieldComponents();\n }\n setting(key) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n submit(readOnly) {\n this.loading = true;\n const configuration = {};\n Object.keys(this.settings).forEach(key => {\n configuration[key] = this.settings[key]();\n });\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/extension-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration\n }\n }).then(_ref => {\n let {\n data\n } = _ref;\n Object.keys(data).forEach(key => {\n this.settings[key] = Stream(data[key]);\n });\n this.initialSettings = Array.isArray(data) ? {} : data;\n }).finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureJson', ConfigureJson);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Select');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Modal from 'flarum/common/components/Modal';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport Form from 'flarum/common/components/Form';\nexport default class RepositoryModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"name\", void 0);\n _defineProperty(this, \"repository\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || {\n type: 'composer',\n url: ''\n });\n }\n className() {\n return 'RepositoryModal Modal--small';\n }\n title() {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.composer.${context}_repository_label`);\n }\n content() {\n const types = {\n composer: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.path')\n };\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.name_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.name\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.type_label')), m(Select, {\n options: types,\n value: this.repository().type,\n onchange: value => this.repository({\n ...this.repository(),\n type: value\n })\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.url')), m(\"input\", {\n className: \"FormControl\",\n onchange: e => this.repository({\n ...this.repository(),\n url: e.target.value\n }),\n value: this.repository().url\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary\",\n onclick: this.submit.bind(this)\n }, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.submit_button')))));\n }\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/RepositoryModal', RepositoryModal);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport ConfigureJson from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\nexport default class ConfigureComposer extends ConfigureJson {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", 'composer');\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.composer.title');\n }\n className() {\n return 'ConfigureComposer';\n }\n content() {\n return m(\"div\", {\n className: \"Form ExtensionManager-SettingsGroups-content\"\n }, this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.dev')\n }\n }), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.label')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.composer.repositories.help')), m(\"div\", {\n className: \"ConfigureComposer-repositories\"\n }, Object.keys(this.setting('repositories')() || {}).map(name => {\n const repository = this.setting('repositories')()[name];\n return m(\"div\", {\n className: \"ButtonGroup ButtonGroup--full\"\n }, m(Button, {\n className: \"Button\",\n icon: {\n composer: 'fas fa-cubes',\n vcs: 'fas fa-code-branch',\n path: 'fas fa-folder'\n }[repository.type],\n onclick: () => app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: (repository, newName) => {\n const repositories = this.setting('repositories')();\n delete repositories[name];\n this.setting('repositories')(repositories);\n this.onchange(repository, newName);\n }\n })\n }, name, \" (\", repository.type, \")\"), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-trash\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_label'),\n onclick: () => {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = {\n ...this.setting('repositories')()\n };\n delete repositories[name];\n this.setting('repositories')(repositories);\n }\n }\n }));\n }))));\n }\n submitButton() {\n const items = super.submitButton();\n items.push(m(Button, {\n className: \"Button\",\n onclick: () => app.modal.show(RepositoryModal, {\n onsubmit: this.onchange.bind(this)\n })\n }, app.translator.trans('flarum-extension-manager.admin.composer.add_repository_label')));\n return items;\n }\n onchange(repository, name) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureComposer', ConfigureComposer);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Modal from 'flarum/common/components/Modal';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport Form from 'flarum/common/components/Form';\nexport default class AuthMethodModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", void 0);\n _defineProperty(this, \"host\", void 0);\n _defineProperty(this, \"token\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n className() {\n return 'AuthMethodModal Modal--small';\n }\n title() {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.auth_config.${context}_label`);\n }\n content() {\n const types = {\n 'github-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-extension-manager.admin.auth_config.types.bearer')\n };\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.type_label')), m(Select, {\n options: types,\n value: this.type(),\n onchange: this.type\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.host_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.host,\n placeholder: app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.host_placeholder')\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.token_label')), m(\"textarea\", {\n className: \"FormControl\",\n oninput: e => this.token(e.target.value),\n rows: \"6\",\n placeholder: this.token().startsWith('unchanged:') ? extractText(app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.unchanged_token_placeholder')) : ''\n }, this.token().startsWith('unchanged:') ? '' : this.token())), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary\",\n onclick: this.submit.bind(this)\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.submit_button')))));\n }\n submit() {\n this.attrs.onsubmit(this.type(), this.host(), this.token());\n this.hide();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/AuthMethodModal', AuthMethodModal);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport ConfigureJson from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport AuthMethodModal from './AuthMethodModal';\nimport extractText from 'flarum/common/utils/extractText';\nexport default class ConfigureAuth extends ConfigureJson {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", 'auth');\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.auth_config.title');\n }\n className() {\n return 'ConfigureAuth';\n }\n content() {\n const authSettings = Object.keys(this.settings);\n const hasAuthSettings = authSettings.length && authSettings.every(type => {\n const data = this.settings[type]();\n return Array.isArray(data) ? data.length : Object.keys(data).length;\n });\n return m(\"div\", {\n className: \"ExtensionManager-SettingsGroups-content\"\n }, hasAuthSettings ? authSettings.map(type => {\n const hosts = this.settings[type]();\n return m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans(`flarum-extension-manager.admin.auth_config.types.${type}`)), m(\"div\", {\n className: \"ConfigureAuth-hosts\"\n }, Object.keys(hosts).map(host => {\n const data = hosts[host];\n return m(\"div\", {\n className: \"ButtonGroup ButtonGroup--full\"\n }, m(Button, {\n className: \"Button\",\n icon: \"fas fa-key\",\n onclick: () => app.modal.show(AuthMethodModal, {\n type,\n host,\n token: data,\n onsubmit: this.onchange.bind(this, host)\n })\n }, host), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-trash\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.auth_config.delete_label'),\n onclick: () => {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.auth_config.delete_confirmation')))) {\n const newType = {\n ...this.setting(type)()\n };\n delete newType[host];\n if (Object.keys(newType).length) {\n this.setting(type)(newType);\n } else {\n delete this.settings[type];\n }\n }\n }\n }));\n })));\n }) : m(\"span\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.no_auth_methods_configured')));\n }\n submitButton() {\n const items = super.submitButton();\n items.push(m(Button, {\n className: \"Button\",\n loading: this.loading,\n onclick: () => app.modal.show(AuthMethodModal, {\n onsubmit: this.onchange.bind(this, null)\n })\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.add_label')));\n return items;\n }\n onchange(oldHost, type, host, token) {\n const data = {\n ...this.setting(type)()\n };\n if (oldHost) {\n delete data[oldHost];\n }\n data[host] = token;\n this.setting(type)(data);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureAuth', ConfigureAuth);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Input');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/listItems');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Form from 'flarum/common/components/Form';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Input from 'flarum/common/components/Input';\nimport Stream from 'flarum/common/utils/Stream';\nimport Alert from 'flarum/common/components/Alert';\nimport listItems from 'flarum/common/helpers/listItems';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport ExtensionCard from './ExtensionCard';\nimport Pagination from 'flarum/common/components/Pagination';\nimport InfoTile from 'flarum/common/components/InfoTile';\nimport classList from 'flarum/common/utils/classList';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nexport default class DiscoverSection extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"search\", Stream(''));\n _defineProperty(this, \"warningsDismissed\", Stream(false));\n _defineProperty(this, \"applySearch\", throttle(1200, value => {\n const params = app.extensionManager.extensions.getParams();\n app.extensionManager.extensions.refreshParams({\n ...params,\n filter: {\n ...params.filter,\n q: value\n }\n }, 1);\n }));\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.extensionManager.extensions.goto(1);\n this.warningsDismissed(localStorage.getItem('flarum-extension-manager.warningsDismissed') === 'true');\n }\n load(page) {\n if (page === void 0) {\n page = 1;\n }\n app.extensionManager.extensions.goto(page);\n }\n view() {\n return m(\"div\", {\n className: \"ExtensionPage-settings ExtensionManager-DiscoverSection\"\n }, m(\"div\", {\n className: \"container\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.discover.title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.description'), this.warningsDismissed() && m(Button, {\n className: \"Button Button--text Button--warning Button--more\",\n icon: \"fas fa-exclamation-triangle\",\n onclick: () => this.setWarningDismissed(false)\n }))), !this.warningsDismissed() && m(\"div\", {\n className: \"ExtensionManager-warnings Form-group\"\n }, m(Alert, {\n className: \"ExtensionManager-primaryWarning\",\n type: \"warning\",\n dismissible: true,\n ondismiss: () => this.setWarningDismissed(true)\n }, m(\"ul\", null, listItems(this.warningItems().toArray())))), m(\"div\", {\n className: \"Tabs\"\n }, m(\"div\", {\n className: \"Tabs-nav\"\n }, this.tabItems().toArray()), m(\"div\", {\n className: \"Tabs-content\"\n }, m(\"hr\", {\n className: \"Tabs-divider\"\n }), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar\"\n }, m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar-primary\"\n }, this.toolbarPrimaryItems().toArray()), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar-secondary\"\n }, this.toolbarSecondaryItems().toArray())), this.extensionList(), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-footer\"\n }, this.footerItems().toArray()))))));\n }\n tabFilters() {\n return {\n '': {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.discover'),\n active: () => !app.extensionManager.extensions.getParams().filter?.type\n },\n extension: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.extensions'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'extension'\n },\n locale: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.languages'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'locale'\n },\n theme: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.themes'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'theme'\n }\n };\n }\n tabItems() {\n const items = new ItemList();\n const tabs = this.tabFilters();\n Object.keys(tabs).forEach(key => {\n const tab = tabs[key];\n items.add(key, m(Button, {\n className: \"Button Button--link\",\n active: tab.active(),\n onclick: () => {\n app.extensionManager.extensions.changeFilter('type', key);\n }\n }, tab.label));\n });\n return items;\n }\n warningItems() {\n const items = new ItemList();\n items.add('accessWarning', app.translator.trans('flarum-extension-manager.admin.settings.access_warning'));\n if (app.data.debugEnabled) {\n items.add('devModeWarning', app.translator.trans('flarum-extension-manager.admin.settings.debug_mode_warning'));\n }\n return items;\n }\n toolbarPrimaryItems() {\n const items = new ItemList();\n items.add('search', m(Input, {\n value: this.search(),\n onchange: value => {\n this.search(value);\n this.applySearch(value);\n },\n inputAttrs: {\n className: 'FormControl-alt'\n },\n clearable: true,\n placeholder: app.translator.trans('flarum-extension-manager.admin.sections.discover.search'),\n prefixIcon: \"fas fa-search\"\n }));\n return items;\n }\n toolbarSecondaryItems() {\n const items = new ItemList();\n const sortMap = app.extensionManager.extensions.sortMap();\n const sortOptions = Object.keys(sortMap).reduce((acc, sortId) => {\n const sort = sortMap[sortId];\n acc[sortId] = typeof sort !== 'string' ? sort.label : sort;\n return acc;\n }, {});\n items.add('sort', m(Dropdown, {\n buttonClassName: \"Button\",\n label: sortOptions[app.extensionManager.extensions.getParams().sort] || Object.keys(sortMap).map(key => sortOptions[key])[0],\n accessibleToggleLabel: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.toggle_dropdown_accessible_label')\n }, Object.keys(sortOptions).map(value => {\n const label = sortOptions[value];\n const active = app.extensionManager.extensions.getParams().sort === value;\n return m(Button, {\n icon: active ? 'fas fa-check' : true,\n onclick: () => app.extensionManager.extensions.changeSort(value),\n active: active\n }, label);\n })));\n const is = app.extensionManager.extensions.getParams().filter?.is?.[0] ?? null;\n const activeType = is || 'all';\n items.add('party', m(Dropdown, {\n buttonClassName: \"Button\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.' + activeType),\n accessibleToggleLabel: app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.toggle_dropdown_accessible_label')\n }, ['all', 'premium'].map(party => m(Button, {\n icon: activeType === party ? 'fas fa-check' : true,\n onclick: () => {\n app.extensionManager.extensions.changeFilter('is', party === 'all' ? undefined : [party]);\n },\n active: activeType === party\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.' + party)))));\n return items;\n }\n extensionList() {\n if (!app.extensionManager.extensions.hasItems() && app.extensionManager.extensions.isLoading()) {\n return m(LoadingIndicator, {\n display: \"block\"\n });\n }\n if (!app.extensionManager.extensions.hasItems()) {\n return m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-list ExtensionManager-DiscoverSection-list--empty\"\n }, m(InfoTile, {\n icon: \"fas fa-plug-circle-exclamation\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.empty_results')));\n }\n return m(\"div\", {\n className: classList('ExtensionManager-DiscoverSection-list', {\n 'loading-container': app.extensionManager.extensions.isLoading()\n })\n }, m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-list-inner\"\n }, app.extensionManager.extensions.getPages().map(page => page.items.map(extension => m(ExtensionCard, {\n extension: extension,\n key: extension.name()\n })))), app.extensionManager.extensions.hasItems() && app.extensionManager.extensions.isLoading() && m(LoadingIndicator, {\n size: \"large\"\n }));\n }\n footerItems() {\n const items = new ItemList();\n items.add('pagination', m(Pagination, {\n total: app.extensionManager.extensions.totalItems,\n perPage: app.extensionManager.extensions.pageSize,\n currentPage: app.extensionManager.extensions.getLocation().page,\n onChange: page => {\n const current = app.extensionManager.extensions.getLocation().page;\n if (current === page) {\n return;\n }\n this.load(page);\n }\n }));\n items.add('premiumTermsLink', m(LinkButton, {\n className: \"Button Button--link\",\n href: \"https://flarum.org/terms/premium-extensions\",\n external: true,\n target: \"_blank\",\n icon: \"fas fa-circle-info\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.premium_extension_terms')));\n return items;\n }\n setWarningDismissed(dismissed) {\n this.warningsDismissed(dismissed);\n localStorage.setItem('flarum-extension-manager.warningsDismissed', dismissed ? 'true' : 'false');\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/DiscoverSection', DiscoverSection);","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport QueueSection from './QueueSection';\nimport ControlSection from './ControlSection';\nimport ConfigureComposer from './ConfigureComposer';\nimport ConfigureAuth from './ConfigureAuth';\nimport DiscoverSection from './DiscoverSection';\nimport Alert from 'flarum/common/components/Alert';\nexport default class SettingsPage extends ExtensionPage {\n content() {\n const settings = app.registry.getSettings(this.extension.id);\n return m(\"div\", {\n className: \"ExtensionPage-settings\"\n }, m(\"div\", {\n className: \"container\"\n }, settings ? [m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.settings.title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.settings.description'))), m(\"div\", {\n className: \"FormSectionGroup ExtensionManager-SettingsGroups\"\n }, m(\"div\", {\n className: \"FormSection\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.settings.title')), m(\"div\", {\n className: \"Form\"\n }, settings.map(this.buildSettingComponent.bind(this))), m(\"div\", {\n className: \"Form-group Form--controls\"\n }, this.submitButton())), m(ConfigureComposer, {\n buildSettingComponent: this.buildSettingComponent\n }), m(ConfigureAuth, {\n buildSettingComponent: this.buildSettingComponent\n }))] : m(\"h3\", {\n className: \"ExtensionPage-subHeader\"\n }, app.translator.trans('core.admin.extension.no_settings'))));\n }\n sections(vnode) {\n const items = super.sections(vnode);\n const writableDirs = app.data['flarum-extension-manager.writable_dirs'];\n const missingFunctions = app.data['flarum-extension-manager.missing_functions'];\n const usable = writableDirs && (!missingFunctions || missingFunctions.length === 0);\n if (usable) {\n items.add('discover', m(DiscoverSection, null), 15);\n items.add('control', m(ControlSection, null), 10);\n } else {\n items.add('warning', m(\"div\", {\n className: \"ExtensionPage-settings\"\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n type: \"error\",\n dismissible: false\n }, !app.data['flarum-extension-manager.writable_dirs'] ? app.translator.trans('flarum-extension-manager.admin.file_permissions') : app.translator.trans('flarum-extension-manager.admin.required_php_functions', {\n functions: app.data['flarum-extension-manager.missing_functions'].join(', ')\n }))))), 10);\n }\n items.setPriority('content', 8);\n if (app.data.settings['flarum-extension-manager.queue_jobs'] !== '0' && app.data.settings['flarum-extension-manager.queue_jobs']) {\n items.add('queue', m(QueueSection, null), 5);\n }\n items.remove('permissions');\n return items;\n }\n onsaved() {\n super.onsaved();\n m.redraw();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/SettingsPage', SettingsPage);","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\tspace: true,\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\tconst separator = options.space ? ' ' : '';\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0${separator}${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 + separator + 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 + separator + unit;\n}\n","import Model from 'flarum/common/Model';\nimport prettyBytes from 'pretty-bytes';\nexport default class Task extends Model {\n status() {\n return Model.attribute('status').call(this);\n }\n operation() {\n return Model.attribute('operation').call(this);\n }\n command() {\n return Model.attribute('command').call(this);\n }\n package() {\n return Model.attribute('package').call(this);\n }\n output() {\n return Model.attribute('output').call(this);\n }\n guessedCause() {\n return Model.attribute('guessedCause').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n startedAt() {\n return Model.attribute('startedAt', Model.transformDate).call(this);\n }\n finishedAt() {\n return Model.attribute('finishedAt', Model.transformDate).call(this);\n }\n peakMemoryUsed() {\n return prettyBytes(Model.attribute('peakMemoryUsed').call(this) * 1024);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/models/Task', Task);","import Extend from 'flarum/common/extenders';\nimport app from 'flarum/admin/app';\nimport SettingsPage from './components/SettingsPage';\nimport Task from './models/Task';\nimport ExternalExtension from './models/ExternalExtension';\nexport default [new Extend.Store() //\n.add('extension-manager-tasks', Task).add('external-extensions', ExternalExtension), new Extend.Admin().setting(() => ({\n setting: 'flarum-extension-manager.queue_jobs',\n label: app.translator.trans('flarum-extension-manager.admin.settings.queue_jobs'),\n help: app.translator.trans('flarum-extension-manager.admin.settings.queue_jobs_help', {\n basic_impl_link: m(\"a\", {\n href: \"https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting\"\n }),\n adv_impl_link: m(\"a\", {\n href: \"https://discuss.flarum.org/d/21873-redis-sessions-cache-queues\"\n }),\n php_version: m(\"strong\", null, app.data.phpVersion),\n folder_perms_link: m(\"a\", {\n href: \"https://docs.flarum.org/install#folder-ownership\"\n })\n }),\n type: 'boolean',\n disabled: app.data['flarum-extension-manager.using_sync_queue']\n})).setting(() => ({\n setting: 'flarum-extension-manager.task_retention_days',\n label: app.translator.trans('flarum-extension-manager.admin.settings.task_retention_days'),\n help: app.translator.trans('flarum-extension-manager.admin.settings.task_retention_days_help'),\n type: 'number'\n})).page(SettingsPage).generalIndexItems('settings', () => [{\n id: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help', {}, true)\n}, {\n id: 'repositories',\n label: app.translator.trans('flarum-extension-manager.admin.composer.repositories.label', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.composer.repositories.help', {}, true)\n}, {\n id: 'composer-auth',\n label: app.translator.trans('flarum-extension-manager.admin.auth_config.title', {}, true)\n}, {\n id: 'updates',\n label: app.translator.trans('flarum-extension-manager.admin.updater.updater_title', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.updater.updater_help', {}, true)\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 jumpToQueue from './utils/jumpToQueue';\nimport ExtensionManagerState from './states/ExtensionManagerState';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-extension-manager', app => {\n app.extensionManager = new ExtensionManagerState();\n if (app.data['flarum-extension-manager.using_sync_queue']) {\n app.data.settings['flarum-extension-manager.queue_jobs'] = '0';\n }\n extend(ExtensionPage.prototype, 'topItems', function (items) {\n if (this.extension.id === 'flarum-extension-manager' || isExtensionEnabled(this.extension.id)) {\n return;\n }\n items.add('remove', m(Button, {\n className: \"Button Button--danger\",\n icon: \"fas fa-times\",\n onclick: () => {\n app.modal.show(LoadingModal);\n app.request({\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions/${this.extension.id}`,\n method: 'DELETE'\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.extensions.successful_remove'));\n window.location = app.forum.attribute('adminUrl');\n }\n }).finally(() => {\n app.modal.close();\n });\n }\n }, app.translator.trans('flarum-extension-manager.admin.extensions.remove')));\n });\n});"],"names":["module","exports","t","s","n","i","e","r","o","u","d","a","h","years","months","days","hours","minutes","seconds","milliseconds","weeks","c","g","f","$l","m","p","l","$","Math","ceil","floor","y","abs","v","negative","format","this","$d","$ms","parseFromMilliseconds","Object","keys","forEach","calMilliseconds","match","slice","map","Number","prototype","reduce","toISOString","round","toJSON","Y","YY","YYYY","M","MM","D","DD","H","HH","mm","ss","SSS","replace","String","as","get","add","subtract","locale","clone","humanize","fromNow","valueOf","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","$utils","duration","isDuration","bind","__webpack_module_cache__","__webpack_require__","moduleId","flarum","reg","_webpack_runtimes","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","jumpToQueue","close","route","set","id","queue","load","setTimeout","document","getElementById","scrollIntoView","block","_typeof","iterator","constructor","_defineProperty","toPrimitive","TypeError","toPropertyKey","configurable","writable","window","QueueState","params","actionTaken","loading","page","limit","offset","find","then","data","tasks","total","payload","meta","redraw","pendingTask","task","status","pollQueue","control","setLoading","location","reload","isLoading","getItems","getTotalItems","getTotalPages","pageNumber","getPerPage","hasPrev","hasNext","prev","next","goto","polling","clearTimeout","hasPending","error","response","errors","includes","code","clear","guessed_cause","show","type","trans","ControlSectionState","lastUpdateRun","JSON","parse","settings","limitedPackages","major","minor","global","lastUpdateCheck","extensionUpdates","formatExtensionUpdates","coreUpdate","formatCoreUpdate","name","hasOperationRunning","requirePackage","method","url","attribute","body","processing","extensionId","extension","href","catch","errorHandler","finally","checkForUpdates","updateCoreMinor","confirm","updateExtension","updateMode","extra","title","updateGlobally","packageUpdates","updates","installed","filter","composerPackage","extensions","safeToUpdate","values","core","pop","package","version","icon","backgroundImage","resources","links","majorUpdate","_ref","dryRun","updateState","incompatibleExtensions","incompatible_extensions","ExtensionListState","super","sort","sortMap","label","ExtensionManagerState","Label","view","vnode","className","attrs","assign","children","TaskOutputModal","operation","content","guessedCause","command","output","humanDuration","start","end","dayjs","extend","durationTime","diff","QueueSection","oninit","onclick","disabled","queueTable","columns","items","operationIcon","style","running","failure","pending","success","size","display","startedAt","finishedAt","text","peakMemoryUsed","length","toArray","item","index","currentPage","perPage","onChange","update_check","update_major","update_minor","update_global","extension_install","extension_remove","extension_update","why_not","Installer","arguments","packageName","htmlFor","link","semantic_link","placeholder","bidi","onsubmit","WhyNotModal","oncreate","requestWhyNot","whyNot","reason","VersionStability","isProductionReady","Stable","RC","stability","split","toLowerCase","Alpha","Beta","Dev","ExternalExtension","isSupported","currentVersion","latestCompatibleVersion","latestFlarumVersionSupported","highestVersion","toLocalExtension","description","backgroundColor","color","discuss","discussUri","website","httpUri","ExtensionCard","getExtension","isCore","isDanger","badges","actionItems","metaItems","iconUrl","isPremium","latestVersion","count","downloads","formattedCount","target","external","onClickUpdate","whyNotWarning","buttonClassName","soft","hard","charAt","substring","MajorUpdater","alt","src","update","dismissible","controls","Updater","lastUpdateCheckView","controlItems","availableUpdatesView","checkedAt","state","hasMinorCoreUpdate","ControlSection","ConfigureJson","submit","submitButton","isDirty","customSettingComponents","customFieldComponents","setting","readOnly","configuration","initialSettings","Array","isArray","stringify","RepositoryModal","repository","context","types","composer","vcs","path","options","onchange","hide","ConfigureComposer","buildSettingComponent","help","stable","beta","alpha","dev","newName","repositories","push","AuthMethodModal","host","token","bearer","oninput","rows","startsWith","ConfigureAuth","authSettings","hasAuthSettings","every","hosts","newType","oldHost","DiscoverSection","throttle","getParams","refreshParams","q","warningsDismissed","localStorage","getItem","setWarningDismissed","ondismiss","warningItems","tabItems","toolbarPrimaryItems","toolbarSecondaryItems","extensionList","footerItems","tabFilters","active","theme","tabs","tab","changeFilter","debugEnabled","search","applySearch","inputAttrs","clearable","prefixIcon","sortOptions","acc","sortId","accessibleToggleLabel","changeSort","activeType","is","party","hasItems","getPages","totalItems","pageSize","getLocation","dismissed","setItem","SettingsPage","getSettings","sections","writableDirs","missingFunctions","functions","join","setPriority","remove","onsaved","BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","result","Task","createdAt","isFinite","UNITS","bits","binary","space","separator","signed","isNegative","prefix","localeOptions","minimumFractionDigits","maximumFractionDigits","exponent","min","log","log10","toPrecision","prettyBytes","basic_impl_link","adv_impl_link","php_version","phpVersion","folder_perms_link","generalIndexItems","app","extensionManager","modal","request","forum","alerts","translator"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"6BAAoEA,EAAOC,QAAmJ,WAAW,aAAa,IAAIC,EAAEC,EAAEC,EAAE,IAAIC,EAAE,IAAIC,EAAE,KAAKC,EAAE,MAAMC,EAAE,sFAAsFC,EAAE,QAAQC,EAAE,OAAOC,EAAE,sKAAsKC,EAAE,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-manager/webpack/bootstrap","webpack://@flarum/extension-manager/webpack/runtime/compat get default export","webpack://@flarum/extension-manager/webpack/runtime/define property getters","webpack://@flarum/extension-manager/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/extension-manager/webpack/runtime/make namespace object","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/components/ExtensionPage')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/components/LoadingModal')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'admin/utils/isExtensionEnabled')\"","webpack://@flarum/extension-manager/./src/admin/utils/jumpToQueue.ts","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/extension-manager/./src/admin/states/QueueState.ts","webpack://@flarum/extension-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/extension-manager/./src/admin/states/ControlSectionState.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/extension-manager/./src/admin/states/ExtensionListState.ts","webpack://@flarum/extension-manager/./src/admin/states/ExtensionManagerState.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Pagination')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/extension-manager/./src/admin/components/Label.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/extension-manager/./src/admin/components/TaskOutputModal.tsx","webpack://@flarum/extension-manager/./src/admin/utils/humanDuration.ts","webpack://@flarum/extension-manager/./src/admin/components/QueueSection.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/extension-manager/./src/admin/components/Installer.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/extension-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/formatAmount')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/extension-manager/./src/admin/utils/versions.ts","webpack://@flarum/extension-manager/./src/admin/models/ExternalExtension.ts","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/extension-manager/./src/admin/components/ExtensionCard.tsx","webpack://@flarum/extension-manager/./src/admin/components/MajorUpdater.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/InfoTile')\"","webpack://@flarum/extension-manager/./src/admin/components/Updater.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/extension-manager/./src/admin/components/ControlSection.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/FormGroup')\"","webpack://@flarum/extension-manager/./src/admin/components/ConfigureJson.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Select')\"","webpack://@flarum/extension-manager/./src/admin/components/RepositoryModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureComposer.tsx","webpack://@flarum/extension-manager/./src/admin/components/AuthMethodModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureAuth.tsx","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/components/Input')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/helpers/listItems')\"","webpack://@flarum/extension-manager/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/extension-manager/./src/admin/components/DiscoverSection.tsx","webpack://@flarum/extension-manager/./src/admin/components/SettingsPage.tsx","webpack://@flarum/extension-manager/../../../node_modules/pretty-bytes/index.js","webpack://@flarum/extension-manager/./src/admin/models/Task.ts","webpack://@flarum/extension-manager/./src/admin/extend.tsx","webpack://@flarum/extension-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,d=2628e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(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)},v=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},g=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*h[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)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,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=v(this.$d.years,\"Y\"),s=v(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,\"D\"),e=v(this.$d.hours,\"H\"),r=v(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,\"S\"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",h=(d?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===h||\"-P\"===h?\"P0D\":h},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/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[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.valueOf=function(){return this.asMilliseconds()},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}(),p=function(t,s,n){return t.add(s.years()*n,\"y\").add(s.months()*n,\"M\").add(s.days()*n,\"d\").add(s.hours()*n,\"h\").add(s.minutes()*n,\"m\").add(s.seconds()*n,\"s\").add(s.milliseconds()*n,\"ms\")};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)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\tflarum.reg._webpack_runtimes[\"flarum-extension-manager\"] ||= __webpack_require__;// 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.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/ExtensionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/LoadingModal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/utils/isExtensionEnabled');","import app from 'flarum/admin/app';\n\n// @ts-ignore\nwindow.jumpToQueue = jumpToQueue;\nexport default function jumpToQueue() {\n app.modal.close();\n m.route.set(app.route('extension', {\n id: 'flarum-extension-manager'\n }));\n app.extensionManager.queue.load({}, true);\n setTimeout(() => {\n document.getElementById('ExtensionManager-queueSection')?.scrollIntoView({\n block: 'nearest'\n });\n }, 200);\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/jumpToQueue', jumpToQueue);","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nexport default class QueueState {\n constructor() {\n _defineProperty(this, \"polling\", null);\n _defineProperty(this, \"tasks\", null);\n _defineProperty(this, \"limit\", 20);\n _defineProperty(this, \"offset\", 0);\n _defineProperty(this, \"total\", 0);\n _defineProperty(this, \"loading\", false);\n }\n load(params, actionTaken) {\n if (actionTaken === void 0) {\n actionTaken = false;\n }\n this.loading = true;\n params = {\n page: {\n limit: this.limit,\n offset: this.offset,\n ...params?.page\n },\n ...params\n };\n return app.store.find('extension-manager-tasks', params || {}).then(data => {\n this.tasks = data;\n this.total = data.payload.meta?.page?.total || 0;\n m.redraw();\n\n // Check if there is a pending or running task\n const pendingTask = data?.find(task => task.status() === 'pending' || task.status() === 'running');\n if (pendingTask) {\n this.pollQueue(actionTaken);\n } else if (actionTaken) {\n app.extensionManager.control.setLoading(null);\n\n // Refresh the page\n window.location.reload();\n } else if (app.extensionManager.control.isLoading()) {\n app.extensionManager.control.setLoading(null);\n }\n this.loading = false;\n return data;\n });\n }\n isLoading() {\n return this.loading;\n }\n getItems() {\n return this.tasks;\n }\n getTotalItems() {\n return this.total;\n }\n getTotalPages() {\n return Math.ceil(this.total / this.limit);\n }\n pageNumber() {\n return Math.ceil(this.offset / this.limit);\n }\n getPerPage() {\n return this.limit;\n }\n hasPrev() {\n return this.pageNumber() !== 0;\n }\n hasNext() {\n return this.offset + this.limit < this.total;\n }\n prev() {\n if (this.hasPrev()) {\n this.offset -= this.limit;\n this.load();\n }\n }\n next() {\n if (this.hasNext()) {\n this.offset += this.limit;\n this.load();\n }\n }\n goto(page) {\n this.offset = (page - 1) * this.limit;\n this.load();\n }\n pollQueue(actionTaken) {\n if (actionTaken === void 0) {\n actionTaken = false;\n }\n if (this.polling) {\n clearTimeout(this.polling);\n }\n this.polling = setTimeout(() => {\n this.load({}, actionTaken);\n }, 6000);\n }\n hasPending() {\n return !!this.tasks?.find(task => task.status() === 'pending' || task.status() === 'running');\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/QueueState', QueueState);","import app from 'flarum/admin/app';\nexport default function (e) {\n app.extensionManager.control.setLoading(null);\n const error = e.response.errors[0];\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n app.alerts.clear();\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({\n type: 'error'\n }, app.translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n case 'extension_already_installed':\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n case 'extension_not_installed':\n app.alerts.show({\n type: 'error'\n }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport LoadingModal from 'flarum/admin/components/LoadingModal';\nimport errorHandler from '../utils/errorHandler';\nimport jumpToQueue from '../utils/jumpToQueue';\nimport extractText from 'flarum/common/utils/extractText';\nexport default class ControlSectionState {\n get lastUpdateRun() {\n const lastUpdateRun = JSON.parse(app.data.settings['flarum-extension-manager.last_update_run']);\n lastUpdateRun.limitedPackages = () => [...lastUpdateRun.major.limitedPackages, ...lastUpdateRun.minor.limitedPackages, ...lastUpdateRun.global.limitedPackages];\n return lastUpdateRun;\n }\n constructor() {\n _defineProperty(this, \"loading\", null);\n _defineProperty(this, \"packageUpdates\", {});\n _defineProperty(this, \"lastUpdateCheck\", void 0);\n _defineProperty(this, \"extensionUpdates\", void 0);\n _defineProperty(this, \"coreUpdate\", null);\n this.lastUpdateCheck = JSON.parse(app.data.settings['flarum-extension-manager.last_update_check']);\n this.extensionUpdates = this.formatExtensionUpdates(this.lastUpdateCheck);\n this.coreUpdate = this.formatCoreUpdate(this.lastUpdateCheck);\n }\n isLoading(name) {\n if (name === void 0) {\n name = null;\n }\n return name && this.loading === name || !name && this.loading !== null;\n }\n hasOperationRunning() {\n return this.isLoading() || app.extensionManager.queue.hasPending();\n }\n setLoading(name) {\n this.loading = name;\n }\n requirePackage(data) {\n app.extensionManager.control.setLoading('extension-install');\n app.modal.show(LoadingModal);\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions`,\n body: {\n data\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-extension-manager.admin.extensions.successful_install', {\n extension: extensionId\n }));\n window.location.href = `${app.forum.attribute('adminUrl')}#/extension/${extensionId}`;\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n checkForUpdates() {\n this.setLoading('check');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/check-for-updates`\n }).then(response => {\n if (response.processing) {\n jumpToQueue();\n } else {\n this.lastUpdateCheck = response;\n this.extensionUpdates = this.formatExtensionUpdates(response);\n this.coreUpdate = this.formatCoreUpdate(response);\n this.setLoading(null);\n m.redraw();\n }\n }).catch(errorHandler).finally(() => {\n m.redraw();\n });\n }\n updateCoreMinor() {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.minor_update_confirmation.content')))) {\n app.modal.show(LoadingModal);\n this.setLoading('minor-update');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/minor-update`\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n }\n updateExtension(extension, updateMode) {\n app.modal.show(LoadingModal);\n this.setLoading('extension-update');\n app.request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions/${extension.id}`,\n body: {\n data: {\n updateMode\n }\n }\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.extensions.successful_update', {\n extension: extension.extra['flarum-extension'].title\n }));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n updateGlobally() {\n app.modal.show(LoadingModal);\n this.setLoading('global-update');\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/global-update`\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.updater.global_update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).finally(() => {\n app.modal.close();\n m.redraw();\n });\n }\n formatExtensionUpdates(lastUpdateCheck) {\n this.packageUpdates = {};\n lastUpdateCheck?.updates?.installed?.filter(composerPackage => {\n const id = composerPackage.name.replace('/', '-').replace(/(flarum-ext-)|(flarum-)/, '');\n const extension = app.data.extensions[id];\n const safeToUpdate = ['semver-safe-update', 'update-possible'].includes(composerPackage['latest-status']);\n if (extension && safeToUpdate) {\n this.packageUpdates[extension.id] = composerPackage;\n }\n return extension && safeToUpdate;\n });\n return Object.values(app.data.extensions).filter(extension => this.packageUpdates[extension.id]);\n }\n formatCoreUpdate(lastUpdateCheck) {\n const core = lastUpdateCheck?.updates?.installed?.filter(composerPackage => composerPackage.name === 'flarum/core').pop();\n if (!core) return null;\n return {\n package: core,\n extension: {\n id: 'flarum-core',\n name: 'flarum/core',\n version: app.data.settings.version,\n icon: {\n name: '',\n // @ts-ignore\n backgroundImage: `url(${app.data.resources[0]['attributes']['baseUrl']}/assets/extensions/flarum-extension-manager/flarum.svg`\n },\n extra: {\n 'flarum-extension': {\n title: extractText(app.translator.trans('flarum-extension-manager.admin.updater.flarum'))\n }\n },\n links: {}\n }\n };\n }\n majorUpdate(_ref) {\n let {\n dryRun\n } = _ref;\n app.extensionManager.control.setLoading(dryRun ? 'major-update-dry-run' : 'major-update');\n app.modal.show(LoadingModal);\n const updateState = this.lastUpdateRun.major;\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/major-update`,\n body: {\n data: {\n dryRun\n }\n }\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.update_successful'));\n window.location.reload();\n }\n }).catch(errorHandler).catch(e => {\n app.modal.close();\n updateState.status = 'failure';\n updateState.incompatibleExtensions = e.response?.errors?.pop()?.incompatible_extensions;\n }).finally(() => {\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ControlSectionState', ControlSectionState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import app from 'flarum/admin/app';\nimport PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class ExtensionListState extends PaginatedListState {\n get type() {\n return 'external-extensions';\n }\n constructor() {\n super({\n sort: '-downloads'\n }, 1, 12);\n }\n sortMap() {\n return {\n '-createdAt': {\n sort: '-createdAt',\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.latest', {}, true)\n },\n '-downloads': {\n sort: '-downloads',\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.top', {}, true)\n }\n };\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ExtensionListState', ExtensionListState);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport QueueState from './QueueState';\nimport ControlSectionState from './ControlSectionState';\nimport ExtensionListState from './ExtensionListState';\nexport default class ExtensionManagerState {\n constructor() {\n _defineProperty(this, \"queue\", new QueueState());\n _defineProperty(this, \"control\", new ControlSectionState());\n _defineProperty(this, \"extensions\", new ExtensionListState());\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/states/ExtensionManagerState', ExtensionManagerState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Tooltip');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Pagination');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class Label extends Component {\n view(vnode) {\n const {\n className,\n type,\n ...attrs\n } = this.attrs;\n return m(\"span\", Object.assign({\n className: classList(['Label', `Label--${this.attrs.type}`, className])\n }, attrs), vnode.children);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Label', Label);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","import app from 'flarum/admin/app';\nimport Modal from 'flarum/common/components/Modal';\nexport default class TaskOutputModal extends Modal {\n className() {\n return 'Modal--large QuickModal';\n }\n title() {\n return app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`);\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(\"div\", {\n className: \"TaskOutputModal-data\"\n }, this.attrs.task.status() === 'failure' && m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-guessed-cause\"\n }, this.attrs.task.guessedCause() && app.translator.trans('flarum-extension-manager.admin.exceptions.guessed_cause.' + this.attrs.task.guessedCause()) || app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown'))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.command')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-command\"\n }, m(\"code\", null, \"$ composer \", this.attrs.task.command()))), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.output')), m(\"div\", {\n className: \"FormControl TaskOutputModal-data-output\"\n }, m(\"code\", null, m(\"pre\", null, this.attrs.task.output()))))));\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/TaskOutputModal', TaskOutputModal);","import duration from 'dayjs/plugin/duration';\nexport default function humanDuration(start, end) {\n dayjs.extend(duration);\n const durationTime = dayjs(end).diff(start);\n return dayjs.duration(durationTime).humanize();\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/humanDuration', humanDuration);","import app from 'flarum/admin/app';\nimport Component 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 Icon from 'flarum/common/components/Icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport Link from 'flarum/common/components/Link';\nimport Pagination from 'flarum/common/components/Pagination';\nimport classList from 'flarum/common/utils/classList';\nimport Label from './Label';\nimport TaskOutputModal from './TaskOutputModal';\nimport humanDuration from '../utils/humanDuration';\nexport default class QueueSection extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n app.extensionManager.queue.load();\n }\n view() {\n return m(\"section\", {\n id: \"ExtensionManager-queueSection\",\n className: \"ExtensionPage-settings ExtensionManager-queueSection\"\n }, m(\"div\", {\n className: \"ExtensionPage-permissions-header ExtensionManager-queueSection-header\"\n }, m(\"div\", {\n className: \"container\"\n }, m(\"h2\", {\n className: \"ExtensionTitle\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.queue.title')), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-sync-alt\",\n onclick: () => app.extensionManager.queue.load(),\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.sections.queue.refresh'),\n disabled: app.extensionManager.control.isLoading()\n }))), m(\"div\", {\n className: \"container\"\n }, this.queueTable()));\n }\n columns() {\n const items = new ItemList();\n items.add('operation', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.operation')),\n content: task => m(\"div\", {\n className: \"ExtensionManager-queueTable-operation\"\n }, m(\"span\", {\n className: \"ExtensionManager-queueTable-operation-icon\"\n }, this.operationIcon(task.operation())), m(\"span\", {\n className: \"ExtensionManager-queueTable-operation-name\"\n }, app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${task.operation()}`)))\n }, 80);\n items.add('package', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.package')),\n content: task => {\n const extension = app.data.extensions[task.package()?.replace(/(\\/flarum-|\\/flarum-ext-|\\/)/g, '-')];\n return extension ? m(Link, {\n className: \"ExtensionManager-queueTable-package\",\n href: app.route('extension', {\n id: extension.id\n })\n }, m(\"div\", {\n className: \"ExtensionManager-queueTable-package-icon ExtensionIcon\",\n style: extension.icon\n }, !!extension.icon && m(Icon, {\n name: extension.icon.name\n })), m(\"div\", {\n className: \"ExtensionManager-queueTable-package-details\"\n }, m(\"span\", {\n className: \"ExtensionManager-queueTable-package-title\"\n }, extension.extra['flarum-extension'].title), m(\"span\", {\n className: \"ExtensionManager-queueTable-package-name\"\n }, task.package()))) : task.package();\n }\n }, 75);\n items.add('status', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.status')),\n content: task => m('[', null, m(Label, {\n className: \"ExtensionManager-queueTable-status\",\n type: {\n running: 'neutral',\n failure: 'error',\n pending: 'warning',\n success: 'success'\n }[task.status()]\n }, app.translator.trans(`flarum-extension-manager.admin.sections.queue.statuses.${task.status()}`)), ['pending', 'running'].includes(task.status()) && m(LoadingIndicator, {\n size: \"small\",\n display: \"inline\"\n }))\n }, 70);\n items.add('elapsedTime', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.elapsed_time')),\n content: task => !task.startedAt() || !task.finishedAt() ? app.translator.trans('flarum-extension-manager.admin.sections.queue.task_just_started') : m(Tooltip, {\n text: `${dayjs(task.startedAt()).format('LL LTS')} ${dayjs(task.finishedAt()).format('LL LTS')}`\n }, m(\"span\", null, humanDuration(task.startedAt(), task.finishedAt())))\n }, 65);\n items.add('memoryUsed', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.peak_memory_used')),\n content: task => m(\"span\", null, task.peakMemoryUsed())\n }, 60);\n items.add('details', {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.details')),\n content: task => m(Button, {\n className: \"Button Button--icon Table-controls-item\",\n icon: \"fas fa-file-alt\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.details')\n // @todo fix in core\n // @ts-ignore\n ,\n onclick: () => app.modal.show(TaskOutputModal, {\n task\n }),\n disabled: ['pending', 'running'].includes(task.status())\n }),\n className: 'Table-controls'\n }, 55);\n return items;\n }\n queueTable() {\n const tasks = app.extensionManager.queue.getItems();\n if (!tasks) {\n return m(LoadingIndicator, null);\n }\n if (tasks && !tasks.length) {\n return m(\"h3\", {\n className: \"ExtensionPage-subHeader\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.queue.none'));\n }\n const columns = this.columns();\n return m('[', null, m(\"div\", {\n className: classList('Table-container', {\n 'loading-container': tasks && app.extensionManager.queue.isLoading()\n })\n }, m(\"table\", {\n className: \"Table ExtensionManager-queueTable\"\n }, m(\"thead\", null, m(\"tr\", null, columns.toArray().map((item, index) => m(\"th\", {\n key: index\n }, item.label)))), m(\"tbody\", null, tasks.map((task, index) => m(\"tr\", {\n key: index\n }, columns.toArray().map((item, index) => {\n const {\n label,\n content,\n ...attrs\n } = item;\n return m(\"td\", Object.assign({\n key: index\n }, attrs), content(task));\n }))))), tasks && app.extensionManager.queue.isLoading() && m(LoadingIndicator, {\n size: \"large\"\n })), m(Pagination, {\n total: app.extensionManager.queue.getTotalItems(),\n currentPage: app.extensionManager.queue.pageNumber() + 1,\n perPage: app.extensionManager.queue.getPerPage(),\n onChange: page => app.extensionManager.queue.goto(page)\n }));\n }\n operationIcon(operation) {\n return m(Icon, {\n name: {\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}\nflarum.reg.add('flarum-extension-manager', 'admin/components/QueueSection', QueueSection);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/Stream');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\nexport default class Installer extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"packageName\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.packageName = Stream('');\n }\n view() {\n return m(\"div\", {\n className: \"Form-group ExtensionManager-installer\"\n }, m(\"label\", {\n htmlFor: \"install-extension\"\n }, app.translator.trans('flarum-extension-manager.admin.extensions.install')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.extensions.install_help', {\n link: m(\"a\", {\n href: \"https://flarum.org/extensions\"\n }, \"flarum.org\"),\n semantic_link: m(\"a\", {\n href: \"https://devhints.io/semver\"\n }),\n code: m(\"code\", null)\n })), m(\"div\", {\n className: \"FormControl-container\"\n }, m(\"input\", {\n className: \"FormControl\",\n id: \"install-extension\",\n placeholder: \"vendor/package-name\",\n bidi: this.packageName\n }), m(Button, {\n className: \"Button\",\n icon: \"fas fa-download\",\n onclick: this.onsubmit.bind(this),\n loading: app.extensionManager.control.isLoading('extension-install'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.extensions.proceed'))));\n }\n data() {\n return {\n package: this.packageName()\n };\n }\n onsubmit() {\n app.extensionManager.control.requirePackage(this.data());\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Installer', Installer);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport errorHandler from '../utils/errorHandler';\nexport default class WhyNotModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"loading\", true);\n _defineProperty(this, \"whyNot\", null);\n }\n className() {\n return 'Modal--large WhyNotModal';\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.why_not_modal.title');\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n this.requestWhyNot();\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, this.loading ? m(LoadingIndicator, null) : m(\"pre\", {\n className: \"WhyNotModal-contents\"\n }, this.whyNot));\n }\n requestWhyNot() {\n app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package\n }\n }\n }).then(response => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n }).catch(errorHandler);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/WhyNotModal', WhyNotModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/formatAmount');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","export let VersionStability = /*#__PURE__*/function (VersionStability) {\n VersionStability[\"Stable\"] = \"stable\";\n VersionStability[\"Alpha\"] = \"alpha\";\n VersionStability[\"Beta\"] = \"beta\";\n VersionStability[\"RC\"] = \"rc\";\n VersionStability[\"Dev\"] = \"dev\";\n return VersionStability;\n}({});\nexport function isProductionReady(version) {\n return [VersionStability.Stable].includes(stability(version));\n}\nexport function stability(version) {\n const split = version.split('-');\n if (split.length === 1) {\n return VersionStability.Stable;\n }\n const stab = split[1].split('.')[0].toLowerCase();\n switch (stab) {\n case 'alpha':\n return VersionStability.Alpha;\n case 'beta':\n return VersionStability.Beta;\n case 'rc':\n return VersionStability.RC;\n default:\n return VersionStability.Dev;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/utils/versions', { VersionStability: VersionStability,isProductionReady: isProductionReady,stability: stability, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Model from 'flarum/common/Model';\nimport app from 'flarum/admin/app';\nimport { isProductionReady } from '../utils/versions';\nexport default class ExternalExtension extends Model {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"extensionId\", Model.attribute('extensionId'));\n _defineProperty(this, \"name\", Model.attribute('name'));\n _defineProperty(this, \"title\", Model.attribute('title'));\n _defineProperty(this, \"description\", Model.attribute('description'));\n _defineProperty(this, \"iconUrl\", Model.attribute('iconUrl'));\n _defineProperty(this, \"icon\", Model.attribute('icon'));\n _defineProperty(this, \"highestVersion\", Model.attribute('highestVersion'));\n _defineProperty(this, \"httpUri\", Model.attribute('httpUri'));\n _defineProperty(this, \"discussUri\", Model.attribute('discussUri'));\n _defineProperty(this, \"vendor\", Model.attribute('vendor'));\n _defineProperty(this, \"isPremium\", Model.attribute('isPremium'));\n _defineProperty(this, \"isLocale\", Model.attribute('isLocale'));\n _defineProperty(this, \"locale\", Model.attribute('locale'));\n _defineProperty(this, \"latestFlarumVersionSupported\", Model.attribute('latestFlarumVersionSupported'));\n _defineProperty(this, \"downloads\", Model.attribute('downloads'));\n _defineProperty(this, \"installed\", false);\n }\n isSupported() {\n const currentVersion = app.data.settings.version;\n const latestCompatibleVersion = this.latestFlarumVersionSupported();\n\n // If stability is not the same, it's not compatible.\n if (currentVersion.split('-')[1] !== latestCompatibleVersion.split('-')[1]) {\n return false;\n }\n\n // Minor versions are compatible.\n return currentVersion.split('.')[0] === latestCompatibleVersion.split('.')[0];\n }\n isProductionReady() {\n return isProductionReady(this.highestVersion());\n }\n toLocalExtension() {\n return {\n id: this.extensionId(),\n name: this.name(),\n version: this.highestVersion(),\n description: this.description(),\n icon: this.icon() || {\n name: 'fas fa-box-open',\n backgroundColor: '#117187',\n color: '#fff'\n },\n links: {\n discuss: this.discussUri(),\n website: this.httpUri()\n },\n extra: {\n 'flarum-extension': {\n title: this.title()\n }\n }\n };\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/models/ExternalExtension', ExternalExtension);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Dropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Component from 'flarum/common/Component';\nimport Icon from 'flarum/common/components/Icon';\nimport Badge from 'flarum/common/components/Badge';\nimport app from 'flarum/admin/app';\nimport Button from 'flarum/common/components/Button';\nimport formatAmount from 'flarum/common/utils/formatAmount';\nimport ExternalExtension from '../models/ExternalExtension';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport Label from './Label';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport WhyNotModal from './WhyNotModal';\nimport LinkButton from 'flarum/common/components/LinkButton';\nexport default class ExtensionCard extends Component {\n getExtension() {\n return this.attrs.extension instanceof ExternalExtension ? this.attrs.extension.toLocalExtension() : this.attrs.extension;\n }\n view() {\n const extension = this.getExtension();\n const {\n isCore,\n isDanger\n } = this.attrs;\n return m(\"div\", {\n className: classList('ExtensionCard', {\n 'ExtensionCard--core': isCore,\n 'ExtensionCard--danger': isDanger\n })\n }, m(\"div\", {\n className: \"ExtensionCard-header\"\n }, this.icon(), m(Tooltip, {\n text: extension.name\n }, m(\"h4\", null, extension.extra['flarum-extension'].title)), this.attrs.extension instanceof ExternalExtension && m(\"div\", {\n className: \"ExtensionCard-badges\"\n }, this.badges().toArray()), m(\"div\", {\n className: \"ExtensionCard-actions\"\n }, this.actionItems().toArray())), m(\"div\", {\n className: \"ExtensionCard-body\"\n }, m(\"p\", null, extension.description)), m(\"div\", {\n className: \"ExtensionCard-footer\"\n }, m(\"div\", {\n className: \"ExtensionCard-meta\"\n }, this.metaItems().toArray())));\n }\n icon() {\n const extension = this.getExtension();\n if (this.attrs.extension instanceof ExternalExtension && extension.id in app.data.extensions) {\n extension.icon = app.data.extensions[extension.id].icon;\n }\n const style = extension.icon || {};\n if (!extension.icon?.name && this.attrs.extension instanceof ExternalExtension && !(extension.id in app.data.extensions) && this.attrs.extension.iconUrl()) {\n style.backgroundImage = `url(${this.attrs.extension.iconUrl()})`;\n }\n return m(\"span\", {\n className: \"ExtensionIcon\",\n style: extension.icon\n }, extension.icon?.name ? m(Icon, {\n name: extension.icon.name\n }) : null);\n }\n badges() {\n const items = new ItemList();\n const extension = this.attrs.extension;\n if (extension.isSupported()) {\n items.add('compatible', m(Badge, {\n icon: \"fas fa-check\",\n type: \"success\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.compatible'),\n className: \"Badge--flat Badge--square\"\n }));\n } else {\n items.add('incompatible', m(Badge, {\n icon: \"fas fa-times\",\n type: \"danger\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.incompatible'),\n className: \"Badge--flat Badge--square\"\n }));\n }\n if (extension.isPremium()) {\n items.add('premium', m(Badge, {\n icon: \"fas fa-dollar-sign\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.premium'),\n className: \"ExtensionCard-badge--premium Badge--flat Badge--square\"\n }));\n }\n if (!extension.isProductionReady()) {\n items.add('unstable', m(Badge, {\n icon: \"fas fa-flask\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.unstable'),\n className: \"Badge--flat Badge--square Badge--danger\"\n }));\n }\n if (extension.name().split('/')[0] === 'fof') {\n items.add('fof', m(Badge, {\n icon: \"fas fa-users\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.fof'),\n className: \"Badge--flat Badge--square\"\n }));\n }\n if (extension.name().split('/')[0] === 'flarum') {\n items.add('flarum', m(Badge, {\n icon: \"fab fa-flarum\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.badges.flarum'),\n className: \"ExtensionCard-badge--flarum Badge--flat Badge--square\"\n }));\n }\n return items;\n }\n metaItems() {\n const items = new ItemList();\n const {\n updates,\n isCore\n } = this.attrs;\n const latestVersion = updates ? updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null) : null;\n if (this.attrs.extension instanceof ExternalExtension) {\n items.add('downloads', m(\"span\", null, m(Icon, {\n name: \"fas fa-circle-down\"\n }), app.translator.trans('flarum-extension-manager.admin.sections.discover.extension.downloads', {\n count: this.attrs.extension.downloads(),\n formattedCount: formatAmount(this.attrs.extension.downloads())\n })));\n } else {\n items.add('version', m(\"div\", {\n className: \"ExtensionCard-version\"\n }, m(\"span\", {\n className: \"ExtensionCard-version-current\"\n }, this.version(updates['version'])), latestVersion ? m('[', null, m(Icon, {\n name: \"fas fa-arrow-right\"\n }), m(Label, {\n className: \"ExtensionCard-version-latest\",\n type: updates['latest-minor'] ? 'success' : 'warning'\n }, this.version(latestVersion))) : null));\n }\n if (this.attrs.extension instanceof ExternalExtension) {\n items.add('version', m(\"div\", {\n className: \"ExtensionCard-version\"\n }, \"v\", this.version(this.attrs.extension.highestVersion())));\n items.add('link', m(LinkButton, {\n className: \"Button Button--ua-reset Button--link Button--icon\",\n href: this.attrs.extension.httpUri(),\n target: \"_blank\",\n icon: \"fas fa-external-link-alt\",\n external: true\n }));\n }\n return items;\n }\n actionItems() {\n const items = new ItemList();\n const {\n updates,\n extension,\n onClickUpdate,\n whyNotWarning\n } = this.attrs;\n if (extension instanceof ExternalExtension) {\n if (!(extension.extensionId() in app.data.extensions)) {\n items.add('install', m(Button, {\n className: \"Button Button--icon Button--flat\",\n icon: \"fas fa-cloud-arrow-down\",\n onclick: () => {\n app.extensionManager.control.requirePackage({\n package: extension.name()\n });\n }\n }));\n } else {\n items.add('installed', m(Button, {\n className: \"Button Button--icon Button--flat Button--success\",\n icon: \"fas fa-check-circle\",\n disabled: true\n }));\n }\n } else {\n if (onClickUpdate && typeof onClickUpdate === 'function') {\n items.add('update', m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.extensions.update')\n }, m(Button, {\n icon: \"fas fa-cloud-arrow-down\",\n className: \"Button Button--icon Button--flat\",\n onclick: onClickUpdate,\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.extensions.update')\n })));\n } else if (onClickUpdate) {\n items.add('update', m(Dropdown, {\n buttonClassName: \"Button Button--icon Button--flat\",\n icon: \"fas fa-ellipsis\",\n label: app.translator.trans('flarum-extension-manager.admin.extensions.update')\n }, m(Button, {\n icon: \"fas fa-cloud-arrow-down\",\n onclick: onClickUpdate.soft\n }, app.translator.trans('flarum-extension-manager.admin.extensions.update_soft_label')), m(Button, {\n icon: \"fas fa-rotate\",\n onclick: onClickUpdate.hard,\n disabled: !updates['direct-dependency']\n }, app.translator.trans('flarum-extension-manager.admin.extensions.update_hard_label'))));\n }\n if (whyNotWarning) items.add('whyNot', m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')\n }, m(Button, {\n icon: \"fas fa-exclamation-circle\",\n className: \"Button Button--icon Button--flat Button--danger\",\n onclick: () => app.modal.show(WhyNotModal, {\n package: extension.name\n }),\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')\n })));\n }\n return items;\n }\n version(v) {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ExtensionCard', ExtensionCard);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionCard from './ExtensionCard';\nimport classList from 'flarum/common/utils/classList';\nexport default class MajorUpdater extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"updateState\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.updateState = this.attrs.updateState;\n }\n view() {\n return m(\"div\", {\n className: classList('Form-group Form-group--danger ExtensionManager-majorUpdate', {\n 'ExtensionManager-majorUpdate--failed': this.updateState.status === 'failure',\n 'ExtensionManager-majorUpdate--incompatibleExtensions': this.updateState.incompatibleExtensions.length\n })\n }, m(\"img\", {\n alt: \"flarum logo\",\n src: app.forum.attribute('baseUrl') + '/assets/extensions/flarum-extension-manager/flarum.svg'\n }), m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.major_updater.title', {\n version: this.attrs.coreUpdate['latest-major']\n })), m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.description')), m(\"div\", {\n className: \"ExtensionManager-updaterControls\"\n }, m(Tooltip, {\n text: app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run_help')\n }, m(Button, {\n className: \"Button\",\n icon: \"fas fa-vial\",\n onclick: this.update.bind(this, true),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run'))), m(Button, {\n className: \"Button Button--danger\",\n icon: \"fas fa-play\",\n onclick: this.update.bind(this, false),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.update'))), this.updateState.incompatibleExtensions.length ? m(\"div\", {\n className: \"ExtensionManager-majorUpdate-incompatibleExtensions ExtensionManager-extensions-grid\"\n }, this.updateState.incompatibleExtensions.map(extension => m(ExtensionCard, {\n extension: app.data.extensions[extension.replace('flarum-', '').replace('flarum-ext-', '').replace('/', '-')],\n updates: {},\n onClickUpdate: null,\n isDanger: true\n }))) : null, this.updateState.status === 'failure' ? m(Alert, {\n type: \"error\",\n className: \"ExtensionManager-majorUpdate-failure\",\n dismissible: false,\n controls: [m(Button, {\n className: \"Button Button--text ExtensionManager-majorUpdate-failure-details\",\n icon: \"fas fa-question-circle\",\n onclick: () => app.modal.show(WhyNotModal, {\n package: 'flarum/core'\n })\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.failure.why'))]\n }, m(\"p\", {\n className: \"ExtensionManager-majorUpdate-failure-desc\"\n }, app.translator.trans('flarum-extension-manager.admin.major_updater.failure.desc'))) : null);\n }\n update(dryRun) {\n app.extensionManager.control.majorUpdate({\n dryRun\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/MajorUpdater', MajorUpdater);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/InfoTile');","import app from 'flarum/admin/app';\nimport Component 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 ItemList from 'flarum/common/utils/ItemList';\nimport InfoTile from 'flarum/common/components/InfoTile';\nimport ExtensionCard from './ExtensionCard';\nimport { isProductionReady } from '../utils/versions';\nexport default class Updater extends Component {\n view() {\n const core = app.extensionManager.control.coreUpdate;\n return [m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.updater.updater_title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.updater_help')), this.lastUpdateCheckView(), m(\"div\", {\n className: \"ExtensionManager-updaterControls\"\n }, this.controlItems().toArray()), this.availableUpdatesView()), core && core.package['latest-major'] && isProductionReady(core.package['latest-major']) ? m(MajorUpdater, {\n coreUpdate: core.package,\n updateState: app.extensionManager.control.lastUpdateRun.major\n }) : null];\n }\n lastUpdateCheckView() {\n return app.extensionManager.control.lastUpdateCheck?.checkedAt && m(\"p\", {\n className: \"ExtensionManager-lastUpdatedAt\"\n }, m(\"span\", {\n className: \"ExtensionManager-lastUpdatedAt-label\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.last_update_checked_at')), m(\"span\", {\n className: \"ExtensionManager-lastUpdatedAt-value\"\n }, humanTime(app.extensionManager.control.lastUpdateCheck.checkedAt))) || null;\n }\n availableUpdatesView() {\n const state = app.extensionManager.control;\n if (app.extensionManager.control.isLoading('check') || app.extensionManager.control.isLoading('global-update')) {\n return m(\"div\", {\n className: \"ExtensionManager-extensions\"\n }, m(LoadingIndicator, null));\n }\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return m(\"div\", {\n className: \"ExtensionManager-extensions ExtensionManager-extensions--empty\"\n }, m(InfoTile, {\n icon: \"fas fa-plug-circle-check\"\n }, app.translator.trans('flarum-extension-manager.admin.updater.up_to_date')));\n }\n return m(\"div\", {\n className: \"ExtensionManager-extensions\"\n }, m(\"div\", {\n className: \"ExtensionManager-extensions-grid\"\n }, hasMinorCoreUpdate ? m(ExtensionCard, {\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 }) : null, state.extensionUpdates.map(extension => m(ExtensionCard, {\n extension: extension,\n updates: state.packageUpdates[extension.id],\n onClickUpdate: {\n soft: () => state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard')\n },\n whyNotWarning: state.lastUpdateRun.limitedPackages().includes(extension.name)\n }))));\n }\n controlItems() {\n const items = new ItemList();\n items.add('updateCheck', m(Button, {\n className: \"Button\",\n icon: \"fas fa-sync-alt\",\n onclick: () => app.extensionManager.control.checkForUpdates(),\n loading: app.extensionManager.control.isLoading('check'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.updater.check_for_updates')), 100);\n items.add('globalUpdate', m(Button, {\n className: \"Button\",\n icon: \"fas fa-play\",\n onclick: () => app.extensionManager.control.updateGlobally(),\n loading: app.extensionManager.control.isLoading('global-update'),\n disabled: app.extensionManager.control.hasOperationRunning()\n }, app.translator.trans('flarum-extension-manager.admin.updater.run_global_update')));\n return items;\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/Updater', Updater);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import Component from 'flarum/common/Component';\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Form from 'flarum/common/components/Form';\nexport default class ControlSection extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n }\n view() {\n return m(\"div\", {\n className: \"ExtensionPage-settings ExtensionManager-controlSection\"\n }, m(\"div\", {\n className: \"container\"\n }, m(Form, null, m(Installer, null), m(Updater, null))));\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ControlSection', ControlSection);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FormGroup');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport FormGroup from 'flarum/common/components/FormGroup';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nexport default class ConfigureJson extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"settings\", {});\n _defineProperty(this, \"initialSettings\", null);\n _defineProperty(this, \"loading\", false);\n _defineProperty(this, \"type\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.submit(true);\n }\n className() {\n return '';\n }\n view() {\n return m(\"div\", {\n className: classList('FormSection', this.className())\n }, m(\"label\", null, this.title()), this.content(), m(\"div\", {\n className: \"Form-group Form-controls\"\n }, this.submitButton()));\n }\n submitButton() {\n return [m(Button, {\n className: \"Button Button--primary\",\n loading: this.loading,\n onclick: () => this.submit(false),\n disabled: !this.isDirty()\n }, app.translator.trans('core.admin.settings.submit_button'))];\n }\n customSettingComponents() {\n return FormGroup.prototype.customFieldComponents();\n }\n setting(key) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n submit(readOnly) {\n this.loading = true;\n const configuration = {};\n Object.keys(this.settings).forEach(key => {\n configuration[key] = this.settings[key]();\n });\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/extension-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration\n }\n }).then(_ref => {\n let {\n data\n } = _ref;\n Object.keys(data).forEach(key => {\n this.settings[key] = Stream(data[key]);\n });\n this.initialSettings = Array.isArray(data) ? {} : data;\n }).finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureJson', ConfigureJson);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Select');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Modal from 'flarum/common/components/Modal';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport Form from 'flarum/common/components/Form';\nexport default class RepositoryModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"name\", void 0);\n _defineProperty(this, \"repository\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || {\n type: 'composer',\n url: ''\n });\n }\n className() {\n return 'RepositoryModal Modal--small';\n }\n title() {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.composer.${context}_repository_label`);\n }\n content() {\n const types = {\n composer: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.path')\n };\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.name_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.name\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.type_label')), m(Select, {\n options: types,\n value: this.repository().type,\n onchange: value => this.repository({\n ...this.repository(),\n type: value\n })\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.url')), m(\"input\", {\n className: \"FormControl\",\n onchange: e => this.repository({\n ...this.repository(),\n url: e.target.value\n }),\n value: this.repository().url\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary\",\n onclick: this.submit.bind(this)\n }, app.translator.trans('flarum-extension-manager.admin.composer.repositories.add_modal.submit_button')))));\n }\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/RepositoryModal', RepositoryModal);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport ConfigureJson from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\nexport default class ConfigureComposer extends ConfigureJson {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", 'composer');\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.composer.title');\n }\n className() {\n return 'ConfigureComposer';\n }\n content() {\n return m(\"div\", {\n className: \"Form ExtensionManager-SettingsGroups-content\"\n }, this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.dev')\n }\n }), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.composer.repositories.label')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.composer.repositories.help')), m(\"div\", {\n className: \"ConfigureComposer-repositories\"\n }, Object.keys(this.setting('repositories')() || {}).map(name => {\n const repository = this.setting('repositories')()[name];\n return m(\"div\", {\n className: \"ButtonGroup ButtonGroup--full\"\n }, m(Button, {\n className: \"Button\",\n icon: {\n composer: 'fas fa-cubes',\n vcs: 'fas fa-code-branch',\n path: 'fas fa-folder'\n }[repository.type],\n onclick: () => app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: (repository, newName) => {\n const repositories = this.setting('repositories')();\n delete repositories[name];\n this.setting('repositories')(repositories);\n this.onchange(repository, newName);\n }\n })\n }, name, \" (\", repository.type, \")\"), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-trash\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_label'),\n onclick: () => {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = {\n ...this.setting('repositories')()\n };\n delete repositories[name];\n this.setting('repositories')(repositories);\n }\n }\n }));\n }))));\n }\n submitButton() {\n const items = super.submitButton();\n items.push(m(Button, {\n className: \"Button\",\n onclick: () => app.modal.show(RepositoryModal, {\n onsubmit: this.onchange.bind(this)\n })\n }, app.translator.trans('flarum-extension-manager.admin.composer.add_repository_label')));\n return items;\n }\n onchange(repository, name) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository\n });\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureComposer', ConfigureComposer);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Modal from 'flarum/common/components/Modal';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport Form from 'flarum/common/components/Form';\nexport default class AuthMethodModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", void 0);\n _defineProperty(this, \"host\", void 0);\n _defineProperty(this, \"token\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n className() {\n return 'AuthMethodModal Modal--small';\n }\n title() {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.auth_config.${context}_label`);\n }\n content() {\n const types = {\n 'github-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-extension-manager.admin.auth_config.types.bearer')\n };\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.type_label')), m(Select, {\n options: types,\n value: this.type(),\n onchange: this.type\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.host_label')), m(\"input\", {\n className: \"FormControl\",\n bidi: this.host,\n placeholder: app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.host_placeholder')\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.token_label')), m(\"textarea\", {\n className: \"FormControl\",\n oninput: e => this.token(e.target.value),\n rows: \"6\",\n placeholder: this.token().startsWith('unchanged:') ? extractText(app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.unchanged_token_placeholder')) : ''\n }, this.token().startsWith('unchanged:') ? '' : this.token())), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary\",\n onclick: this.submit.bind(this)\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.add_modal.submit_button')))));\n }\n submit() {\n this.attrs.onsubmit(this.type(), this.host(), this.token());\n this.hide();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/AuthMethodModal', AuthMethodModal);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport ConfigureJson from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport AuthMethodModal from './AuthMethodModal';\nimport extractText from 'flarum/common/utils/extractText';\nexport default class ConfigureAuth extends ConfigureJson {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"type\", 'auth');\n }\n title() {\n return app.translator.trans('flarum-extension-manager.admin.auth_config.title');\n }\n className() {\n return 'ConfigureAuth';\n }\n content() {\n const authSettings = Object.keys(this.settings);\n const hasAuthSettings = authSettings.length && authSettings.every(type => {\n const data = this.settings[type]();\n return Array.isArray(data) ? data.length : Object.keys(data).length;\n });\n return m(\"div\", {\n className: \"ExtensionManager-SettingsGroups-content\"\n }, hasAuthSettings ? authSettings.map(type => {\n const hosts = this.settings[type]();\n return m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans(`flarum-extension-manager.admin.auth_config.types.${type}`)), m(\"div\", {\n className: \"ConfigureAuth-hosts\"\n }, Object.keys(hosts).map(host => {\n const data = hosts[host];\n return m(\"div\", {\n className: \"ButtonGroup ButtonGroup--full\"\n }, m(Button, {\n className: \"Button\",\n icon: \"fas fa-key\",\n onclick: () => app.modal.show(AuthMethodModal, {\n type,\n host,\n token: data,\n onsubmit: this.onchange.bind(this, host)\n })\n }, host), m(Button, {\n className: \"Button Button--icon\",\n icon: \"fas fa-trash\",\n \"aria-label\": app.translator.trans('flarum-extension-manager.admin.auth_config.delete_label'),\n onclick: () => {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.auth_config.delete_confirmation')))) {\n const newType = {\n ...this.setting(type)()\n };\n delete newType[host];\n if (Object.keys(newType).length) {\n this.setting(type)(newType);\n } else {\n delete this.settings[type];\n }\n }\n }\n }));\n })));\n }) : m(\"span\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.no_auth_methods_configured')));\n }\n submitButton() {\n const items = super.submitButton();\n items.push(m(Button, {\n className: \"Button\",\n loading: this.loading,\n onclick: () => app.modal.show(AuthMethodModal, {\n onsubmit: this.onchange.bind(this, null)\n })\n }, app.translator.trans('flarum-extension-manager.admin.auth_config.add_label')));\n return items;\n }\n onchange(oldHost, type, host, token) {\n const data = {\n ...this.setting(type)()\n };\n if (oldHost) {\n delete data[oldHost];\n }\n data[host] = token;\n this.setting(type)(data);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/ConfigureAuth', ConfigureAuth);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Input');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/listItems');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Form from 'flarum/common/components/Form';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Input from 'flarum/common/components/Input';\nimport Stream from 'flarum/common/utils/Stream';\nimport Alert from 'flarum/common/components/Alert';\nimport listItems from 'flarum/common/helpers/listItems';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport ExtensionCard from './ExtensionCard';\nimport Pagination from 'flarum/common/components/Pagination';\nimport InfoTile from 'flarum/common/components/InfoTile';\nimport classList from 'flarum/common/utils/classList';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nexport default class DiscoverSection extends Component {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"search\", Stream(''));\n _defineProperty(this, \"warningsDismissed\", Stream(false));\n _defineProperty(this, \"applySearch\", throttle(1200, value => {\n const params = app.extensionManager.extensions.getParams();\n app.extensionManager.extensions.refreshParams({\n ...params,\n filter: {\n ...params.filter,\n q: value\n }\n }, 1);\n }));\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.extensionManager.extensions.goto(1);\n this.warningsDismissed(localStorage.getItem('flarum-extension-manager.warningsDismissed') === 'true');\n }\n load(page) {\n if (page === void 0) {\n page = 1;\n }\n app.extensionManager.extensions.goto(page);\n }\n view() {\n return m(\"div\", {\n className: \"ExtensionPage-settings ExtensionManager-DiscoverSection\"\n }, m(\"div\", {\n className: \"container\"\n }, m(Form, null, m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.discover.title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.description'), this.warningsDismissed() && m(Button, {\n className: \"Button Button--text Button--warning Button--more\",\n icon: \"fas fa-exclamation-triangle\",\n onclick: () => this.setWarningDismissed(false)\n }))), !this.warningsDismissed() && m(\"div\", {\n className: \"ExtensionManager-warnings Form-group\"\n }, m(Alert, {\n className: \"ExtensionManager-primaryWarning\",\n type: \"warning\",\n dismissible: true,\n ondismiss: () => this.setWarningDismissed(true)\n }, m(\"ul\", null, listItems(this.warningItems().toArray())))), m(\"div\", {\n className: \"Tabs\"\n }, m(\"div\", {\n className: \"Tabs-nav\"\n }, this.tabItems().toArray()), m(\"div\", {\n className: \"Tabs-content\"\n }, m(\"hr\", {\n className: \"Tabs-divider\"\n }), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar\"\n }, m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar-primary\"\n }, this.toolbarPrimaryItems().toArray()), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-toolbar-secondary\"\n }, this.toolbarSecondaryItems().toArray())), this.extensionList(), m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-footer\"\n }, this.footerItems().toArray()))))));\n }\n tabFilters() {\n return {\n '': {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.discover'),\n active: () => !app.extensionManager.extensions.getParams().filter?.type\n },\n extension: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.extensions'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'extension'\n },\n locale: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.languages'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'locale'\n },\n theme: {\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.tabs.themes'),\n active: () => app.extensionManager.extensions.getParams().filter?.type === 'theme'\n }\n };\n }\n tabItems() {\n const items = new ItemList();\n const tabs = this.tabFilters();\n Object.keys(tabs).forEach(key => {\n const tab = tabs[key];\n items.add(key, m(Button, {\n className: \"Button Button--link\",\n active: tab.active(),\n onclick: () => {\n app.extensionManager.extensions.changeFilter('type', key);\n }\n }, tab.label));\n });\n return items;\n }\n warningItems() {\n const items = new ItemList();\n items.add('accessWarning', app.translator.trans('flarum-extension-manager.admin.settings.access_warning'));\n if (app.data.debugEnabled) {\n items.add('devModeWarning', app.translator.trans('flarum-extension-manager.admin.settings.debug_mode_warning'));\n }\n return items;\n }\n toolbarPrimaryItems() {\n const items = new ItemList();\n items.add('search', m(Input, {\n value: this.search(),\n onchange: value => {\n this.search(value);\n this.applySearch(value);\n },\n inputAttrs: {\n className: 'FormControl-alt'\n },\n clearable: true,\n placeholder: app.translator.trans('flarum-extension-manager.admin.sections.discover.search'),\n prefixIcon: \"fas fa-search\"\n }));\n return items;\n }\n toolbarSecondaryItems() {\n const items = new ItemList();\n const sortMap = app.extensionManager.extensions.sortMap();\n const sortOptions = Object.keys(sortMap).reduce((acc, sortId) => {\n const sort = sortMap[sortId];\n acc[sortId] = typeof sort !== 'string' ? sort.label : sort;\n return acc;\n }, {});\n items.add('sort', m(Dropdown, {\n buttonClassName: \"Button\",\n label: sortOptions[app.extensionManager.extensions.getParams().sort] || Object.keys(sortMap).map(key => sortOptions[key])[0],\n accessibleToggleLabel: app.translator.trans('flarum-extension-manager.admin.sections.discover.sort.toggle_dropdown_accessible_label')\n }, Object.keys(sortOptions).map(value => {\n const label = sortOptions[value];\n const active = app.extensionManager.extensions.getParams().sort === value;\n return m(Button, {\n icon: active ? 'fas fa-check' : true,\n onclick: () => app.extensionManager.extensions.changeSort(value),\n active: active\n }, label);\n })));\n const is = app.extensionManager.extensions.getParams().filter?.is?.[0] ?? null;\n const activeType = is || 'all';\n items.add('party', m(Dropdown, {\n buttonClassName: \"Button\",\n label: app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.' + activeType),\n accessibleToggleLabel: app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.toggle_dropdown_accessible_label')\n }, ['all', 'premium'].map(party => m(Button, {\n icon: activeType === party ? 'fas fa-check' : true,\n onclick: () => {\n app.extensionManager.extensions.changeFilter('is', party === 'all' ? undefined : [party]);\n },\n active: activeType === party\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.party_filter.' + party)))));\n return items;\n }\n extensionList() {\n if (!app.extensionManager.extensions.hasItems() && app.extensionManager.extensions.isLoading()) {\n return m(LoadingIndicator, {\n display: \"block\"\n });\n }\n if (!app.extensionManager.extensions.hasItems()) {\n return m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-list ExtensionManager-DiscoverSection-list--empty\"\n }, m(InfoTile, {\n icon: \"fas fa-plug-circle-exclamation\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.empty_results')));\n }\n return m(\"div\", {\n className: classList('ExtensionManager-DiscoverSection-list', {\n 'loading-container': app.extensionManager.extensions.isLoading()\n })\n }, m(\"div\", {\n className: \"ExtensionManager-DiscoverSection-list-inner\"\n }, app.extensionManager.extensions.getPages().map(page => page.items.map(extension => m(ExtensionCard, {\n extension: extension,\n key: extension.name()\n })))), app.extensionManager.extensions.hasItems() && app.extensionManager.extensions.isLoading() && m(LoadingIndicator, {\n size: \"large\"\n }));\n }\n footerItems() {\n const items = new ItemList();\n items.add('pagination', m(Pagination, {\n total: app.extensionManager.extensions.totalItems,\n perPage: app.extensionManager.extensions.pageSize,\n currentPage: app.extensionManager.extensions.getLocation().page,\n onChange: page => {\n const current = app.extensionManager.extensions.getLocation().page;\n if (current === page) {\n return;\n }\n this.load(page);\n }\n }));\n items.add('premiumTermsLink', m(LinkButton, {\n className: \"Button Button--link\",\n href: \"https://flarum.org/terms/premium-extensions\",\n external: true,\n target: \"_blank\",\n icon: \"fas fa-circle-info\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.discover.premium_extension_terms')));\n return items;\n }\n setWarningDismissed(dismissed) {\n this.warningsDismissed(dismissed);\n localStorage.setItem('flarum-extension-manager.warningsDismissed', dismissed ? 'true' : 'false');\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/DiscoverSection', DiscoverSection);","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport QueueSection from './QueueSection';\nimport ControlSection from './ControlSection';\nimport ConfigureComposer from './ConfigureComposer';\nimport ConfigureAuth from './ConfigureAuth';\nimport DiscoverSection from './DiscoverSection';\nimport Alert from 'flarum/common/components/Alert';\nexport default class SettingsPage extends ExtensionPage {\n content() {\n const settings = app.registry.getSettings(this.extension.id);\n return m(\"div\", {\n className: \"ExtensionPage-settings\"\n }, m(\"div\", {\n className: \"container\"\n }, settings ? [m(\"div\", {\n className: \"Form-group\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.sections.settings.title')), m(\"div\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-extension-manager.admin.sections.settings.description'))), m(\"div\", {\n className: \"FormSectionGroup ExtensionManager-SettingsGroups\"\n }, m(\"div\", {\n className: \"FormSection\"\n }, m(\"label\", null, app.translator.trans('flarum-extension-manager.admin.settings.title')), m(\"div\", {\n className: \"Form\"\n }, settings.map(this.buildSettingComponent.bind(this))), m(\"div\", {\n className: \"Form-group Form--controls\"\n }, this.submitButton())), m(ConfigureComposer, {\n buildSettingComponent: this.buildSettingComponent\n }), m(ConfigureAuth, {\n buildSettingComponent: this.buildSettingComponent\n }))] : m(\"h3\", {\n className: \"ExtensionPage-subHeader\"\n }, app.translator.trans('core.admin.extension.no_settings'))));\n }\n sections(vnode) {\n const items = super.sections(vnode);\n const writableDirs = app.data['flarum-extension-manager.writable_dirs'];\n const missingFunctions = app.data['flarum-extension-manager.missing_functions'];\n const usable = writableDirs && (!missingFunctions || missingFunctions.length === 0);\n if (usable) {\n items.add('discover', m(DiscoverSection, null), 15);\n items.add('control', m(ControlSection, null), 10);\n } else {\n items.add('warning', m(\"div\", {\n className: \"ExtensionPage-settings\"\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n type: \"error\",\n dismissible: false\n }, !app.data['flarum-extension-manager.writable_dirs'] ? app.translator.trans('flarum-extension-manager.admin.file_permissions') : app.translator.trans('flarum-extension-manager.admin.required_php_functions', {\n functions: app.data['flarum-extension-manager.missing_functions'].join(', ')\n }))))), 10);\n }\n items.setPriority('content', 8);\n if (app.data.settings['flarum-extension-manager.queue_jobs'] !== '0' && app.data.settings['flarum-extension-manager.queue_jobs']) {\n items.add('queue', m(QueueSection, null), 5);\n }\n items.remove('permissions');\n return items;\n }\n onsaved() {\n super.onsaved();\n m.redraw();\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/components/SettingsPage', SettingsPage);","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\tspace: true,\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\tconst separator = options.space ? ' ' : '';\n\n\tif (options.signed && number === 0) {\n\t\treturn ` 0${separator}${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 + separator + 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 + separator + unit;\n}\n","import Model from 'flarum/common/Model';\nimport prettyBytes from 'pretty-bytes';\nexport default class Task extends Model {\n status() {\n return Model.attribute('status').call(this);\n }\n operation() {\n return Model.attribute('operation').call(this);\n }\n command() {\n return Model.attribute('command').call(this);\n }\n package() {\n return Model.attribute('package').call(this);\n }\n output() {\n return Model.attribute('output').call(this);\n }\n guessedCause() {\n return Model.attribute('guessedCause').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n startedAt() {\n return Model.attribute('startedAt', Model.transformDate).call(this);\n }\n finishedAt() {\n return Model.attribute('finishedAt', Model.transformDate).call(this);\n }\n peakMemoryUsed() {\n return prettyBytes(Model.attribute('peakMemoryUsed').call(this) * 1024);\n }\n}\nflarum.reg.add('flarum-extension-manager', 'admin/models/Task', Task);","import Extend from 'flarum/common/extenders';\nimport app from 'flarum/admin/app';\nimport SettingsPage from './components/SettingsPage';\nimport Task from './models/Task';\nimport ExternalExtension from './models/ExternalExtension';\nexport default [new Extend.Store() //\n.add('extension-manager-tasks', Task).add('external-extensions', ExternalExtension), new Extend.Admin().setting(() => ({\n setting: 'flarum-extension-manager.queue_jobs',\n label: app.translator.trans('flarum-extension-manager.admin.settings.queue_jobs'),\n help: app.translator.trans('flarum-extension-manager.admin.settings.queue_jobs_help', {\n basic_impl_link: m(\"a\", {\n href: \"https://discuss.flarum.org/d/28151-database-queue-the-simplest-queue-even-for-shared-hosting\"\n }),\n adv_impl_link: m(\"a\", {\n href: \"https://discuss.flarum.org/d/21873-redis-sessions-cache-queues\"\n }),\n php_version: m(\"strong\", null, app.data.phpVersion),\n folder_perms_link: m(\"a\", {\n href: \"https://docs.flarum.org/install#folder-ownership\"\n })\n }),\n type: 'boolean',\n disabled: app.data['flarum-extension-manager.using_sync_queue']\n})).setting(() => ({\n setting: 'flarum-extension-manager.task_retention_days',\n label: app.translator.trans('flarum-extension-manager.admin.settings.task_retention_days'),\n help: app.translator.trans('flarum-extension-manager.admin.settings.task_retention_days_help'),\n type: 'number'\n})).page(SettingsPage).generalIndexItems('settings', () => [{\n id: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help', {}, true)\n}, {\n id: 'repositories',\n label: app.translator.trans('flarum-extension-manager.admin.composer.repositories.label', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.composer.repositories.help', {}, true)\n}, {\n id: 'composer-auth',\n label: app.translator.trans('flarum-extension-manager.admin.auth_config.title', {}, true)\n}, {\n id: 'updates',\n label: app.translator.trans('flarum-extension-manager.admin.updater.updater_title', {}, true),\n help: app.translator.trans('flarum-extension-manager.admin.updater.updater_help', {}, true)\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 jumpToQueue from './utils/jumpToQueue';\nimport ExtensionManagerState from './states/ExtensionManagerState';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-extension-manager', app => {\n app.extensionManager = new ExtensionManagerState();\n if (app.data['flarum-extension-manager.using_sync_queue']) {\n app.data.settings['flarum-extension-manager.queue_jobs'] = '0';\n }\n extend(ExtensionPage.prototype, 'topItems', function (items) {\n if (this.extension.id === 'flarum-extension-manager' || isExtensionEnabled(this.extension.id)) {\n return;\n }\n items.add('remove', m(Button, {\n className: \"Button Button--danger\",\n icon: \"fas fa-times\",\n onclick: () => {\n app.modal.show(LoadingModal);\n app.request({\n url: `${app.forum.attribute('apiUrl')}/extension-manager/extensions/${this.extension.id}`,\n method: 'DELETE'\n }).then(response => {\n if (response?.processing) {\n jumpToQueue();\n } else {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-extension-manager.admin.extensions.successful_remove'));\n window.location = app.forum.attribute('adminUrl');\n }\n }).finally(() => {\n app.modal.close();\n });\n }\n }, app.translator.trans('flarum-extension-manager.admin.extensions.remove')));\n });\n});"],"names":["module","exports","t","s","n","i","e","r","o","u","d","a","h","years","months","days","hours","minutes","seconds","milliseconds","weeks","c","g","f","$l","m","p","l","$","Math","ceil","floor","y","abs","v","negative","format","this","$d","$ms","parseFromMilliseconds","Object","keys","forEach","calMilliseconds","match","slice","map","Number","prototype","reduce","toISOString","round","toJSON","Y","YY","YYYY","M","MM","D","DD","H","HH","mm","ss","SSS","replace","String","as","get","add","subtract","locale","clone","humanize","fromNow","valueOf","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","$utils","duration","isDuration","bind","__webpack_module_cache__","__webpack_require__","moduleId","flarum","reg","_webpack_runtimes","cachedModule","undefined","__webpack_modules__","call","getter","__esModule","definition","key","defineProperty","enumerable","obj","prop","hasOwnProperty","Symbol","toStringTag","value","jumpToQueue","close","route","set","id","queue","load","setTimeout","document","getElementById","scrollIntoView","block","_typeof","iterator","constructor","_defineProperty","toPrimitive","TypeError","toPropertyKey","configurable","writable","window","QueueState","params","actionTaken","loading","page","limit","offset","find","then","data","tasks","total","payload","meta","redraw","pendingTask","task","status","pollQueue","control","setLoading","location","reload","isLoading","getItems","getTotalItems","getTotalPages","pageNumber","getPerPage","hasPrev","hasNext","prev","next","goto","polling","clearTimeout","hasPending","error","response","errors","includes","code","clear","guessed_cause","show","type","trans","ControlSectionState","lastUpdateRun","JSON","parse","settings","limitedPackages","major","minor","global","lastUpdateCheck","extensionUpdates","formatExtensionUpdates","coreUpdate","formatCoreUpdate","name","hasOperationRunning","requirePackage","method","url","attribute","body","processing","extensionId","extension","href","catch","errorHandler","finally","checkForUpdates","updateCoreMinor","confirm","updateExtension","updateMode","extra","title","updateGlobally","packageUpdates","updates","installed","filter","composerPackage","extensions","safeToUpdate","values","core","pop","package","version","icon","backgroundImage","resources","links","majorUpdate","_ref","dryRun","updateState","incompatibleExtensions","incompatible_extensions","ExtensionListState","super","sort","sortMap","label","ExtensionManagerState","Label","view","vnode","className","attrs","assign","children","TaskOutputModal","operation","content","guessedCause","command","output","humanDuration","start","end","dayjs","extend","durationTime","diff","QueueSection","oninit","onclick","disabled","queueTable","columns","items","operationIcon","style","running","failure","pending","success","size","display","startedAt","finishedAt","text","peakMemoryUsed","length","toArray","item","index","currentPage","perPage","onChange","update_check","update_major","update_minor","update_global","extension_install","extension_remove","extension_update","why_not","Installer","arguments","packageName","htmlFor","link","semantic_link","placeholder","bidi","onsubmit","WhyNotModal","oncreate","requestWhyNot","whyNot","reason","VersionStability","isProductionReady","Stable","stability","split","toLowerCase","Alpha","Beta","RC","Dev","ExternalExtension","isSupported","currentVersion","latestCompatibleVersion","latestFlarumVersionSupported","highestVersion","toLocalExtension","description","backgroundColor","color","discuss","discussUri","website","httpUri","ExtensionCard","getExtension","isCore","isDanger","badges","actionItems","metaItems","iconUrl","isPremium","latestVersion","count","downloads","formattedCount","target","external","onClickUpdate","whyNotWarning","buttonClassName","soft","hard","charAt","substring","MajorUpdater","alt","src","update","dismissible","controls","Updater","lastUpdateCheckView","controlItems","availableUpdatesView","checkedAt","state","hasMinorCoreUpdate","ControlSection","ConfigureJson","submit","submitButton","isDirty","customSettingComponents","customFieldComponents","setting","readOnly","configuration","initialSettings","Array","isArray","stringify","RepositoryModal","repository","context","types","composer","vcs","path","options","onchange","hide","ConfigureComposer","buildSettingComponent","help","stable","beta","alpha","dev","newName","repositories","push","AuthMethodModal","host","token","bearer","oninput","rows","startsWith","ConfigureAuth","authSettings","hasAuthSettings","every","hosts","newType","oldHost","DiscoverSection","throttle","getParams","refreshParams","q","warningsDismissed","localStorage","getItem","setWarningDismissed","ondismiss","warningItems","tabItems","toolbarPrimaryItems","toolbarSecondaryItems","extensionList","footerItems","tabFilters","active","theme","tabs","tab","changeFilter","debugEnabled","search","applySearch","inputAttrs","clearable","prefixIcon","sortOptions","acc","sortId","accessibleToggleLabel","changeSort","activeType","is","party","hasItems","getPages","totalItems","pageSize","getLocation","dismissed","setItem","SettingsPage","getSettings","sections","writableDirs","missingFunctions","functions","join","setPriority","remove","onsaved","BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","result","Task","createdAt","isFinite","UNITS","bits","binary","space","separator","signed","isNegative","prefix","localeOptions","minimumFractionDigits","maximumFractionDigits","exponent","min","log","log10","toPrecision","prettyBytes","basic_impl_link","adv_impl_link","php_version","phpVersion","folder_perms_link","generalIndexItems","app","extensionManager","modal","request","forum","alerts","translator"],"sourceRoot":""} \ No newline at end of file