(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>u});const o=flarum.core.compat["common/extenders"];var r=t.n(o);function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}const i=flarum.core.compat["common/Model"];var c=t.n(i),s=function(t){function e(){for(var e,o=arguments.length,r=new Array(o),n=0;n-1?o.client.redirect_uri().split(" "):[o.client.redirect_uri()],p().forum.attribute("foskym-oauth-center.require_exact_redirect_uri")&&-1==e.indexOf(r.redirect_uri)&&m.route.set("/"),p().forum.attribute("foskym-oauth-center.allow_implicit")&&"token"==r.response_type&&m.route.set("/"),p().forum.attribute("foskym-oauth-center.enforce_state")&&null==r.enforce_state&&m.route.set("/")}})))},o.setTitle=function(){p().setTitle(z()(p().translator.trans("foskym-oauth-center.forum.page.title.authorize"))),p().setTitleCount(0)},o.view=function(){return this.client?m("div",{className:"AuthorizePage"},m("div",{className:"container"},m("div",{class:"oauth-area"},m("div",{class:"oauth-main"},m("div",{class:"oauth-box oauth-header"},m("h2",null,p().forum.attribute("title")),m("p",null,p().translator.trans("foskym-oauth-center.forum.authorize.access")," ",m("a",{href:this.client.client_home(),target:"_blank"},this.client.client_name()))),m("div",{class:"oauth-box oauth-body"},m("div",{class:"oauth-top"},m("img",{src:p().forum.attribute("faviconUrl")}),m("i",{class:"fas fa-exchange-alt fa-2x"}),m(j(),{text:this.client.client_desc()},m("img",{src:this.client.client_icon()}))),m("div",{class:"oauth-scope-area"},m("div",{class:"oauth-scope"},m("div",{class:"oauth-scope-left"},m("img",{class:"oauth-scope-object",src:"/static/icon.jpg",style:"width:32px"})),m("div",{class:"oauth-scope-body"},m("h6",{class:"oauth-scope-heading"},"保持对已向 计量便民平台 授予访问权限的数据的访问权限 "),m("small",null,"即使当前没有使用该应用,也允许 计量便民平台 查看和更新你授予其访问权限的数据。这不会向 计量便民平台 授予任何其他权限。 "))),m("div",{class:"oauth-scope"},m("div",{class:"oauth-scope-left"},m("i",{class:"oauth-scope-object fa-2x fa fa-user",style:"margin-left:2px;color:#000"})),m("div",{class:"oauth-scope-body"},m("h6",{class:"oauth-scope-heading"},"读取用户个人资料 "),m("small",null,"访问该用户(mouse123)的个人信息、最新动态等 ")))),m("form",{class:"oauth-form",method:"post",id:"form"},m("input",{type:"hidden",name:"response_type",value:"code"}),m("input",{type:"hidden",name:"client_id",value:"0eaCTcndUqIGo9LymQ3YVZGYVpEXcHer"}),m("input",{type:"hidden",name:"redirect_uri",value:"http://cjludev.top/user/auth/callback"}),m("input",{type:"hidden",name:"state",value:"123"}),m("input",{type:"hidden",name:"scope",value:"basic get_user_info"}),m("div",{style:"display: flex;"},m("button",{class:"btn btn-success btn-block",type:"submit",id:"authorize",style:"width: 50%;"},"授权"),m("button",{class:"btn btn-danger btn-block",id:"refuse",style:"width: 50%;"},"拒绝")))))))):""},e}(v()),w=function(t){function e(){return t.apply(this,arguments)||this}a(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},o.content=function(){return m("div",{className:"AuthorizedPage"})},e}(f());p().initializers.add("foskym/flarum-oauth-center",(function(){p().routes["oauth.authorize"]={path:"/oauth/authorize",component:P},p().routes["user.authorized"]={path:"/u/:username/authorized",component:w},(0,d.extend)(f().prototype,"navItems",(function(t){p().session.user&&p().session.user.id()===this.user.id()&&t.add("authorized",_().component({href:p().route("user.authorized",{username:this.user.username()}),icon:"fas fa-user-friends"},[p().translator.trans("foskym-oauth-center.forum.page.label.authorized")]),-110)}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map