(()=>{vart={n:e=>{varn=e&&e.__esModule?()=>e.default:()=>e;returnt.d(n,{a:n}),n},d:(e,n)=>{for(varoinn)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);constn=flarum.core.compat["common/app"];t.n(n)().initializers.add("foskym/flarum-oauth-center",(function(){console.log("[foskym/flarum-oauth-center] Hello, forum and admin!")}));consto=flarum.core.compat["admin/app"];vars=t.n(o);functiona(t,e){returna=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){returnt.__proto__=e,t},a(t,e)}functionr(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}consti=flarum.core.compat["admin/components/ExtensionPage"];varc=t.n(i);constu=flarum.core.compat["common/components/Button"];varl=t.n(u);constf=flarum.core.compat["common/components/Page"];varh=t.n(f);constp=flarum.core.compat["common/components/FieldSet"];vard=t.n(p);constg=flarum.core.compat["admin/utils/saveSettings"];varv=t.n(g);consty=flarum.core.compat["common/utils/Stream"];var_=t.n(y);flarum.core.compat["common/components/Select"];constk=flarum.core.compat["common/components/Switch"];varb=t.n(k),S=function(t){functione(){returnt.apply(this,arguments)||this}r(e,t);varn=e.prototype;returnn.oninit=function(e){varn=this;t.prototype.oninit.call(this,e),this.saving=!1,this.fields=["foskym-oauth-center.access_lifetime","foskym-oauth-center.allow_implicit","foskym-oauth-center.enforce_state","foskym-oauth-center.require_exact_redirect_uri"],this.values={};varo=s().data.settings;this.fields.forEach((function(t){returnn.values[t]=_()(o[t]||"")}));for(vara=1;a<this.fields.length;a++)this.values[this.fields[a]]="1"===o[this.fields[a]]},n.view=function(){vart=this;returnm("div",null,m("form",{onsubmit:this.onsubmit.bind(this),className:"BasicsPage"},d().component({},[m("div",{style:"height: 5px;"}),b().component({state:this.values["foskym-oauth-center.allow_implicit"],onchange:function(e){returnt.saveSingleSetting("foskym-oauth-center.allow_implicit",e)},loading:this.saving},s().translator.trans("foskym-oauth-center.admin.settings.allow_implicit"))]),d().component({},[m("div",{style:"height: 5px;"}),b().component({state:this.values["foskym-oauth-center.enforce_state"],onchange:function(e){returnt.saveSingleSetting("foskym-oauth-center.enforce_state",e)},loading:this.saving},s().translator.trans("foskym-oauth-center.admin.settings.enforce_state"))]),d().component({},[m("div",{style:"height: 5px;"}),b().component({state:this.values["foskym-oauth-center.require_exact_redirect_uri"],onchange:function(e){returnt.saveSingleSetting("foskym-oauth-center.require_exact_redirect_uri",e)},loading:this.saving},s().translator.trans("foskym-oauth-center.admin.settings.require_exact_redirect_uri"))]),m("hr",null),d().component({},[m("input",{className:"FormControl",bidi:this.values["foskym-oauth-center.access_lifetime"],placeholder:s().translator.trans("foskym-oauth-center.admin.settings.access_lifetime"),required:!0}),m("div",{className:"helpText"},s().translator.trans("foskym-oauth-center.admin.settings.access_lifetime")),l().component({type:"submit",className:"Button Button--primary",loading:this.saving},s().translator.trans("core.admin.settings.submit_button"))])))},n.saveSingleSetting=function(t,e){varn=this;if(!this.saving){this.saving=!0,this.values[t]=e;varo={};o[t]=e,v()(o).then((function(){returns().alerts.show({type:"success"},s().translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){n.saving=!1,m.redraw()}))}},n.onsubmit=function(t){vare=this;if(t.preventDefault(),!this.saving){this.saving=!0,s().alerts.dismiss(this.successAlert);varn={};n["foskym-oauth-center.access_lifetime"]=this.values["foskym-oauth-center.access_lifetime"](),""===n["foskym-oauth-center.access_lifetime"]&&(n["foskym-oauth-center