diff --git a/conf/app.conf b/conf/app.conf index 999319d8..4a801370 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -6,4 +6,5 @@ copyrequestbody = true dataSourceName = root:123@tcp(localhost:3306)/ dbName = casdoor AuthState = "casdoor" -UseProxy = false \ No newline at end of file +UseProxy = false +EnableDocs = true \ No newline at end of file diff --git a/controllers/account.go b/controllers/account.go index 15dc5075..89287947 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -58,7 +58,7 @@ type Response struct { // @Description register a new user // @Param username formData string true "The username to register" // @Param password formData string true "The password" -// @Success 200 {object} controllers.api_controller.Response The Response object +// @Success 200 {object} controllers.Response The Response object // @router /register [post] func (c *ApiController) Register() { var resp Response @@ -104,7 +104,7 @@ func (c *ApiController) Register() { // @Title Logout // @Description logout the current user -// @Success 200 {object} controllers.api_controller.Response The Response object +// @Success 200 {object} controllers.Response The Response object // @router /logout [post] func (c *ApiController) Logout() { var resp Response @@ -120,6 +120,10 @@ func (c *ApiController) Logout() { c.ServeJSON() } +// @Title GetAccount +// @Description get the details of the current account +// @Success 200 {object} controllers.Response The Response object +// @router /get-account [get] func (c *ApiController) GetAccount() { var resp Response @@ -138,6 +142,12 @@ func (c *ApiController) GetAccount() { c.ServeJSON() } +// @Title UploadAvatar +// @Description register a new user +// @Param avatarfile formData string true "The base64 encode of avatarfile" +// @Param password formData string true "The password" +// @Success 200 {object} controllers.Response The Response object +// @router /upload-avatar [post] func (c *ApiController) UploadAvatar() { var resp Response username := c.GetSessionUser() diff --git a/controllers/application.go b/controllers/application.go index cb15dcb0..eb27f8fd 100644 --- a/controllers/application.go +++ b/controllers/application.go @@ -20,6 +20,11 @@ import ( "github.com/casdoor/casdoor/object" ) +// @Title GetApplications +// @Description get all applications +// @Param owner query string true "The owner of applications." +// @Success 200 {array} object.Application The Response object +// @router /get-applications [get] func (c *ApiController) GetApplications() { owner := c.Input().Get("owner") @@ -27,6 +32,11 @@ func (c *ApiController) GetApplications() { c.ServeJSON() } +// @Title GetApplication +// @Description get the detail of an application +// @Param id query string true "The id of the application." +// @Success 200 {object} object.Application The Response object +// @router /get-application [get] func (c *ApiController) GetApplication() { id := c.Input().Get("id") @@ -34,6 +44,12 @@ func (c *ApiController) GetApplication() { c.ServeJSON() } +// @Title UpdateApplication +// @Description update an application +// @Param id query string true "The id of the application" +// @Param body body object.Application true "The details of the application" +// @Success 200 {object} controllers.Response The Response object +// @router /update-application [post] func (c *ApiController) UpdateApplication() { id := c.Input().Get("id") @@ -47,6 +63,11 @@ func (c *ApiController) UpdateApplication() { c.ServeJSON() } +// @Title AddApplication +// @Description add an application +// @Param body body object.Application true "The details of the application" +// @Success 200 {object} controllers.Response The Response object +// @router /add-application [post] func (c *ApiController) AddApplication() { var application object.Application err := json.Unmarshal(c.Ctx.Input.RequestBody, &application) @@ -58,6 +79,11 @@ func (c *ApiController) AddApplication() { c.ServeJSON() } +// @Title DeleteApplication +// @Description delete an application +// @Param body body object.Application true "The details of the application" +// @Success 200 {object} controllers.Response The Response object +// @router /delete-application [post] func (c *ApiController) DeleteApplication() { var application object.Application err := json.Unmarshal(c.Ctx.Input.RequestBody, &application) diff --git a/controllers/auth.go b/controllers/auth.go index 5bfac87c..3fbe76c9 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -53,6 +53,15 @@ func (c *ApiController) HandleLoggedIn(userId string, form *RequestForm) *Respon return resp } +// @Title GetApplicationLogin +// @Description get application login +// @Param clientId query string true "client id" +// @Param responseType query string true "response type" +// @Param redirectUri query string true "redirect uri" +// @Param scope query string true "scope" +// @Param state query string true "state" +// @Success 200 {object} controllers.api_controller.Response The Response object +// @router /update-application [get] func (c *ApiController) GetApplicationLogin() { var resp Response @@ -72,6 +81,12 @@ func (c *ApiController) GetApplicationLogin() { c.ServeJSON() } +// @Title Login +// @Description login +// @Param oAuthParams query string true "oAuth parameters" +// @Param body body RequestForm true "Login information" +// @Success 200 {object} controllers.api_controller.Response The Response object +// @router /login [post] func (c *ApiController) Login() { resp := &Response{Status: "null", Msg: ""} var form RequestForm diff --git a/controllers/organization.go b/controllers/organization.go index ef1cf971..abaee896 100644 --- a/controllers/organization.go +++ b/controllers/organization.go @@ -20,6 +20,11 @@ import ( "github.com/casdoor/casdoor/object" ) +// @Title GetOrganizations +// @Description get organizations +// @Param owner query string true "owner" +// @Success 200 {array} object.Organization The Response object +// @router /get-organizations [get] func (c *ApiController) GetOrganizations() { owner := c.Input().Get("owner") @@ -27,6 +32,11 @@ func (c *ApiController) GetOrganizations() { c.ServeJSON() } +// @Title GetOrganization +// @Description get organization +// @Param id query string true "organization id" +// @Success 200 {object} object.Organization The Response object +// @router /get-organization [get] func (c *ApiController) GetOrganization() { id := c.Input().Get("id") @@ -34,6 +44,12 @@ func (c *ApiController) GetOrganization() { c.ServeJSON() } +// @Title UpdateOrganization +// @Description update organization +// @Param id query string true "The id of the organization" +// @Param body body object.Organization true "The details of the organization" +// @Success 200 {object} controllers.Response The Response object +// @router /update-organization [post] func (c *ApiController) UpdateOrganization() { id := c.Input().Get("id") @@ -47,6 +63,11 @@ func (c *ApiController) UpdateOrganization() { c.ServeJSON() } +// @Title AddOrganization +// @Description add organization +// @Param body body object.Organization true "The details of the organization" +// @Success 200 {object} controllers.Response The Response object +// @router /add-organization [post] func (c *ApiController) AddOrganization() { var organization object.Organization err := json.Unmarshal(c.Ctx.Input.RequestBody, &organization) @@ -58,6 +79,11 @@ func (c *ApiController) AddOrganization() { c.ServeJSON() } +// @Title DeleteOrganization +// @Description delete organization +// @Param body body object.Organization true "The details of the organization" +// @Success 200 {object} controllers.Response The Response object +// @router /delete-organization [post] func (c *ApiController) DeleteOrganization() { var organization object.Organization err := json.Unmarshal(c.Ctx.Input.RequestBody, &organization) diff --git a/controllers/provider.go b/controllers/provider.go index 72f6f3d9..2acb4e4c 100644 --- a/controllers/provider.go +++ b/controllers/provider.go @@ -20,6 +20,11 @@ import ( "github.com/casdoor/casdoor/object" ) +// @Title GetProviders +// @Description get providers +// @Param owner query string true "The owner of providers" +// @Success 200 {array} object.Provider The Response object +// @router /get-providers [get] func (c *ApiController) GetProviders() { owner := c.Input().Get("owner") @@ -27,6 +32,11 @@ func (c *ApiController) GetProviders() { c.ServeJSON() } +// @Title GetProvider +// @Description get provider +// @Param id query string true "The id of the provider" +// @Success 200 {object} object.Provider The Response object +// @router /get-provider [get] func (c *ApiController) GetProvider() { id := c.Input().Get("id") @@ -34,6 +44,12 @@ func (c *ApiController) GetProvider() { c.ServeJSON() } +// @Title UpdateProvider +// @Description update provider +// @Param id query string true "The id of the provider" +// @Param body body object.Provider true "The details of the provider" +// @Success 200 {object} controllers.Response The Response object +// @router /update-provider [post] func (c *ApiController) UpdateProvider() { id := c.Input().Get("id") @@ -47,6 +63,11 @@ func (c *ApiController) UpdateProvider() { c.ServeJSON() } +// @Title AddProvider +// @Description add provider +// @Param body body object.Provider true "The details of the provider" +// @Success 200 {object} controllers.Response The Response object +// @router /add-provider [post] func (c *ApiController) AddProvider() { var provider object.Provider err := json.Unmarshal(c.Ctx.Input.RequestBody, &provider) @@ -58,6 +79,11 @@ func (c *ApiController) AddProvider() { c.ServeJSON() } +// @Title DeleteProvider +// @Description delete provider +// @Param body body object.Provider true "The details of the provider" +// @Success 200 {object} controllers.Response The Response object +// @router /delete-provider [post] func (c *ApiController) DeleteProvider() { var provider object.Provider err := json.Unmarshal(c.Ctx.Input.RequestBody, &provider) diff --git a/controllers/token.go b/controllers/token.go index 84cc1ed7..45110fe6 100644 --- a/controllers/token.go +++ b/controllers/token.go @@ -20,6 +20,11 @@ import ( "github.com/casdoor/casdoor/object" ) +// @Title GetTokens +// @Description get tokens +// @Param owner query string true "The owner of tokens" +// @Success 200 {array} object.Token The Response object +// @router /get-tokens [get] func (c *ApiController) GetTokens() { owner := c.Input().Get("owner") @@ -27,6 +32,11 @@ func (c *ApiController) GetTokens() { c.ServeJSON() } +// @Title GetToken +// @Description get token +// @Param id query string true "The id of token" +// @Success 200 {object} object.Token The Response object +// @router /get-token [get] func (c *ApiController) GetToken() { id := c.Input().Get("id") @@ -34,6 +44,12 @@ func (c *ApiController) GetToken() { c.ServeJSON() } +// @Title UpdateToken +// @Description update token +// @Param id query string true "The id of token" +// @Param body body object.Token true "Details of the token" +// @Success 200 {object} controllers.Response The Response object +// @router /update-token [post] func (c *ApiController) UpdateToken() { id := c.Input().Get("id") @@ -47,6 +63,11 @@ func (c *ApiController) UpdateToken() { c.ServeJSON() } +// @Title AddToken +// @Description add token +// @Param body body object.Token true "Details of the token" +// @Success 200 {object} controllers.Response The Response object +// @router /add-token [post] func (c *ApiController) AddToken() { var token object.Token err := json.Unmarshal(c.Ctx.Input.RequestBody, &token) @@ -58,6 +79,11 @@ func (c *ApiController) AddToken() { c.ServeJSON() } +// @Title DeleteToken +// @Description delete token +// @Param body body object.Token true "Details of the token" +// @Success 200 {object} controllers.Response The Response object +// @router /delete-token [post] func (c *ApiController) DeleteToken() { var token object.Token err := json.Unmarshal(c.Ctx.Input.RequestBody, &token) @@ -69,6 +95,14 @@ func (c *ApiController) DeleteToken() { c.ServeJSON() } +// @Title GetOAuthToken +// @Description get oAuth token +// @Param grant_type query string true "oAuth grant type" +// @Param client_id query string true "oAuth client id" +// @Param client_secret query string true "oAuth client secret" +// @Param code query string true "oAuth code" +// @Success 200 {object} object.TokenWrapper The Response object +// @router /login/oauth/access_token [post] func (c *ApiController) GetOAuthToken() { grantType := c.Input().Get("grant_type") clientId := c.Input().Get("client_id") diff --git a/controllers/user.go b/controllers/user.go index ad125f80..870721bf 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -20,11 +20,20 @@ import ( "github.com/casdoor/casdoor/object" ) +// @Title GetGlobalUsers +// @Description get global users +// @Success 200 {array} object.User The Response object +// @router /get-global-users [get] func (c *ApiController) GetGlobalUsers() { c.Data["json"] = object.GetGlobalUsers() c.ServeJSON() } +// @Title GetUsers +// @Description +// @Param owner query string true "The owner of users" +// @Success 200 {array} object.User The Response object +// @router /get-users [get] func (c *ApiController) GetUsers() { owner := c.Input().Get("owner") @@ -32,6 +41,11 @@ func (c *ApiController) GetUsers() { c.ServeJSON() } +// @Title GetUser +// @Description get user +// @Param id query string true "The id of the user" +// @Success 200 {object} object.User The Response object +// @router /get-user [get] func (c *ApiController) GetUser() { id := c.Input().Get("id") @@ -39,6 +53,12 @@ func (c *ApiController) GetUser() { c.ServeJSON() } +// @Title UpdateUser +// @Description update user +// @Param id query string true "The id of the user" +// @Param body body object.User true "The details of the user" +// @Success 200 {object} controllers.Response The Response object +// @router /update-user [post] func (c *ApiController) UpdateUser() { id := c.Input().Get("id") @@ -52,6 +72,11 @@ func (c *ApiController) UpdateUser() { c.ServeJSON() } +// @Title AddUser +// @Description add user +// @Param body body object.User true "The details of the user" +// @Success 200 {object} controllers.Response The Response object +// @router /add-user [post] func (c *ApiController) AddUser() { var user object.User err := json.Unmarshal(c.Ctx.Input.RequestBody, &user) @@ -63,6 +88,11 @@ func (c *ApiController) AddUser() { c.ServeJSON() } +// @Title DeleteUser +// @Description delete user +// @Param body body object.User true "The details of the user" +// @Success 200 {object} controllers.Response The Response object +// @router /delete-user [post] func (c *ApiController) DeleteUser() { var user object.User err := json.Unmarshal(c.Ctx.Input.RequestBody, &user) diff --git a/main.go b/main.go index a7ec2bb3..fa203e36 100644 --- a/main.go +++ b/main.go @@ -41,6 +41,8 @@ func main() { //beego.DelStaticPath("/static") beego.SetStaticPath("/static", "web/build/static") + beego.BConfig.WebConfig.DirectoryIndex = true + beego.SetStaticPath("/swagger", "swagger") // https://studygolang.com/articles/2303 beego.InsertFilter("*", beego.BeforeRouter, routers.StaticFilter) beego.InsertFilter("*", beego.BeforeRouter, routers.AutoLoginFilter) diff --git a/routers/router.go b/routers/router.go index 65cb43bb..7cc7e624 100644 --- a/routers/router.go +++ b/routers/router.go @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +// @APIVersion 1.0.0 +// @Title Casdoor API +// @Description Documentation of Casdoor API +// @Contact admin@casbin.org package routers import ( @@ -27,8 +31,10 @@ func init() { func initAPI() { ns := beego.NewNamespace("/api", - beego.NSInclude( - &controllers.ApiController{}, + beego.NSNamespace("/api", + beego.NSInclude( + &controllers.ApiController{}, + ), ), ) beego.AddNamespace(ns) diff --git a/swagger/favicon-16x16.png b/swagger/favicon-16x16.png new file mode 100644 index 00000000..0f7e13b0 Binary files /dev/null and b/swagger/favicon-16x16.png differ diff --git a/swagger/favicon-32x32.png b/swagger/favicon-32x32.png new file mode 100644 index 00000000..b0a3352f Binary files /dev/null and b/swagger/favicon-32x32.png differ diff --git a/swagger/index.html b/swagger/index.html new file mode 100644 index 00000000..d425107a --- /dev/null +++ b/swagger/index.html @@ -0,0 +1,93 @@ + + + +
+ +>>u&yn;if(_!==h>>>u&yn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&h
a&&(a=c.size),o(u)||(c=c.map(function(e){return V(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Ie(e,t,i)}function $e(e){return es)return k();var e=i.next();return r||t===xn?e:t===bn?w(t,u-1,void 0,e):w(t,u-1,e.value[1],e)})},c}function dt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new x(function(){if(!s)return k();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:w(r,u,c,e):(s=!1,k())})},r}function mt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new x(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===xn?e:i===bn?w(i,c++,void 0,e):w(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:w(i,o,l,e)})},i}function yt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?L(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new I(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function vt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c=Vn)return Oe(e,f,c,s,d);if(l&&!d&&2===f.length&&Ee(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&Ee(d))return d;var m=e&&e===this.ownerID,y=l?d?c:c^u:c|u,v=l?d?Ne(f,p,d,m):Be(f,p,m):Fe(f,p,d,m);return m?(this.bitmap=y,this.nodes=v,this):new de(e,y,v)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&yn,o=this.nodes[i];return o?o.get(e+dn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,u=i===vn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=Se(l,e,t+dn,n,r,i,o,a);if(p===l)return this;var f=this.count;if(l){if(!p&&(f--,ft)return e.textContent;var o=function(e){for(var t,o,a,s,u,c=e.textContent,l=0,p=c[0],f=1,h=e.innerHTML="",d=0;o=t,t=d<7&&"\\"==t?1:f;){if(f=p,p=c[++l],s=h.length>1,!f||d>8&&"\n"==f||[/\S/[i](f),1,1,!/[$\w]/[i](f),("/"==t||"\n"==t)&&s,'"'==t&&s,"'"==t&&s,c[l-4]+o+t=="-->",o+t=="*/"][d])for(h&&(e[r](u=n.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][d?d<3?2:d>6?4:d>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[i](h):0]),u[r](n.createTextNode(h))),a=d&&d<7?d:a,h="",d=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[i](f),/[\])]/[i](f),/[$\w]/[i](f),"/"==f&&a<2&&"<"!=t,'"'==f,"'"==f,f+p+c[l+1]+c[l+2]=="':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return(0,z.memoizedCreateXMLExample)(e,n)}return JSON.stringify((0,z.memoizedSampleFromSchema)(e,n),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var n=t.substr(1).split("&");for(var r in n)r=n[r].split("="),e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e},t.btoa=function(t){var n=void 0;return n=t instanceof e?t:new e(t.toString(),"utf-8"),n.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var n=void 0,r={};for(n in e)t.indexOf(n)!==-1&&(r[n]=e[n]);return r}}).call(t,n(299).Buffer)},function(e,t,n){"use strict";var r=n(337);e.exports=function(e,t,n,i){var o=n?n.call(i,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=r(e),s=r(t),u=a.length;if(u!==s.length)return!1;i=i||null;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l-1&&e%1==0&&e","
"],l=[3,"
"],p=[1,'"],f={"*":[1,"?","
"],legend:[1,""],param:[1,""],tr:[2,"","
"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(694),i=n(653),o={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(e,t){t&&(G[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&U in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",r(e)):void 0)}function o(e,t,n,r){if(!(r instanceof I)){var i=e._hostContainerInfo,o=i._node&&i._node.nodeType===K,s=o?i._node:i._ownerDocument;B(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;k.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;T.postMountWrapper(e)}function u(){var e=this;M.postMountWrapper(e)}function c(){var e=this;O.postMountWrapper(e)}function l(){var e=this;e._rootNodeID?void 0:m("63");var t=F(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[E.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in V)V.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(n,V[n],t));break;case"source":e._wrapperState.listeners=[E.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent("topError","error",t),E.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent("topReset","reset",t),E.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[E.trapBubbledEvent("topInvalid","invalid",t)]}}function p(){D.postUpdateWrapper(this)}function f(e){$.call(Y,e)||(X.test(e)?void 0:m("65",e),Y[e]=!0)}function h(e,t){return e.indexOf("-")>=0||null!=t.is}function d(e){var t=e.type;f(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(654),y=n(623),v=n(707),g=n(709),_=n(695),b=n(696),x=n(655),w=n(717),k=n(661),S=n(662),E=n(719),C=n(656),A=n(653),T=n(722),O=n(725),D=n(726),M=n(727),P=(n(681),n(728)),I=n(746),j=(n(631),n(700)),R=(n(627),n(684),n(735),n(749),n(630),C),N=k.deleteListener,F=A.getNodeFromInstance,B=E.listenTo,L=S.registrationNameModules,z={string:!0,number:!0},q="style",U="__html",W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},K=11,V={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},H={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},J={listing:!0,pre:!0,textarea:!0},G=y({menuitem:!0},H),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Y={},$={}.hasOwnProperty,Z=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(l,this);break;case"input":T.mountWrapper(this,o,t),o=T.getHostProps(this,o),e.getReactMountReady().enqueue(l,this);break;case"option":O.mountWrapper(this,o,t),o=O.getHostProps(this,o);break;case"select":D.mountWrapper(this,o,t),o=D.getHostProps(this,o),e.getReactMountReady().enqueue(l,this);break;case"textarea":M.mountWrapper(this,o,t),o=M.getHostProps(this,o),e.getReactMountReady().enqueue(l,this)}i(this,o);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===b.svg&&"foreignobject"===p)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var f;if(e.useCreateElement){var h,d=n._ownerDocument;if(a===b.html)if("script"===this._tag){var m=d.createElement("div"),y=this._currentElement.type;m.innerHTML="<"+y+">"+y+">",h=m.removeChild(m.firstChild)}else h=o.is?d.createElement(this._currentElement.type,o.is):d.createElement(this._currentElement.type);else h=d.createElementNS(a,this._currentElement.type);A.precacheNode(this,h),this._flags|=R.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(h),this._updateDOMProperties(null,o,e);var g=_(h);this._createInitialChildren(e,o,r,g),f=g}else{var x=this._createOpenTagMarkupAndPutListeners(e,o),k=this._createContentMarkup(e,o,r);f=!k&&H[this._tag]?x+"/>":x+">"+k+""+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"select":o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"button":o.autoFocus&&e.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return f},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(L.hasOwnProperty(r))i&&o(this,r,i,e);else{r===q&&(i&&(i=this._previousStyleCopy=y({},t.style)),i=g.createMarkupForStyles(i,this));var a=null;null!=this._tag&&h(this._tag,t)?W.hasOwnProperty(r)||(a=w.createMarkupForCustomAttribute(r,i)):a=w.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=j(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return J[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&_.queueHTML(r,i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)""!==o&&_.queueText(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return null==e}function g(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===T(e)}function E(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function T(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;nn?p.push([l,s]):i[s]=this.yaml_path_resolvers[l][s]);else for(d=this.yaml_path_resolvers,a=0,c=d.length;a=h){o.push(x[r.op].call(r,l,i,e));break}if(E(l)){if("-"===i)i=l.length;else{if(n&&!p(i))throw new C("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a-1,r.path,r);i=parseInt(i,10)}if(f>=h){if(n&&"add"===r.op&&i>l.length)throw new C("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a-1,r.path,r);o.push(b[r.op].call(r,l,i,e));break}}else if(i&&i.indexOf("~")!=-1&&(i=i.replace(/~1/g,"/").replace(/~0/g,"~")),f>=h){o.push(_[r.op].call(r,l,i,e));break}l=l[i]}}return o}function h(e,t){var n=[];return l(e,t,n,""),n}function d(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){if(void 0===e)return!0;if(e)if(E(e)){for(var t=0,n=e.length;t