From 803b36ed3d37c07318c8d55c4b0066dc27138741 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Fri, 5 May 2017 21:46:14 +0200 Subject: [PATCH] bitbucket -> github --- README.md | 11 +- _admin.php | 8 +- _define.php | 16 +- _prepend.php | 4 +- _public.php | 214 +++++++------- documentation/definition.yaml | 130 ++++---- documentation/swagger-ui-dist/index.html | 93 ++++++ documentation/swagger-ui-dist/index.php | 1 - .../swagger-ui-dist/swagger-ui-bundle.js | 2 +- .../swagger-ui-dist/swagger-ui-bundle.js.map | 2 +- documentation/swagger-ui-dist/swagger-ui.js | 2 +- .../swagger-ui-dist/swagger-ui.js.map | 2 +- documentation/swagger.json | 39 ++- inc/class.rest.auth.php | 188 +++++++----- inc/class.rest.key.php | 171 ++++++----- inc/class.rest.query.get.blog.php | 27 ++ inc/class.rest.query.get.blogs.php | 34 ++- inc/class.rest.query.get.specs.php | 38 ++- inc/class.rest.query.php | 279 +++++++++++++----- inc/class.rest.query.post.blogs.php | 97 ++++++ index.php | 114 +++---- 21 files changed, 953 insertions(+), 519 deletions(-) create mode 100644 documentation/swagger-ui-dist/index.html create mode 100644 inc/class.rest.query.get.blog.php create mode 100644 inc/class.rest.query.post.blogs.php diff --git a/README.md b/README.md index 551019f..e3ebca3 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,9 @@ Plugin dotclear ouvrant une API REST/JSON -Interface d'administration commencée +C'est en cours de développement et est loin d'être fini. -Dégrossi les specs / documentation de l'API (swagger). -Elles seront modifiées au fur et à mesure du développement de l'API. -Pour le moment les specifications Swagger sont basées sur la structure de la base de données. -A terme, elles seront basées plus sur les fonctions de dotclear. - -PS: Des que l'architecture de ce plugin sera plus développée, je poursuivrai son dev sur Bitbucket. +Les spécifications swagger seront modifiées au fur et à mesure du développement de l'API. +Pour le moment elles sont basées sur la structure de la base de données et ne sont pas exhaustives. +A terme, elles seront basées plus sur les fonctions de dotclear. \ No newline at end of file diff --git a/_admin.php b/_admin.php index 01ba038..07b09df 100644 --- a/_admin.php +++ b/_admin.php @@ -3,7 +3,7 @@ if (!defined('DC_CONTEXT_ADMIN')) { return; } $_menu['Blog']->addItem(__('Rest API'), - 'plugin.php?p=rest', - urldecode(dcPage::getPF('rest/rest_api_256x256.png')), - preg_match('/plugin.php\?p=rest(&.*)?$/',$_SERVER['REQUEST_URI']), - $core->auth->check('contentadmin',$core->blog->id)); + 'plugin.php?p=rest', + urldecode(dcPage::getPF('rest/rest_api_256x256.png')), + preg_match('/plugin.php\?p=rest(&.*)?$/',$_SERVER['REQUEST_URI']), + $core->auth->check('contentadmin',$core->blog->id)); diff --git a/_define.php b/_define.php index c4f2bc2..1f217fc 100644 --- a/_define.php +++ b/_define.php @@ -12,12 +12,12 @@ if (!defined('DC_RC_PATH')) { return; } $this->registerModule( - /* Name */ "rest", - /* Description*/ "A JSON/REST API for Dotclear", - /* Author */ "Gnieark (hope some others contributors)", - /* Version */ '0.0.1', - array( - 'permissions' => 'usage,contentadmin', - 'type' => 'plugin', - ) + /* Name */ "rest", + /* Description*/ "A JSON/REST API for Dotclear", + /* Author */ "Gnieark (hope some others contributors)", + /* Version */ '0.0.1', + array( + 'permissions' => 'usage,contentadmin', + 'type' => 'plugin', + ) ); diff --git a/_prepend.php b/_prepend.php index f574698..ff29368 100644 --- a/_prepend.php +++ b/_prepend.php @@ -5,4 +5,6 @@ $__autoload['ApiKey'] = dirname(__FILE__).'/inc/class.rest.key.php'; $__autoload['restAuth'] = dirname(__FILE__).'/inc/class.rest.auth.php'; $__autoload['RestQuery'] = dirname(__FILE__).'/inc/class.rest.query.php'; $__autoload['RestQueryGetBlogs'] = dirname(__FILE__).'/inc/class.rest.query.get.blogs.php'; -$__autoload['RestQueryGetSpecs'] = dirname(__FILE__).'/inc/class.rest.query.get.specs.php'; \ No newline at end of file +$__autoload['RestQueryGetBlog'] = dirname(__FILE__).'/inc/class.rest.query.get.blog.php'; +$__autoload['RestQueryGetSpecs'] = dirname(__FILE__).'/inc/class.rest.query.get.specs.php'; +$__autoload['RestQueryPostBlogs'] = dirname(__FILE__).'/inc/class.rest.query.post.blogs.php'; \ No newline at end of file diff --git a/_public.php b/_public.php index 7c8c9a8..ed53f06 100644 --- a/_public.php +++ b/_public.php @@ -5,110 +5,116 @@ $core->url->register('rest','rest','^rest(?:/(.*))?$',array('rest','getResponse' class rest extends dcUrlHandlers { - /** - * Create the "good" RestQuery instance - * Input: $httpMethod: String (POST/GET/PATCH etc...) - * $args Url arguments - * $user dcAuth object - * $body Body of the input query. String - * Output: object RestQuery - */ - private function restFactoryQuery($httpMethod,$args,$user,$body){ - - //définir la methode API (pas HTML) appelée - switch($httpMethod){ - case "GET": - if($args == 'blogs'){ - $queryObj = new RestQueryGetBlogs($user); - break; - }elseif($args == 'specs'){ - $queryObj = new RestQueryGetSpecs($user); - break; - } - break; - case "POST": - - break; - case "PUT": - - break; - - case "PATCH": - - break; - - case "DELETE": - - break; - default: - $this->response_code = RestQuery::get_full_code_header(400); - $this->response_message = array( - "error" => "Unrecoknized method", - "code" => 400 - ); - return; - break; - } - - return $queryObj; - - } + /** + * Create the "good" RestQuery instance + * Input: $httpMethod: String (POST/GET/PATCH etc...) + * $args Url arguments + * $user dcAuth object + * $body Body of the input query. String + * Output: object RestQuery + */ + private function restFactoryQuery($httpMethod,$args,$body){ + //définir la methode API (pas HTML) appelée + switch($httpMethod){ + case "GET": + if($args == 'blogs'){ + $queryObj = new RestQueryGetBlogs(); + break; + }elseif($args == 'specs'){ + $queryObj = new RestQueryGetSpecs(); + break; + }elseif(preg_match('^blogs/(.+)$', $args )){ + $queryObj = new RestQueryGetBlog($args); + break; + + } + + ///blogs/{blog-id} + + + break; + case "POST": + if($args == 'blogs'){ + $queryObj = new RestQueryPostBlogs($body); + } + + break; + case "PUT": + + break; + + case "PATCH": + + break; + + case "DELETE": + + break; + default: + $queryObj = new RestQuery(); + break; + } + + return $queryObj; + + } - public static function getResponse($args) - { - global $core; - $active = (boolean)$core->blog->settings->rest->rest_active; - if (!$active){ - self::p404(); - return; - } - error_log($args); - - //exception pour la documentation - if($args == "documentation"){ + public static function getResponse($args) + { + global $core; + $active = (boolean)$core->blog->settings->rest->rest_active; + if (!$active){ + self::p404(); + return; + } + + //coors headers + if($core->blog->settings->rest->rest_send_cors_headers){ + header('Access-Control-Allow-Origin: *'); + header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE'); + header('Access-Control-Allow-Headers: Content-Type, authorization, x_dc_key'); + } + + + //exception pour la documentation + if($args == "documentation"){ include (dirname(__FILE__).'/documentation/swagger-ui-dist/index.php'); return; - } - - - //coors headers - if($core->blog->settings->rest->rest_send_cors_headers){ - header('Access-Control-Allow-Origin: *'); - header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE'); - header('Access-Control-Allow-Headers: Content-Type, authorization, x_dc_key'); - } - header('Content-Type: application/json'); - - //user authentification (facultative at this step) - $apiKey = rest::get_api_key_sended(); - $user = false; - if($apiKey){ - $user = new restAuth($core); - if($user->checkUser('','',$apiKey) === false){ - header(RestQuery::get_full_code_header(403)); - echo json_encode(array( - "error" => "Wrong API Key", - "code" => 403 - )); - return; - } - } - - $r = rest::restFactoryQuery($_SERVER['REQUEST_METHOD'],$args,$user,file_get_contents('php://input')); - header($r->response_code); - echo json_encode($r->response_message); - - } - - private function get_api_key_sended() - { - //to do: test it on nginx - $headers = apache_request_headers(); - if(isset($headers['x_dc_key'])){ - return $headers['x_dc_key']; - }else{ - return false; - } - } - -} \ No newline at end of file + } + + header('Content-Type: application/json'); + + //user authentification (facultative at this step) + $apiKey = rest::get_api_key_sended(); + //$user = false; + if($apiKey){ + $core->auth = new restAuth($core); + if($core->auth->checkUser('','',$apiKey) === false){ + header(RestQuery::get_full_code_header(403)); + echo json_encode(array( + "error" => "Wrong API Key", + "code" => 403 + )); + return; + } + }else{ + $core->auth = false; + } + $r = rest::restFactoryQuery($_SERVER['REQUEST_METHOD'],$args,file_get_contents('php://input')); + header($r->response_code); + echo json_encode($r->response_message); + + } + + private function get_api_key_sended() + { + //to do: test it on nginx + $headers = apache_request_headers(); + if(isset($headers['x_dc_key'])){ + return $headers['x_dc_key']; + }else{ + return false; + } + } + +} \ No newline at end of file diff --git a/documentation/definition.yaml b/documentation/definition.yaml index 18c7c14..7cd5471 100644 --- a/documentation/definition.yaml +++ b/documentation/definition.yaml @@ -2,18 +2,27 @@ swagger: '2.0' info: title: Dotclear API description: Manage your(s) blogs with this API - version: "0.0.1" -# the domain of the service + version: 0.0.1 host: dotclear.localhost -# array of all schemes that your API supports schemes: - http -# will be prefixed to all paths -# (part of plugin url) -basePath: /dotclear/index.php?rest/ +basePath: /dotclear/index.php?rest produces: - application/json paths: + /specs: + get: + summary: Get this API SWAGGER documentation + responses: + '200': + description: swagger.json + schema: + title: doc + type: string + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' /blogs: get: summary: Get list of availables blogs @@ -23,13 +32,12 @@ paths: required: false type: string responses: - 200: + '200': description: array serving blogs properties schema: - title: blogs type: array items: - $ref: '#/definitions/blog' + type: string default: description: Unexpected error schema: @@ -48,7 +56,7 @@ paths: $ref: '#/definitions/blog' required: true responses: - 200: + '200': description: array containing the new blog's identifiant schema: $ref: '#/definitions/Ids' @@ -56,7 +64,7 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' - /blogs/{blog-id}: + '/blogs/{blog-id}': get: summary: Get a blog poperties parameters: @@ -69,11 +77,13 @@ paths: type: string required: true responses: - 200: - description: array containing blog properties. This list of attributes is not exhaustive. + '200': + description: >- + array containing blog properties. This list of attributes is not + exhaustive. schema: $ref: '#/definitions/blogProperties' - 404: + '404': description: this blog id does not exists default: description: Unexpected error @@ -97,18 +107,20 @@ paths: schema: $ref: '#/definitions/blogProperties' responses: - 200: + '200': description: array containing the edited blog's identifiant schema: $ref: '#/definitions/Ids' - 404: + '404': description: this blog id does not exists default: description: Unexpected error schema: $ref: '#/definitions/Error' put: - summary: Overwrite blog Properties (if a parameter is not set, his value will be erased by de default value) + summary: >- + Overwrite blog Properties (if a parameter is not set, his value will be + erased by de default value) parameters: - name: x_dc_key in: header @@ -125,17 +137,16 @@ paths: schema: $ref: '#/definitions/blogProperties' responses: - 200: + '200': description: array containing the edited blog's identifiant schema: $ref: '#/definitions/Ids' - 404: + '404': description: this blog id does not exists default: description: Unexpected error schema: $ref: '#/definitions/Error' - delete: summary: Delete this blog parameters: @@ -148,18 +159,17 @@ paths: type: string required: true responses: - 200: + '200': description: array containing the deleted blog's identifiant schema: $ref: '#/definitions/Ids' - 404: + '404': description: this blog id does not exists default: description: Unexpected error schema: $ref: '#/definitions/Error' - - /{blog-id}/posts: + '/{blog-id}/posts': get: summary: Get list of posts parameters: @@ -184,16 +194,17 @@ paths: items: type: string required: false - description: Fields you want to get. If unset, fields are post_id, post_url, post_status, post_title, post_date + description: >- + Fields you want to get. If unset, fields are post_id, post_url, + post_status, post_title, post_date responses: - 200: + '200': description: list of posts schema: title: posts type: array items: $ref: '#/definitions/dc_post' - default: description: Unexpected error schema: @@ -211,11 +222,13 @@ paths: required: true - name: properties in: body - description: Some non required fields you don't define will be set (default value) by the API + description: >- + Some non required fields you don't define will be set (default + value) by the API schema: $ref: '#/definitions/new_dc_post' responses: - 200: + '200': description: Id of newly created post schema: $ref: '#/definitions/Ids' @@ -223,8 +236,7 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' - - /{blog-id}/posts/{post-id}: + '/{blog-id}/posts/{post-id}': get: summary: Get a post entry parameters: @@ -253,11 +265,11 @@ paths: items: type: string required: false - description: Fields you want to get. If unset, all available fields will be get. + description: 'Fields you want to get. If unset, all available fields will be get.' responses: - 200: + '200': description: The post values - schema: + schema: $ref: '#/definitions/dc_post' default: description: Unexpected error @@ -283,16 +295,16 @@ paths: schema: $ref: '#/definitions/dc_post' responses: - 200: + '200': description: array containing the updated post's id schema: $ref: '#/definitions/Ids' - 404: + '404': description: this post does not exists default: description: Unexpected error schema: - $ref: '#/definitions/Error' + $ref: '#/definitions/Error' put: summary: Update full blog properties. Unsetted parameters will be erased parameters: @@ -313,11 +325,11 @@ paths: schema: $ref: '#/definitions/new_dc_post' responses: - 200: + '200': description: array containing the updated post's id schema: $ref: '#/definitions/Ids' - 404: + '404': description: this post does not exists default: description: Unexpected error @@ -339,17 +351,17 @@ paths: type: string required: true responses: - 200: + '200': description: array containing the deleted post's id schema: $ref: '#/definitions/Ids' - 404: + '404': description: this post does not exists default: description: Unexpected error schema: $ref: '#/definitions/Error' - /{blog-id}/categories: + '/{blog-id}/categories': get: summary: Get list of available categories parameters: @@ -362,7 +374,7 @@ paths: type: string required: true responses: - 200: + '200': description: array containing the categories properties schema: title: categories @@ -388,9 +400,8 @@ paths: in: body schema: $ref: '#/definitions/new_category' - responses: - 200: + '200': description: array containing the created category id schema: $ref: '#/definitions/Ids' @@ -398,8 +409,7 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' - - /{blog-id}/categories/{cat-id}: + '/{blog-id}/categories/{cat-id}': get: summary: get one category properties parameters: @@ -416,7 +426,7 @@ paths: type: string required: true responses: - 200: + '200': description: array containing the created category properties schema: $ref: '#/definitions/category' @@ -440,7 +450,7 @@ paths: schema: $ref: '#/definitions/category' responses: - 200: + '200': description: array containing the modified category id schema: $ref: '#/definitions/Ids' @@ -448,13 +458,6 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' - - - - - - - definitions: blog: type: object @@ -469,14 +472,12 @@ definitions: type: string blog_url: type: string - description: + blog_desc: type: string - blog_status: + lang: + type: string + blog_timezone: type: string - enum: - - En ligne - - Hors ligne - - Retiré url_scan: type: string enum: @@ -497,7 +498,7 @@ definitions: type: string url: type: string - description: + description: type: string author: type: string @@ -799,7 +800,6 @@ definitions: type: integer temporary: type: boolean - Error: type: object properties: @@ -809,4 +809,4 @@ definitions: message: type: string fields: - type: string \ No newline at end of file + type: string diff --git a/documentation/swagger-ui-dist/index.html b/documentation/swagger-ui-dist/index.html new file mode 100644 index 0000000..9f9a652 --- /dev/null +++ b/documentation/swagger-ui-dist/index.html @@ -0,0 +1,93 @@ + + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/documentation/swagger-ui-dist/index.php b/documentation/swagger-ui-dist/index.php index cbfae84..5c7771d 100644 --- a/documentation/swagger-ui-dist/index.php +++ b/documentation/swagger-ui-dist/index.php @@ -1,4 +1,3 @@ - diff --git a/documentation/swagger-ui-dist/swagger-ui-bundle.js b/documentation/swagger-ui-dist/swagger-ui-bundle.js index 1c891eb..f3c88cd 100644 --- a/documentation/swagger-ui-dist/swagger-ui-bundle.js +++ b/documentation/swagger-ui-dist/swagger-ui-bundle.js @@ -1,6 +1,6 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(1),e.exports=n(297)},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(2),n(293),n(294),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(3),n(52),n(53),n(54),n(55),n(57),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(70),n(72),n(74),n(76),n(79),n(80),n(81),n(85),n(87),n(89),n(92),n(93),n(94),n(95),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(105),n(106),n(107),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(131),n(132),n(136),n(137),n(138),n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(159),n(160),n(166),n(167),n(169),n(170),n(171),n(175),n(176),n(177),n(178),n(179),n(181),n(182),n(183),n(184),n(187),n(189),n(190),n(191),n(193),n(195),n(197),n(198),n(199),n(201),n(202),n(203),n(204),n(211),n(214),n(215),n(217),n(218),n(221),n(222),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(246),n(247),n(248),n(249),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(260),n(261),n(263),n(264),n(265),n(266),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(291),n(292),e.exports=n(9)},[1341,4,5,6,8,18,22,7,23,24,19,25,26,27,29,42,45,12,32,16,17,46,49,51,11,30,50,44,43,28,10],function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},[1342,7],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(4),i=n(9),o=n(10),a=n(18),s=n(20),u="prototype",c=function(e,t,n){var l,p,f,h,d=e&c.F,m=e&c.G,y=e&c.S,v=e&c.P,g=e&c.B,_=m?r:y?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),x=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!d&&_&&void 0!==_[l],f=(p?_:n)[l],h=g&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,_&&a(_,l,f,e&c.U),b[l]!=f&&o(b,l,h),v&&x[l]!=f&&(x[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},[1343,11,17,6],[1344,12,14,16,6],[1345,13],function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},[1346,6,7,15],[1347,13,4],[1348,13],function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(4),i=n(10),o=n(5),a=n(19)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(9).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},[1349,21],function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},[1350,19,13,5,11,7],[1351,4],[1352,11,5,25],[1353,23,19,4],[1354,25],[1355,4,9,28,26,11],function(e,t){e.exports=!1},[1356,30,32],[1357,31,41],[1358,5,32,36,40],[1359,33,35],[1360,34],function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},[1361,32,37,39],[1362,38],function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},[1363,38],[1364,23,19],function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},[1365,30,43,44],function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},[1366,34],[1367,12,47,41,40,15,48],[1368,11,12,30,6],[1369,4],[1370,32,50],[1371,31,41],[1372,44,17,32,16,5,14,6],[1373,8,46],[1374,8,6,11],function(e,t,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(47)})},function(e,t,n){var r=n(32),i=n(51).f;n(56)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},[1375,8,9,7],function(e,t,n){var r=n(58),i=n(59);n(56)("getPrototypeOf",function(){return function(e){return i(r(e))}})},[1376,35],[1377,5,58,40],[1378,58,30,56],function(e,t,n){n(56)("getOwnPropertyNames",function(){return n(49).f})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13);n(56)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},[1379,8,69],[1380,30,43,44,58,33,7],function(e,t,n){var r=n(8);r(r.S,"Object",{is:n(71)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(73).set})},function(e,t,n){var r=n(13),i=n(12),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(20)(Function.call,n(51).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(75),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},[1381,34,25],function(e,t,n){var r=n(8);r(r.P,"Function",{bind:n(77)})},function(e,t,n){"use strict";var r=n(21),i=n(13),o=n(78),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(8),i=n(35),o=n(7),a=n(84),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=p},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(8),i=n(86);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(4).parseFloat,i=n(83).trim;e.exports=1/r(n(84)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(34),a=n(88),s=n(16),u=n(7),c=n(50).f,l=n(51).f,p=n(11).f,f=n(83).trim,h="Number",d=r[h],m=d,y=d.prototype,v=o(n(46)(y))==h,g="trim"in String.prototype,_=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(v?u(function(){y.valueOf.call(n)}):o(n)!=h)?a(new m(_(t)),n,d):_(t)};for(var b,x=n(6)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(m,b=x[w])&&!i(d,b)&&p(d,b,l(m,b));d.prototype=y,y.constructor=d,n(18)(r,h,d)}},function(e,t,n){var r=n(13),i=n(73).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(8),i=n(38),o=n(90),a=n(91),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=u(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},y=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,l),c=i(e),v="",g=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(t=y(u*m(2,69,1))-69,n=t<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<0?(s=g.length,g=v+(s<=c?"0."+a.call(p,c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c))):g=v+g,g}})},function(e,t,n){var r=n(34);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(38),i=n(35);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(8),i=n(7),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(8),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{isInteger:n(96)})},function(e,t,n){var r=n(13),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(8);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(8),i=n(96),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(8),i=n(86);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(8),i=n(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(8),i=n(104),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(8),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(8),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(8),i=n(108);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(8);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(8),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(8),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(8),i=n(108),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return ru||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(8),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(8),i=Math.imul;r(r.S+r.F*n(7)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log1p:n(104)})},function(e,t,n){var r=n(8);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(8);r(r.S,"Math",{sign:n(108)})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(8);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(8),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(8),i=n(32),o=n(37);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),c=String(e);return s?s.call(t,c,u):t.slice(u-c.length,u)===c}})},function(e,t,n){var r=n(134),i=n(35);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(13),i=n(34),o=n(25)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(25)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var r=n(8),i=n(133),o="includes";r(r.P+r.F*n(135)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(8);r(r.P,"String",{repeat:n(91)})},function(e,t,n){"use strict";var r=n(8),i=n(37),o=n(133),a="startsWith",s=""[a];r(r.P+r.F*n(135)(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(140)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(8),i=n(7),o=n(35),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(140)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(140)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(140)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(140)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(140)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(140)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(140)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(140)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(140)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(140)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(140)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(140)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(8),i=n(7),o=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(18)(r,o,function(){var e=s.call(this);return e===e?a.call(this):i})},function(e,t,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(158))},function(e,t,n){"use strict";var r=n(12),i=n(16),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(8);r(r.S,"Array",{isArray:n(45)})},[1386,20,8,58,161,162,37,163,164,165],[1387,12],[1388,129,25],[1389,11,17],[1390,75,25,129,9],[1391,25],function(e,t,n){"use strict";var r=n(8),i=n(163);r(r.S+r.F*n(7)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=[].join;r(r.P+r.F*(n(33)!=Object||!n(168)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(7);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(8),i=n(48),o=n(34),a=n(39),s=n(37),u=[].slice;r(r.P+r.F*n(7)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),c=a(t,n),l=s(c-i),p=Array(l),f=0;f=0:p>f;f+=h)f in l&&(s=t(s,l[f],f,c));return s}},function(e,t,n){"use strict";var r=n(8),i=n(180);r(r.P+r.F*!n(168)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(168)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=n(38),a=n(37),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(168)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(8);r(r.P,"Array",{copyWithin:n(185)}),n(186)("copyWithin")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),p=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},function(e,t,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(8);r(r.P,"Array",{fill:n(188)}),n(186)("fill")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(8),i=n(172)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){"use strict";var r=n(8),i=n(172)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){n(192)("Array")},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(6),a=n(25)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},[1395,186,194,129,32,128],function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(4),i=n(88),o=n(11).f,a=n(50).f,s=n(134),u=n(196),c=r.RegExp,l=c,p=c.prototype,f=/a/g,h=/a/g,d=new c(f)!==f;if(n(6)&&(!d||n(7)(function(){return h[n(25)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=s(e),o=void 0===t;return!n&&r&&e.constructor===c&&o?e:i(d?new l(r&&!o?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&o?u.call(e):t),n?this:p,c)};for(var m=(function(e){e in c||o(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),y=a(l),v=0;y.length>v;)m(y[v++]);p.constructor=c,c.prototype=p,n(18)(r,"RegExp",c)}n(192)("RegExp")},function(e,t,n){"use strict";var r=n(12);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(198);var r=n(12),i=n(196),o=n(6),a="toString",s=/./[a],u=function(e){n(18)(RegExp.prototype,a,e,!0)};n(7)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(196)})},function(e,t,n){n(200)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(10),i=n(18),o=n(7),a=n(35),s=n(25);e.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],p=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(200)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(200)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(200)("split",2,function(e,t,r){"use strict";var i=n(134),o=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,p,f,h,d=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,v=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,m+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",m));(s=g.exec(n))&&(p=s.index+s[0][u],!(p>y&&(d.push(n.slice(y,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(h=1;h1&&s.index=v)));)g[c]===s.index&&g[c]++;return y===n[u]?!f&&g.test("")||d.push(""):d.push(n.slice(y)),d[u]>v?d.slice(0,v):d}}else"0"[s](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},[1396,28,4,20,75,8,13,21,205,206,207,208,209,25,210,24,192,9,165],function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},[1397,20,161,162,12,37,164],[1398,12,21,25],[1399,20,78,48,15,4,34],[1400,4,208,34],function(e,t,n){var r=n(18);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(11).f,i=n(46),o=n(210),a=n(20),s=n(205),u=n(35),c=n(206),l=n(128),p=n(194),f=n(192),h=n(6),d=n(22).fastKey,m=h?"_s":"size",y=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var p=e(function(e,r){s(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[l],e)});return o(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,n=y(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){s(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),h&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=y(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o), r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:y,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(4),i=n(8),o=n(18),a=n(210),s=n(22),u=n(206),c=n(205),l=n(13),p=n(7),f=n(165),h=n(24),d=n(88);e.exports=function(e,t,n,m,y,v){var g=r[e],_=g,b=y?"set":"add",x=_&&_.prototype,w={},k=function(e){var t=x[e];o(x,e,"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(v||x.forEach&&!p(function(){(new _).entries().next()}))){var S=new _,E=S[b](v?{}:-0,1)!=S,C=p(function(){S.has(1)}),A=f(function(e){new _(e)}),O=!v&&p(function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)});A||(_=t(function(t,n){c(t,_,e);var r=d(new g,t,_);return void 0!=n&&u(n,y,r[b],r),r}),_.prototype=x,x.constructor=_),(C||O)&&(k("delete"),k("has"),y&&k("get")),(O||E)&&k(b),v&&x.clear&&delete x.clear}else _=m.getConstructor(t,e,y,b),a(_.prototype,n),s.NEED=!0;return h(_,e),w[e]=_,i(i.G+i.W+i.F*(_!=g),w),v||m.setStrong(_,e,y),_}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},[1401,172,18,22,69,216,13,213],[1402,210,22,12,13,205,206,172,5],function(e,t,n){"use strict";var r=n(216);n(213)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(8),i=n(219),o=n(220),a=n(12),s=n(39),u=n(37),c=n(13),l=n(4).ArrayBuffer,p=n(207),f=o.ArrayBuffer,h=o.DataView,d=i.ABV&&l.isView,m=f.prototype.slice,y=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,v,{isView:function(e){return d&&d(e)||c(e)&&y in e}}),r(r.P+r.U+r.F*n(7)(function(){return!new f(2).slice(1,void 0).byteLength}),v,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),c=new h(this),l=new h(o),d=0;r>1,l=23===t?T(2,-24)-T(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=O(e),e!=e||e===C?(i=e!=e?1:0,r=u):(r=D(M(e)/P),e*(o=T(2,-r))<1&&(r--,o*=2),e+=r+c>=1?l/o:l*T(2,1-c),e*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*T(2,t),r+=c):(i=e*T(2,c-1)*T(2,t),r=0));t>=8;a[p++]=255&i,i/=256,t-=8);for(r=r<0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a},L=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-C:C;r+=T(2,t),l-=a}return(c?-1:1)*r*T(2,l-t)},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},U=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},V=function(e){return z(e,52,8)},H=function(e){return z(e,23,4)},J=function(e,t,n){d(e[_],t,{get:function(){return this[n]}})},G=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||o<0||o+t>e[N])throw E(x);var a=e[F]._b,s=o+e[B],u=a.slice(s,s+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var a=+n,s=p(a);if(a!=s||s<0||s+t>e[N])throw E(x);for(var u=e[F]._b,c=s+e[B],l=r(+i),f=0;fee;)($=Q[ee++])in w||s(w,$,A[$]);o||(Z.constructor=w)}var te=new k(new w(2)),ne=k[_].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(k[_],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else w=function(e){var t=Y(this,e);this._b=m.call(Array(t),0),this[N]=t},k=function(e,t,n){l(this,k,g),l(e,w,g);var r=e[N],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw E(b);this[F]=e,this[B]=i,this[N]=n},i&&(J(w,j,"_l"),J(k,I,"_b"),J(k,j,"_l"),J(k,R,"_o")),u(k[_],{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return q(G(this,4,e,arguments[1]))},getUint32:function(e){return q(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,U,t)},setUint8:function(e,t){X(this,1,e,U,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments[2])},setUint16:function(e,t){X(this,2,e,W,t,arguments[2])},setInt32:function(e,t){X(this,4,e,K,t,arguments[2])},setUint32:function(e,t){X(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,V,t,arguments[2])}});y(w,v),y(k,g),s(k[_],a.VIEW,!0),t[v]=w,t[g]=k},function(e,t,n){var r=n(8);r(r.G+r.W+r.F*!n(219).ABV,{DataView:n(220).DataView})},function(e,t,n){n(223)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(6)){var r=n(28),i=n(4),o=n(7),a=n(8),s=n(219),u=n(220),c=n(20),l=n(205),p=n(17),f=n(10),h=n(210),d=n(38),m=n(37),y=n(39),v=n(16),g=n(5),_=n(71),b=n(75),x=n(13),w=n(58),k=n(162),S=n(46),E=n(59),C=n(50).f,A=n(164),O=n(19),T=n(25),D=n(172),M=n(36),P=n(207),I=n(193),j=n(129),R=n(165),F=n(192),N=n(188),B=n(185),z=n(11),L=n(51),q=z.f,U=L.f,W=i.RangeError,K=i.TypeError,V=i.Uint8Array,H="ArrayBuffer",J="Shared"+H,G="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],$=u.ArrayBuffer,Z=u.DataView,Q=D(0),ee=D(2),te=D(3),ne=D(4),re=D(5),ie=D(6),oe=M(!0),ae=M(!1),se=I.values,ue=I.keys,ce=I.entries,le=Y.lastIndexOf,pe=Y.reduce,fe=Y.reduceRight,he=Y.join,de=Y.sort,me=Y.slice,ye=Y.toString,ve=Y.toLocaleString,ge=T("iterator"),_e=T("toStringTag"),be=O("typed_constructor"),xe=O("def_constructor"),we=s.CONSTR,ke=s.TYPED,Se=s.VIEW,Ee="Wrong length!",Ce=D(1,function(e,t){return Pe(P(e,e[xe]),t)}),Ae=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Oe=!!V&&!!V[X].set&&o(function(){new V(1).set({})}),Te=function(e,t){if(void 0===e)throw K(Ee);var n=+e,r=m(e);if(t&&!_(n,r))throw W(Ee);return r},De=function(e,t){var n=d(e);if(n<0||n%t)throw W("Wrong offset!");return n},Me=function(e){if(x(e)&&ke in e)return e;throw K(e+" is not a typed array!")},Pe=function(e,t){if(!(x(e)&&be in e))throw K("It is not a typed array constructor!");return new e(t)},Ie=function(e,t){return je(P(e,e[xe]),t)},je=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},Fe=function(e){var t,n,r,i,o,a,s=w(e),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=A(s);if(void 0!=f&&!k(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),t=0,n=m(s.length),i=Pe(this,n);n>t;t++)i[t]=p?l(s[t],t):s[t];return i},Ne=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!V&&o(function(){ve.call(new V(1))}),ze=function(){return ve.apply(Be?me.call(Me(this)):Me(this),arguments)},Le={copyWithin:function(e,t){return B.call(Me(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Me(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Me(this),arguments)},filter:function(e){return Ie(this,ee(Me(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Me(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Me(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Me(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Me(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Me(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return he.apply(Me(this),arguments)},lastIndexOf:function(e){return le.apply(Me(this),arguments)},map:function(e){return Ce(Me(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Me(this),arguments)},reduceRight:function(e){return fe.apply(Me(this),arguments)},reverse:function(){for(var e,t=this,n=Me(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return de.call(Me(this),e)},subarray:function(e,t){var n=Me(this),r=n.length,i=y(e,r);return new(P(n,n[xe]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:y(t,r))-i))}},qe=function(e,t){return Ie(this,me.call(Me(this),e,t))},Ue=function(e){Me(this);var t=De(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw W(Ee);for(;o255?255:255&r),i.v[d](n*t+i.o,r,Ae)},T=function(e,t){q(e,t,{get:function(){return A(this,t)},set:function(e){return O(this,t,e)},enumerable:!0})};_?(y=n(function(e,n,r,i){l(e,y,c,"_d");var o,a,s,u,p=0,h=0;if(x(n)){if(!(n instanceof $||(u=b(n))==H||u==J))return ke in n?je(y,n):Fe.call(y,n);o=n,h=De(r,t);var d=n.byteLength;if(void 0===i){if(d%t)throw W(Ee);if(a=d-h,a<0)throw W(Ee)}else if(a=m(i)*t,a+h>d)throw W(Ee);s=a/t}else s=Te(n,!0),a=s*t,o=new $(a);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new Z(o)});p=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=i.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(e))?r(s,t,l):void 0}var i=n(51),o=n(59),a=n(5),s=n(8),u=n(13),c=n(12);s(s.S,"Reflect",{get:r})},function(e,t,n){var r=n(51),i=n(8),o=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(8),i=n(59),o=n(12);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(8),i=n(12),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(243)})},function(e,t,n){var r=n(50),i=n(43),o=n(12),a=n(4).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(8),i=n(12),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,h=arguments.length<4?e:arguments[3],d=o.f(l(e),t);if(!d){if(p(f=a(e)))return r(f,t,n,h);d=c(0)}return s(d,"value")?!(d.writable===!1||!p(h))&&(u=o.f(h,t)||c(0),u.value=n,i.f(h,t,u),!0):void 0!==d.set&&(d.set.call(h,n),!0)}var i=n(11),o=n(51),a=n(59),s=n(5),u=n(8),c=n(17),l=n(12),p=n(13);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(8),i=n(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)("includes")},function(e,t,n){"use strict";var r=n(8),i=n(127)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(37),i=n(91),o=n(35);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var p=l-u,f=i.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(83)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(83)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(8),i=n(35),o=n(37),a=n(134),s=n(196),u=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(130)(c,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new c(r,t)}})},[1403,27],[1404,27],function(e,t,n){var r=n(8),i=n(243),o=n(32),a=n(51),s=n(163);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=a.f,u=i(n),c={},l=0;u.length>l;)s(c,t=u[l++],r(n,t));return c}})},function(e,t,n){var r=n(8),i=n(259)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(30),i=n(32),o=n(44).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(8),i=n(259)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(28)||!n(7)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(4)[e]})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(267)("Map")})},function(e,t,n){var r=n(75),i=n(268);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(267)("Set")})},function(e,t,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(8),i=n(34);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>16)+((o*u>>>0)+(c&n)>>16)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>>16)+((o*u>>>0)+(c&n)>>>16)}})},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,i(n),o(r))}})},function(e,t,n){var r=n(211),i=n(8),o=n(23)("metadata"),a=o.store||(o.store=new(n(215))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},h=function(e){i(i.S,"Reflect",e)};e.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:h}},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.get,u=r.key,c=function(e,t,n){var r=a(e,t,n);if(r)return s(e,t,n);var i=o(t);return null!==i?c(e,i,n):void 0};r.exp({getMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(214),i=n(268),o=n(277),a=n(12),s=n(59),u=o.keys,c=o.key,l=function(e,t){var n=u(e,t),o=s(e);if(null===o)return n;var a=l(o,t);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.key,u=function(e,t,n){var r=a(e,t,n);if(r)return!0;var i=o(t);return null!==i&&u(e,i,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(21),a=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:o)(n),a(r))}}})},function(e,t,n){var r=n(8),i=n(209)(),o=n(4).process,a="process"==n(34)(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(8),i=n(4),o=n(9),a=n(209)(),s=n(25)("observable"),u=n(21),c=n(12),l=n(205),p=n(210),f=n(10),h=n(206),d=h.RETURN,m=function(e){return null==e?void 0:u(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return void 0===e._o},g=function(e){v(e)||(e._o=void 0,y(e))},_=function(e,t){c(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}v(this)&&y(this)};_.prototype=p({},{unsubscribe:function(){g(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(e){try{g(t)}finally{throw e}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{y(t)}finally{throw e}}return y(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(e){try{y(t)}finally{throw e}}return y(t),e}}});var x=function(e){l(this,x,"Observable","_f")._f=u(e)};p(x.prototype,{subscribe:function(e){return new _(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(x,{from:function(e){var t="function"==typeof this?this:x,n=m(c(e)[s]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(h(e,!1,function(e){if(t.next(e),n)return d})===d)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);ea;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,c=0,l=0;if(!u&&!a)return i(e,n,o);if(r=n.slice(),u)for(;t>c;c++)r[c]===s&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(4)},function(e,t,n){var r=n(8),i=n(208);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(193),i=n(18),o=n(4),a=n(10),s=n(129),u=n(25),c=u("iterator"),l=u("toStringTag"),p=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d,m=f[h],y=o[m],v=y&&y.prototype;if(v){v[c]||a(v,c,p),v[l]||a(v,l,m),s[m]=p;for(d in r)v[d]||i(v,d,r[d],!0)}}},function(e,t){(function(t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(r||[]);return a._invoke=c(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function n(t,i,o,a){var s=r(e[t],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&g.call(c,"__await")?Promise.resolve(c.__await).then(function(e){n("next",e,o,a)},function(e){n("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function i(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var o;this._invoke=i}function c(e,t,n){var i=E;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===O){if("throw"===o)throw a;return m()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===T)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===E)throw i=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=A;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?O:C,c.arg===T)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=O,n.method="throw",n.arg=c.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,T;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,T):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=y),T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}())},function(e,t,n){n(295),e.exports=n(9).RegExp.escape},function(e,t,n){var r=n(8),i=n(296)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var o="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},a=n(298),s=i(a),u=n(303),c=i(u),l=n(558),p=i(l),f=n(1337),h=r(f),d=n(1339),m=n(335),y={PACKAGE_VERSION:"3.0.7",GIT_COMMIT:"g69fd57f",GIT_DIRTY:!0},v=y.GIT_DIRTY,g=y.GIT_COMMIT,_=y.PACKAGE_VERSION;window.versions=window.versions||{},window.versions.swaggerUi=_+"/"+(g||"unknown")+(v?"-dirty":""),e.exports=function(e){var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},n=(0,s.default)({},t,e),r=(0,s.default)({},n.store,{system:{configs:n.configs},plugins:n.presets,state:{layout:{layout:n.layout},spec:{spec:"",url:n.url}}}),i=function(){return{fn:n.fn,components:n.components,state:n.state}},a=new c.default(r);a.register([n.plugins,i]);var u=a.getSystem(),l=(0,m.parseSeach)(),p=function(e){if("object"!==("undefined"==typeof n?"undefined":o(n)))return u;var t=u.specSelectors.getLocalConfig?u.specSelectors.getLocalConfig():{},r=(0,s.default)({},n,t,e||{},l);return a.setConfigs((0,d.filterConfigs)(r)),null!==e&&(!l.url&&"object"===o(r.spec)&&Object.keys(r.spec).length?(u.specActions.updateUrl(""),u.specActions.updateLoadingStatus("success"),u.specActions.updateSpec(JSON.stringify(r.spec))):u.specActions.download&&r.url&&(u.specActions.updateUrl(r.url),u.specActions.download(r.url))),r.dom_id?u.render(r.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),u},f=l.config||n.configUrl;if(!f||!u.specActions.getConfigByUrl||u.specActions.getConfigByUrl&&!u.specActions.getConfigByUrl(f,p))return p()},e.exports.presets={apis:p.default},e.exports.plugins=h},function(e,t,n){(function(t){/*! +if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=y),T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}())},function(e,t,n){n(295),e.exports=n(9).RegExp.escape},function(e,t,n){var r=n(8),i=n(296)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var o="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},a=n(298),s=i(a),u=n(303),c=i(u),l=n(334),p=i(l),f=n(558),h=i(f),d=n(1337),m=r(d),y=n(1339),v=n(335),g={PACKAGE_VERSION:"3.0.8",GIT_COMMIT:"g7296a05",GIT_DIRTY:!0},_=g.GIT_DIRTY,b=g.GIT_COMMIT,x=g.PACKAGE_VERSION;e.exports=function(e){p.default.versions=p.default.versions||{},p.default.versions.swaggerUi=x+"/"+(b||"unknown")+(_?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},n=(0,s.default)({},t,e),r=(0,s.default)({},n.store,{system:{configs:n.configs},plugins:n.presets,state:{layout:{layout:n.layout},spec:{spec:"",url:n.url}}}),i=function(){return{fn:n.fn,components:n.components,state:n.state}},a=new c.default(r);a.register([n.plugins,i]);var u=a.getSystem(),l=(0,v.parseSeach)(),f=function(e){if("object"!==("undefined"==typeof n?"undefined":o(n)))return u;var t=u.specSelectors.getLocalConfig?u.specSelectors.getLocalConfig():{},r=(0,s.default)({},n,t,e||{},l);return a.setConfigs((0,y.filterConfigs)(r)),null!==e&&(!l.url&&"object"===o(r.spec)&&Object.keys(r.spec).length?(u.specActions.updateUrl(""),u.specActions.updateLoadingStatus("success"),u.specActions.updateSpec(JSON.stringify(r.spec))):u.specActions.download&&r.url&&(u.specActions.updateUrl(r.url),u.specActions.download(r.url))),r.dom_id?u.render(r.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),u},h=l.config||n.configUrl;if(!h||!u.specActions.getConfigByUrl||u.specActions.getConfigByUrl&&!u.specActions.getConfigByUrl(h,f))return f()},e.exports.presets={apis:h.default},e.exports.plugins=m},function(e,t,n){(function(t){/*! * @description Recursive object extending * @author Viacheslav Lotsmanov * @license MIT diff --git a/documentation/swagger-ui-dist/swagger-ui-bundle.js.map b/documentation/swagger-ui-dist/swagger-ui-bundle.js.map index 4911193..25246d8 100644 --- a/documentation/swagger-ui-dist/swagger-ui-bundle.js.map +++ b/documentation/swagger-ui-dist/swagger-ui-bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAmTA;;;;;;AAoIA;AAi7FA;AAmtCA;AAi0IA;AA2pJA;AA+uFA;AA2rGA;AAgiFA;AA0rFA;AAk9CA;AA2hDA;AA4rCA;AAi6EA;;;;;AA2gCA;AA02JA;;;;;;;;;;;;;;AAuyEA;AA4mIA;AAquJA;AAwsHA;AA2mGA;AAiiEA;AAq4DA;AA+2DA;AAqlBA;;;;;;AAilFA;AAs1FA;;;;;AAy3CA;AA2qFA;AAw2CA;AAwkCA;AAs/CA;AA4kFA;AAy1FA;;;;;;;;;AAm5CA;AA2zIA;AAk4DA;AAolDA","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAoTA;;;;;;AAoIA;AAi7FA;AAmtCA;AAi0IA;AA2pJA;AA+uFA;AA2rGA;AAgiFA;AA0rFA;AAk9CA;AA2hDA;AA4rCA;AAi6EA;;;;;AA2gCA;AA02JA;;;;;;;;;;;;;;AAuyEA;AA4mIA;AAquJA;AAwsHA;AA2mGA;AAiiEA;AAq4DA;AA+2DA;AAqlBA;;;;;;AAilFA;AAs1FA;;;;;AAy3CA;AA2qFA;AAw2CA;AAwkCA;AAs/CA;AA4kFA;AAy1FA;;;;;;;;;AAm5CA;AA2zIA;AAk4DA;AAolDA","sourceRoot":""} \ No newline at end of file diff --git a/documentation/swagger-ui-dist/swagger-ui.js b/documentation/swagger-ui-dist/swagger-ui.js index 1e4a1f7..66a1745 100644 --- a/documentation/swagger-ui-dist/swagger-ui.js +++ b/documentation/swagger-ui-dist/swagger-ui.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):"function"==typeof define&&define.amd?define(["babel-polyfill","deep-extend","redux","immutable","redux-immutable","serialize-error","base64-js","ieee754","isarray","shallowequal","xml","memoizee","reselect","js-yaml","url-parse","react","react-dom","react-redux","yaml-js","swagger-client","react-split-pane","react-immutable-proptypes","react-addons-shallow-compare","react-collapse","react-remarkable"],t):"object"==typeof exports?exports.SwaggerUICore=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):e.SwaggerUICore=t(e["babel-polyfill"],e["deep-extend"],e.redux,e.immutable,e["redux-immutable"],e["serialize-error"],e["base64-js"],e.ieee754,e.isarray,e.shallowequal,e.xml,e.memoizee,e.reselect,e["js-yaml"],e["url-parse"],e.react,e["react-dom"],e["react-redux"],e["yaml-js"],e["swagger-client"],e["react-split-pane"],e["react-immutable-proptypes"],e["react-addons-shallow-compare"],e["react-collapse"],e["react-remarkable"])}(this,function(e,t,r,n,o,a,u,i,s,l,c,f,p,d,h,y,m,v,b,g,_,E,w,j,P){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){r(1),r(2),e.exports=r(3)},function(e,t){e.exports=require("babel-polyfill")},function(e,t){},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}var a="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},u=r(4),i=o(u),s=r(5),l=o(s),c=r(157),f=o(c),p=r(314),d=n(p),h=r(316),y=r(12),m={PACKAGE_VERSION:"3.0.7",GIT_COMMIT:"g69fd57f",GIT_DIRTY:!1},v=m.GIT_DIRTY,b=m.GIT_COMMIT,g=m.PACKAGE_VERSION;window.versions=window.versions||{},window.versions.swaggerUi=g+"/"+(b||"unknown")+(v?"-dirty":""),e.exports=function(e){var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},r=(0,i.default)({},t,e),n=(0,i.default)({},r.store,{system:{configs:r.configs},plugins:r.presets,state:{layout:{layout:r.layout},spec:{spec:"",url:r.url}}}),o=function(){return{fn:r.fn,components:r.components,state:r.state}},u=new l.default(n);u.register([r.plugins,o]);var s=u.getSystem(),c=(0,y.parseSeach)(),f=function(e){if("object"!==("undefined"==typeof r?"undefined":a(r)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},n=(0,i.default)({},r,t,e||{},c);return u.setConfigs((0,h.filterConfigs)(n)),null!==e&&(!c.url&&"object"===a(n.spec)&&Object.keys(n.spec).length?(s.specActions.updateUrl(""),s.specActions.updateLoadingStatus("success"),s.specActions.updateSpec(JSON.stringify(n.spec))):s.specActions.download&&n.url&&(s.specActions.updateUrl(n.url),s.specActions.download(n.url))),n.dom_id?s.render(n.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),s},p=c.config||r.configUrl;if(!p||!s.specActions.getConfigByUrl||s.specActions.getConfigByUrl&&!s.specActions.getConfigByUrl(p,f))return f()},e.exports.presets={apis:f.default},e.exports.plugins=d},function(e,t){e.exports=require("deep-extend")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,r){var n=[(0,O.systemThunkMiddleware)(r)],o=P.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||h.compose;return(0,h.createStore)(e,t,o(h.applyMiddleware.apply(void 0,n)))}function i(e,t){return(0,O.isObject)(e)&&!(0,O.isArray)(e)?e:(0,O.isFunc)(e)?i(e(t),t):(0,O.isArray)(e)?e.map(function(e){return i(e,t)}).reduce(s,{}):{}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,O.isObject)(e))return{};if(!(0,O.isObject)(t))return e;var r=e.statePlugins;if((0,O.isObject)(r))for(var n in r){var o=r[n];if((0,O.isObject)(o)&&(0,O.isObject)(o.wrapActions)){var a=o.wrapActions;for(var u in a){var i=a[u];Array.isArray(i)||(i=[i],a[u]=i),t&&t.statePlugins&&t.statePlugins[n]&&t.statePlugins[n].wrapActions&&t.statePlugins[n].wrapActions[u]&&(t.statePlugins[n].wrapActions[u]=a[u].concat(t.statePlugins[n].wrapActions[u]))}}}return(0,b.default)(e,t)}function l(e){var t=(0,O.objMap)(e,function(e){return e.reducers});return c(t)}function c(e){var t=Object.keys(e).reduce(function(t,r){return t[r]=f(e[r]),t},{});return Object.keys(t).length?(0,g.combineReducers)(t):T}function f(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new y.Map,r=arguments[1];if(!e)return t;var n=e[r.type];return n?n(t,r):t}}function p(e,t,r){var n=u(e,t,r);return n}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),(0,b.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=p(T,(0,y.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return d(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i(e,this.getSystem());s(this.system,r),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:m.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(l(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,O.objReduce)(this.system.statePlugins,function(r,n){var a=r[e];if(a)return o({},n+t,a)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,O.objMap)(e,function(e){return(0,O.objReduce)(e,function(e,t){if((0,O.isFn)(e))return o({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,r=this.getBoundActions(e);return(0,O.objMap)(r,function(e,r){var n=t.system.statePlugins[r.slice(0,-7)].wrapActions;return n?(0,O.objMap)(e,function(e,r){var o=n[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(function(e,r){var n=function(){return r(e,t.getSystem()).apply(void 0,arguments)};if(!(0,O.isFn)(n))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return n},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=e.get(r),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=function(){return e().get(r)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,O.objMap)(this.getSelectors(),function(r,n){var o=[n.slice(0,-9)],a=function(){return e().getIn(o)};return(0,O.objMap)(r,function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:y,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=o,t.newThrownErrBatch=a,t.newSpecErr=u,t.newAuthErr=i,t.clear=s;var l=r(9),c=n(l),f=t.NEW_THROWN_ERR="err_new_thrown_err",p=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",d=t.NEW_SPEC_ERR="err_new_spec_err",h=t.NEW_AUTH_ERR="err_new_auth_err",y=t.CLEAR="err_clear"},function(e,t){"use strict";function r(){var e={location:{},history:{},open:function(){},close:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],r=!0,n=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var i=a.value;i in window&&(e[i]=window[i])}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}}catch(e){console.error(e)}return e}e.exports=r()},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return c(e)?F(e)?e.toObject():e:{}}function a(e){return e?e.toArray?e.toArray():s(e):[]}function u(e){return F(e)?e:c(e)?Array.isArray(e)?S.default.Seq(e).map(u).toList():S.default.Seq(e).map(u).toOrderedMap():e}function i(e,t){var r={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(n){return r[n]=e[n].bind(null,t)}),r}function s(e){return Array.isArray(e)?e:[e]}function l(e){return"function"==typeof e}function c(e){return!!e&&"object"===("undefined"==typeof e?"undefined":O(e))}function f(e){return"function"==typeof e}function p(e){return Array.isArray(e)}function d(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=t(e[n],n),r},{})}function h(e,t){return Object.keys(e).reduce(function(r,n){var o=t(e[n],n);return o&&"object"===("undefined"==typeof o?"undefined":O(o))&&Object.assign(r,o),r},{})}function y(e){return function(t){t.dispatch,t.getState;return function(t){return function(r){return"function"==typeof r?r(e()):t(r)}}}}function m(e){var t=e.keySeq();return t.contains(B)?B:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!S.default.Iterable.isIterable(e))return S.default.List();var r=e.getIn(Array.isArray(t)?t:[t]);return S.default.List.isList(r)?r:S.default.List()}function b(e){var t,r,n,o,a,u,i,s,l,c,f,p;for(c=/(>)(<)(\/*)/g,p=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(c,"$1\n$2$3").replace(p,"$1\n").replace(t,"$1\n$2"),n="",s=e.split("\n"),o=0,u="other",f={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},r=function(e){var t,r,a,i,s,l;s={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},i=function(){var e;e=[];for(r in s)l=s[r],l&&e.push(r);return e}()[0],i=void 0===i?"other":i,t=u+"->"+i,u=i,a="",o+=f[t],a=function(){var e,t,r,n;for(r=[],n=e=0,t=o;0<=t?et;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=a+e+"\n"},a=0,i=s.length;at)return e.textContent;var a=function(e){for(var t,a,u,i,s,l=e.textContent,c=0,f=l[0],p=1,d=e.innerHTML="",h=0;a=t,t=h<7&&"\\"==t?1:p;){if(p=f,f=l[++c],i=d.length>1,!p||h>8&&"\n"==p||[/\S/[o](p),1,1,!/[$\w]/[o](p),("/"==t||"\n"==t)&&i,'"'==t&&i,"'"==t&&i,l[c-4]+a+t=="-->",a+t=="*/"][h])for(d&&(e[n](s=r.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][h?h<3?2:h>6?4:h>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)$/[o](d):0]),s[n](r.createTextNode(d))),u=h&&h<7?h:u,d="",h=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[o](p),/[\])]/[o](p),/[$\w]/[o](p),"/"==p&&u<2&&"<"!=t,'"'==p,"'"==p,p+f+l[c+1]+l[c+2]=="':null;var n=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=n[1]}return(0,D.memoizedCreateXMLExample)(e,r)}return JSON.stringify((0,D.memoizedSampleFromSchema)(e,r),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var r=t.substr(1).split("&");for(var n in r)n=r[n].split("="),e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e},t.btoa=function(t){var r=void 0;return r=t instanceof e?t:new e(t.toString(),"utf-8"),r.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 r in e){var n=e[r];void 0!==n&&""!==n&&t.push([r,"=",encodeURIComponent(n).replace(/%20/g,"+")].join(""))}return t.join("&")}}).call(t,r(13).Buffer)},function(e,t,r){(function(e){/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):"function"==typeof define&&define.amd?define(["babel-polyfill","deep-extend","redux","immutable","redux-immutable","serialize-error","base64-js","ieee754","isarray","shallowequal","xml","memoizee","reselect","js-yaml","url-parse","react","react-dom","react-redux","yaml-js","swagger-client","react-split-pane","react-immutable-proptypes","react-addons-shallow-compare","react-collapse","react-remarkable"],t):"object"==typeof exports?exports.SwaggerUICore=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):e.SwaggerUICore=t(e["babel-polyfill"],e["deep-extend"],e.redux,e.immutable,e["redux-immutable"],e["serialize-error"],e["base64-js"],e.ieee754,e.isarray,e.shallowequal,e.xml,e.memoizee,e.reselect,e["js-yaml"],e["url-parse"],e.react,e["react-dom"],e["react-redux"],e["yaml-js"],e["swagger-client"],e["react-split-pane"],e["react-immutable-proptypes"],e["react-addons-shallow-compare"],e["react-collapse"],e["react-remarkable"])}(this,function(e,t,r,n,o,a,u,i,s,l,c,f,p,d,h,y,m,v,b,g,_,E,w,j,P){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){r(1),r(2),e.exports=r(3)},function(e,t){e.exports=require("babel-polyfill")},function(e,t){},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}var a="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},u=r(4),i=o(u),s=r(5),l=o(s),c=r(11),f=o(c),p=r(157),d=o(p),h=r(314),y=n(h),m=r(316),v=r(12),b={PACKAGE_VERSION:"3.0.8",GIT_COMMIT:"g7296a05",GIT_DIRTY:!1},g=b.GIT_DIRTY,_=b.GIT_COMMIT,E=b.PACKAGE_VERSION;e.exports=function(e){f.default.versions=f.default.versions||{},f.default.versions.swaggerUi=E+"/"+(_||"unknown")+(g?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},r=(0,i.default)({},t,e),n=(0,i.default)({},r.store,{system:{configs:r.configs},plugins:r.presets,state:{layout:{layout:r.layout},spec:{spec:"",url:r.url}}}),o=function(){return{fn:r.fn,components:r.components,state:r.state}},u=new l.default(n);u.register([r.plugins,o]);var s=u.getSystem(),c=(0,v.parseSeach)(),p=function(e){if("object"!==("undefined"==typeof r?"undefined":a(r)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},n=(0,i.default)({},r,t,e||{},c);return u.setConfigs((0,m.filterConfigs)(n)),null!==e&&(!c.url&&"object"===a(n.spec)&&Object.keys(n.spec).length?(s.specActions.updateUrl(""),s.specActions.updateLoadingStatus("success"),s.specActions.updateSpec(JSON.stringify(n.spec))):s.specActions.download&&n.url&&(s.specActions.updateUrl(n.url),s.specActions.download(n.url))),n.dom_id?s.render(n.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),s},d=c.config||r.configUrl;if(!d||!s.specActions.getConfigByUrl||s.specActions.getConfigByUrl&&!s.specActions.getConfigByUrl(d,p))return p()},e.exports.presets={apis:d.default},e.exports.plugins=y},function(e,t){e.exports=require("deep-extend")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,r){var n=[(0,O.systemThunkMiddleware)(r)],o=P.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||h.compose;return(0,h.createStore)(e,t,o(h.applyMiddleware.apply(void 0,n)))}function i(e,t){return(0,O.isObject)(e)&&!(0,O.isArray)(e)?e:(0,O.isFunc)(e)?i(e(t),t):(0,O.isArray)(e)?e.map(function(e){return i(e,t)}).reduce(s,{}):{}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,O.isObject)(e))return{};if(!(0,O.isObject)(t))return e;var r=e.statePlugins;if((0,O.isObject)(r))for(var n in r){var o=r[n];if((0,O.isObject)(o)&&(0,O.isObject)(o.wrapActions)){var a=o.wrapActions;for(var u in a){var i=a[u];Array.isArray(i)||(i=[i],a[u]=i),t&&t.statePlugins&&t.statePlugins[n]&&t.statePlugins[n].wrapActions&&t.statePlugins[n].wrapActions[u]&&(t.statePlugins[n].wrapActions[u]=a[u].concat(t.statePlugins[n].wrapActions[u]))}}}return(0,b.default)(e,t)}function l(e){var t=(0,O.objMap)(e,function(e){return e.reducers});return c(t)}function c(e){var t=Object.keys(e).reduce(function(t,r){return t[r]=f(e[r]),t},{});return Object.keys(t).length?(0,g.combineReducers)(t):T}function f(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new y.Map,r=arguments[1];if(!e)return t;var n=e[r.type];return n?n(t,r):t}}function p(e,t,r){var n=u(e,t,r);return n}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),(0,b.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=p(T,(0,y.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return d(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i(e,this.getSystem());s(this.system,r),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:m.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(l(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,O.objReduce)(this.system.statePlugins,function(r,n){var a=r[e];if(a)return o({},n+t,a)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,O.objMap)(e,function(e){return(0,O.objReduce)(e,function(e,t){if((0,O.isFn)(e))return o({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,r=this.getBoundActions(e);return(0,O.objMap)(r,function(e,r){var n=t.system.statePlugins[r.slice(0,-7)].wrapActions;return n?(0,O.objMap)(e,function(e,r){var o=n[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(function(e,r){var n=function(){return r(e,t.getSystem()).apply(void 0,arguments)};if(!(0,O.isFn)(n))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return n},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=e.get(r),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=function(){return e().get(r)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,O.objMap)(this.getSelectors(),function(r,n){var o=[n.slice(0,-9)],a=function(){return e().getIn(o)};return(0,O.objMap)(r,function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:y,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=o,t.newThrownErrBatch=a,t.newSpecErr=u,t.newAuthErr=i,t.clear=s;var l=r(9),c=n(l),f=t.NEW_THROWN_ERR="err_new_thrown_err",p=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",d=t.NEW_SPEC_ERR="err_new_spec_err",h=t.NEW_AUTH_ERR="err_new_auth_err",y=t.CLEAR="err_clear"},function(e,t){"use strict";function r(){var e={location:{},history:{},open:function(){},close:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],r=!0,n=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var i=a.value;i in window&&(e[i]=window[i])}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}}catch(e){console.error(e)}return e}e.exports=r()},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return c(e)?F(e)?e.toObject():e:{}}function a(e){return e?e.toArray?e.toArray():s(e):[]}function u(e){return F(e)?e:c(e)?Array.isArray(e)?S.default.Seq(e).map(u).toList():S.default.Seq(e).map(u).toOrderedMap():e}function i(e,t){var r={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(n){return r[n]=e[n].bind(null,t)}),r}function s(e){return Array.isArray(e)?e:[e]}function l(e){return"function"==typeof e}function c(e){return!!e&&"object"===("undefined"==typeof e?"undefined":O(e))}function f(e){return"function"==typeof e}function p(e){return Array.isArray(e)}function d(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=t(e[n],n),r},{})}function h(e,t){return Object.keys(e).reduce(function(r,n){var o=t(e[n],n);return o&&"object"===("undefined"==typeof o?"undefined":O(o))&&Object.assign(r,o),r},{})}function y(e){return function(t){t.dispatch,t.getState;return function(t){return function(r){return"function"==typeof r?r(e()):t(r)}}}}function m(e){var t=e.keySeq();return t.contains(B)?B:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!S.default.Iterable.isIterable(e))return S.default.List();var r=e.getIn(Array.isArray(t)?t:[t]);return S.default.List.isList(r)?r:S.default.List()}function b(e){var t,r,n,o,a,u,i,s,l,c,f,p;for(c=/(>)(<)(\/*)/g,p=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(c,"$1\n$2$3").replace(p,"$1\n").replace(t,"$1\n$2"),n="",s=e.split("\n"),o=0,u="other",f={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},r=function(e){var t,r,a,i,s,l;s={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},i=function(){var e;e=[];for(r in s)l=s[r],l&&e.push(r);return e}()[0],i=void 0===i?"other":i,t=u+"->"+i,u=i,a="",o+=f[t],a=function(){var e,t,r,n;for(r=[],n=e=0,t=o;0<=t?et;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=a+e+"\n"},a=0,i=s.length;at)return e.textContent;var a=function(e){for(var t,a,u,i,s,l=e.textContent,c=0,f=l[0],p=1,d=e.innerHTML="",h=0;a=t,t=h<7&&"\\"==t?1:p;){if(p=f,f=l[++c],i=d.length>1,!p||h>8&&"\n"==p||[/\S/[o](p),1,1,!/[$\w]/[o](p),("/"==t||"\n"==t)&&i,'"'==t&&i,"'"==t&&i,l[c-4]+a+t=="-->",a+t=="*/"][h])for(d&&(e[n](s=r.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][h?h<3?2:h>6?4:h>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)$/[o](d):0]),s[n](r.createTextNode(d))),u=h&&h<7?h:u,d="",h=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[o](p),/[\])]/[o](p),/[$\w]/[o](p),"/"==p&&u<2&&"<"!=t,'"'==p,"'"==p,p+f+l[c+1]+l[c+2]=="':null;var n=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=n[1]}return(0,D.memoizedCreateXMLExample)(e,r)}return JSON.stringify((0,D.memoizedSampleFromSchema)(e,r),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var r=t.substr(1).split("&");for(var n in r)n=r[n].split("="),e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e},t.btoa=function(t){var r=void 0;return r=t instanceof e?t:new e(t.toString(),"utf-8"),r.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 r in e){var n=e[r];void 0!==n&&""!==n&&t.push([r,"=",encodeURIComponent(n).replace(/%20/g,"+")].join(""))}return t.join("&")}}).call(t,r(13).Buffer)},function(e,t,r){(function(e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/documentation/swagger-ui-dist/swagger-ui.js.map b/documentation/swagger-ui-dist/swagger-ui.js.map index d596f41..9cd962b 100644 --- a/documentation/swagger-ui-dist/swagger-ui.js.map +++ b/documentation/swagger-ui-dist/swagger-ui.js.map @@ -1 +1 @@ -{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAwxCA;AAoyHA;AAuxHA;AAy4FA;AA2sCA;AAmgCA;AA0iCA;AA+3BA","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAyxCA;AAoyHA;AAuxHA;AAy4FA;AA2sCA;AAmgCA;AA0iCA;AA+3BA","sourceRoot":""} \ No newline at end of file diff --git a/documentation/swagger.json b/documentation/swagger.json index ca3d0ba..71d9539 100644 --- a/documentation/swagger.json +++ b/documentation/swagger.json @@ -9,11 +9,31 @@ "schemes": [ "http" ], - "basePath": "/dotclear/index.php?rest/", + "basePath": "/dotclear/index.php?rest", "produces": [ "application/json" ], "paths": { + "/specs": { + "get": { + "summary": "Get this API SWAGGER documentation", + "responses": { + "200": { + "description": "swagger.json", + "schema": { + "title": "doc", + "type": "string" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, "/blogs": { "get": { "summary": "Get list of availables blogs", @@ -29,10 +49,9 @@ "200": { "description": "array serving blogs properties", "schema": { - "title": "blogs", "type": "array", "items": { - "$ref": "#/definitions/blog" + "type": "string" } } }, @@ -695,16 +714,14 @@ "blog_url": { "type": "string" }, - "description": { + "blog_desc": { "type": "string" }, - "blog_status": { - "type": "string", - "enum": [ - "En ligne", - "Hors ligne", - "Retiré" - ] + "lang": { + "type": "string" + }, + "blog_timezone": { + "type": "string" }, "url_scan": { "type": "string", diff --git a/inc/class.rest.auth.php b/inc/class.rest.auth.php index cd9aa79..a8f6637 100644 --- a/inc/class.rest.auth.php +++ b/inc/class.rest.auth.php @@ -2,84 +2,122 @@ class restAuth extends dcAuth { - # L'utilisateur n'a pas le droit de changer son mot de passe - protected $allow_pass_change = false; + # L'utilisateur n'a pas le droit de changer son mot de passe + protected $allow_pass_change = false; - /** - * Méthode de vérification de la clef d'api_key - * Remplace la méthode chekUser (id: password) - * Only use $user_key (all others parameters are for compatibility with the parent function) - * input: $user_key STRING - * output: boolean - */ - - public function checkUser($user_id, $pwd = NULL, $user_key = NULL, $check_blog = true) - { - - global $core; + /** + * Méthode de vérification de la clef d'api_key + * Remplace la méthode chekUser (id: password) + * Only use $user_key (all others parameters are for compatibility with the parent function) + * input: $user_key STRING + * output: boolean + */ + + public function checkUser($user_id, $pwd = NULL, $user_key = NULL, $check_blog = true) + { + + global $core; - //Check for the user api key - $sqlStr = " SELECT setting_id - FROM dc_setting - WHERE setting_ns='rest' - AND setting_id LIKE 'rest_key_%' - AND setting_value = md5('".$core->con->escape($user_key)."');"; - - try { - $rs = $core->con->select($sqlStr); - } catch (Exception $e) { - $err = $e->getMessage(); - return false; - } + $hashedKey = $core->auth->crypt($user_key); + //Check for the user api key + $sqlStr = " SELECT setting_id + FROM dc_setting + WHERE setting_ns='rest' + AND setting_id LIKE 'rest_key_%' + AND setting_value = '".$core->con->escape($hashedKey)."';"; + + try { + $rs = $core->con->select($sqlStr); + } catch (Exception $e) { + $err = $e->getMessage(); + return false; + } - if ($rs->isEmpty()) { - sleep(rand(2,5)); - return false; - } + if ($rs->isEmpty()) { + sleep(rand(2,5)); + return false; + } - //get the user ID from the previous query - $userId = explode("_", $rs->setting_id)[2]; - - //get USER infos - - $strReq = 'SELECT user_id, user_super, user_pwd, user_change_pwd, '. - 'user_name, user_firstname, user_displayname, user_email, '. - 'user_url, user_default_blog, user_options, '. - 'user_lang, user_tz, user_post_status, user_creadt, user_upddt '. - 'FROM '.$this->con->escapeSystem($this->user_table).' '. - "WHERE user_id = '".$this->con->escape($userId)."'"; - - try { - $rs = $core->con->select($strReq); - } catch (Exception $e) { - $err = $e->getMessage(); - return false; - } + //get the user ID from the previous query + $userId = explode("_", $rs->setting_id)[2]; + + //get USER infos + + $strReq = 'SELECT user_id, user_super, user_pwd, user_change_pwd, '. + 'user_name, user_firstname, user_displayname, user_email, '. + 'user_url, user_default_blog, user_options, '. + 'user_lang, user_tz, user_post_status, user_creadt, user_upddt '. + 'FROM '.$core->con->escapeSystem($this->user_table).' '. + "WHERE user_id = '".$core->con->escape($userId)."'"; + + try { + $rs = $core->con->select($strReq); + } catch (Exception $e) { + $err = $e->getMessage(); + return false; + } - if ($rs->isEmpty()) { - sleep(rand(2,5)); - return false; - } - - $this->user_id = $rs->user_id; - $this->user_change_pwd = (boolean) $rs->user_change_pwd; - $this->user_admin = (boolean) $rs->user_super; - $this->user_info['user_pwd'] = $rs->user_pwd; - $this->user_info['user_name'] = $rs->user_name; - $this->user_info['user_firstname'] = $rs->user_firstname; - $this->user_info['user_displayname'] = $rs->user_displayname; - $this->user_info['user_email'] = $rs->user_email; - $this->user_info['user_url'] = $rs->user_url; - $this->user_info['user_default_blog'] = $rs->user_default_blog; - $this->user_info['user_lang'] = $rs->user_lang; - $this->user_info['user_tz'] = $rs->user_tz; - $this->user_info['user_post_status'] = $rs->user_post_status; - $this->user_info['user_creadt'] = $rs->user_creadt; - $this->user_info['user_upddt'] = $rs->user_upddt; - $this->user_info['user_cn'] = dcUtils::getUserCN($rs->user_id, $rs->user_name, - $rs->user_firstname, $rs->user_displayname); - //$this->user_options = array_merge($this->core->userDefaults(),$rs->options()); - $this->user_prefs = new dcPrefs($this->core,$this->user_id); - return true; - } + if ($rs->isEmpty()) { + sleep(rand(2,5)); + return false; + } + + $this->user_id = $rs->user_id; + $this->user_change_pwd = (boolean) $rs->user_change_pwd; + $this->user_admin = (boolean) $rs->user_super; + $this->user_info['user_pwd'] = $rs->user_pwd; + $this->user_info['user_name'] = $rs->user_name; + $this->user_info['user_firstname'] = $rs->user_firstname; + $this->user_info['user_displayname'] = $rs->user_displayname; + $this->user_info['user_email'] = $rs->user_email; + $this->user_info['user_url'] = $rs->user_url; + $this->user_info['user_default_blog'] = $rs->user_default_blog; + $this->user_info['user_lang'] = $rs->user_lang; + $this->user_info['user_tz'] = $rs->user_tz; + $this->user_info['user_post_status'] = $rs->user_post_status; + $this->user_info['user_creadt'] = $rs->user_creadt; + $this->user_info['user_upddt'] = $rs->user_upddt; + $this->user_info['user_cn'] = dcUtils::getUserCN($rs->user_id, $rs->user_name, + $rs->user_firstname, $rs->user_displayname); + + //$this->user_options = array_merge($this->core->userDefaults(),$rs->options()); + $this->user_prefs = new dcPrefs($this->core,$this->user_id); + return true; + } + + //return user permission for all blogs + //[blog_id] => permission + public function getAllPermissions() + { + global $core; + + //conserve the value + static $blogs = false; + + if($blogs !== false){ + return $blogs; + } + + + if ($this->user_admin) { //user_admin == super admin + $strReq = 'SELECT blog_id '. + 'from '.$this->blog_table; + $rs = $core->con->select($strReq); + while ($rs->fetch()) + { + $blogs[$rs->blog_id] = 'admin'; + } + return $blogs; + } + $strReq = 'SELECT blog_id, permissions '. + 'FROM '.$this->perm_table.' '. + "WHERE user_id = '".$this->con->escape($this->user_id)."' ". + "AND (permissions LIKE '%|usage|%' OR permissions LIKE '%|admin|%' OR permissions LIKE '%|contentadmin|%') "; + + $rs = $this->con->select($strReq); + while ($rs->fetch()){ + $blogs[$rs->blog_id] = $this->parsePermissions($rs->permissions); + } + return $blogs; + } } \ No newline at end of file diff --git a/inc/class.rest.key.php b/inc/class.rest.key.php index ac986c2..3226fd0 100644 --- a/inc/class.rest.key.php +++ b/inc/class.rest.key.php @@ -1,91 +1,90 @@ key = ''; - } - public function new_key($dcUserId) - { - $this->key = $this->rand_str(); - $this -> put_dc_setting_user_key($dcUserId); - return $this->key; - } - - public function set_key($key) - { - $this->key = $key; - } - - public function get_dc_admin_form($dcUserId) - { - - global $core; - - //tester si une clef d'API a été générée - - if($this->dc_is_key_setting_set($dcUserId)){ - $infoFormApiKey = __('Your api key has already been created.'); - $buttonFormApiKey = __('Erase existing API key and generate a new one for').' '.$dcUserId; - }else{ - $infoFormApiKey = __('No API key found.'); - $buttonFormApiKey = __('Generate a API key for').' '.$dcUserId; - } - - if($this->key == ''){ - $infoKey = $infoFormApiKey; - }else{ - $infoKey = '

'.__('The api key is').':
'. - __('Copy and paste it, You will cannot see it again.').'

'; - } - - - return '
'. - $infoKey. - '

'. - $core->formNonce(). - '
'; - } - - private function dc_is_key_setting_set($dcUserId) - { - global $core; - - $apiKeyName = $this->get_dc_setting_api_name($dcUserId); - $currentHashedKey = $core->blog->settings->rest->{$apiKeyName}; - if(empty($currentHashedKey)){ - return false; - }else{ - return true; - } - } - - private function put_dc_setting_user_key($dcUserId) - { - global $core; - - if ($this->key == ''){ - //don't save an empty key - return false; - } - $hash = md5($this->key); - $core->blog->settings->rest->put( - $this->get_dc_setting_api_name($dcUserId), - $hash, - 'string' - ); - return $hash; - } - - private function get_dc_setting_api_name($dcUserId) - { - return 'rest_key_'.$dcUserId; - } - - private function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890') - { + + public $key; + + public function __construct(){ + $this->key = ''; + } + public function new_key($dcUserId) + { + $this->key = $this->rand_str(); + $this -> put_dc_setting_user_key($dcUserId); + return $this->key; + } + + public function set_key($key) + { + $this->key = $key; + } + + public function get_dc_admin_form($dcUserId) + { + + global $core; + + //tester si une clef d'API a été générée + if($this->dc_is_key_setting_set($dcUserId)){ + $infoFormApiKey = __('Your api key has already been created.'); + $buttonFormApiKey = __('Erase existing API key and generate a new one for').' '.$dcUserId; + }else{ + $infoFormApiKey = __('No API key found.'); + $buttonFormApiKey = __('Generate a API key for').' '.$dcUserId; + } + + if($this->key == ''){ + $infoKey = $infoFormApiKey; + }else{ + $infoKey = '

'.__('The api key is').':
'. + __('Copy and paste it, You will cannot see it again.').'

'; + } + + + return '
'. + $infoKey. + '

'. + $core->formNonce(). + '
'; + } + + private function dc_is_key_setting_set($dcUserId) + { + global $core; + + $apiKeyName = $this->get_dc_setting_api_name($dcUserId); + $currentHashedKey = $core->blog->settings->rest->{$apiKeyName}; + if(empty($currentHashedKey)){ + return false; + }else{ + return true; + } + } + + private function put_dc_setting_user_key($dcUserId) + { + global $core; + + if ($this->key == ''){ + //don't save an empty key + return false; + } + $hashedKey = $core->auth->crypt($this->key); + $core->blog->settings->rest->put( + $this->get_dc_setting_api_name($dcUserId), + $hashedKey, + 'string' + ); + return $hashedKey; + } + + private function get_dc_setting_api_name($dcUserId) + { + return 'rest_key_'.$dcUserId; + } + + private function rand_str($length = 32, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890') + { $chars_length = (strlen($chars) - 1); $string = $chars{rand(0, $chars_length)}; for ($i = 1; $i < $length; $i = strlen($string)){ @@ -93,5 +92,5 @@ class ApiKey if ($r != $string{$i - 1}) $string .= $r; } return $string; - } + } } \ No newline at end of file diff --git a/inc/class.rest.query.get.blog.php b/inc/class.rest.query.get.blog.php new file mode 100644 index 0000000..f90803a --- /dev/null +++ b/inc/class.rest.query.get.blog.php @@ -0,0 +1,27 @@ + 404 + * l'API n'est pas publique + * -> refus + * l'API est publique + * -> OK, mais on ne retourne pas les infos techniques + * L'utilisateur est authentifié + * n'est pas admin (du blog en question) + * -> OK, mais on ne retourne pas les infos techniques + * est admin + * -> L'API retourne le maximum d'infos + */ +} \ No newline at end of file diff --git a/inc/class.rest.query.get.blogs.php b/inc/class.rest.query.get.blogs.php index 28db69a..f67a11f 100644 --- a/inc/class.rest.query.get.blogs.php +++ b/inc/class.rest.query.get.blogs.php @@ -2,17 +2,25 @@ class RestQueryGetBlogs extends RestQuery { - public function __construct($user){ - if($user === false){ - //need To be authentified - $this->response_code = 403; - $this->response_message = array('code' => 403, 'error' => 'get Blogs methods requires to be authentified'); - return; - } - //error_log(json_encode($user->findUserBlog())); - - - } - - + public function __construct(){ + + global $core; + $this->blog_id = false; //this method doesn't depend on a bolg_id + $this->required_perms = 'none'; //I want user have an account + + if($this->is_allowed() === false){ + //need To be authentified + $this->response_code = 403; + $this->response_message = array('code' => 403, 'error' => 'get Blogs methods requires to be authentified'); + return; + } + //list the blogs the user can access + $blgs = $core->auth->getAllPermissions(); + $ret = array(); + foreach($blgs as $key=>$value){ + $ret[] = $key; + } + $this->response_code = 200; + $this->response_message = $ret; + } } \ No newline at end of file diff --git a/inc/class.rest.query.get.specs.php b/inc/class.rest.query.get.specs.php index e1f9abe..100e514 100644 --- a/inc/class.rest.query.get.specs.php +++ b/inc/class.rest.query.get.specs.php @@ -1,19 +1,27 @@ response_code = 200; - - $specs = json_decode(file_get_contents(dirname(__FILE__).'/../documentation/swagger.json'),true); - //change some parameters - $url = parse_url($core->blog->url.$core->url->getBase('rest')); - $specs['host'] = $url['host']; - $specs['schemes'] = $url['scheme']; - preg_match('/https?:\/\/[^\/]*(\/.*)/',$core->blog->url.$core->url->getBase('rest'),$end); - $specs['basePath'] = $end[1]; - $this->response_message = $specs; - return; - - } + public function __construct(){ + global $core; + $this->response_code = 200; + + $this->required_perms = 'unauth'; + + if($this->is_allowed() === false){ + $this->response_code = 403; + $this->response_message = array('code' => 403, 'error' => 'this method is not open'); + return; + } + + $specs = json_decode(file_get_contents(dirname(__FILE__).'/../documentation/swagger.json'),true); + //change some parameters + $url = parse_url($core->blog->url.$core->url->getBase('rest')); + $specs['host'] = $url['host']; + $specs['schemes'] = $url['scheme']; + preg_match('/https?:\/\/[^\/]*(\/.*)/',$core->blog->url.$core->url->getBase('rest'),$end); + $specs['basePath'] = $end[1]; + $this->response_message = $specs; + return; + + } } \ No newline at end of file diff --git a/inc/class.rest.query.php b/inc/class.rest.query.php index 8594826..a6c781c 100644 --- a/inc/class.rest.query.php +++ b/inc/class.rest.query.php @@ -1,72 +1,215 @@ "Continue", - 101 =>"Switching Protocols", - 102 =>"Processing", - 200 =>"OK", - 201 =>"Created", - 202 =>"Accepted", - 203 =>"Non-Authoritative Information", - 204 =>"No Content", - 205 =>"Reset Content", - 206 =>"Partial Content", - 207 =>"Multi-Status", - 210 =>"Content Different", - 226 =>"IM Used", - 300 =>"Multiple Choices", - 301 =>"Moved Permanently", - 302 =>"Moved Temporarily", - 303 =>"See Other", - 304 =>"Not Modified", - 305 =>"Use Proxy", - 306 =>"(aucun)", - 307 =>"Temporary Redirect", - 308 =>"Permanent Redirect", - 310 =>"Too many Redirects", - 400 =>"Bad Request", - 401 =>"Unauthorized", - 402 =>"Payment Required", - 403 =>"Forbidden", - 404 =>"Not Found", - 405 =>"Method Not Allowed", - 406 =>"Not Acceptable", - 407 =>"Proxy Authentication Required", - 408 =>"Request Time-out", - 409 =>"Conflict", - 410 =>"Gone", - 411 =>"Length Required", - 412 =>"Precondition Failed", - 413 =>"Request Entity Too Large", - 414 =>"Request-URI Too Long", - 415 =>"Unsupported Media Type", - 416 =>"Requested range unsatisfiable", - 417 =>"Expectation failed", - 418 =>"I’m a teapot", - 421 =>"Bad mapping / Misdirected Request", - 422 =>"Unprocessable entity", - 423 =>"Locked", - 424 =>"Method failure", - 425 =>"Unordered Collection", - 426 =>"Upgrade Required", - 428 =>"Precondition Required", - 429 =>"Too Many Requests", - 431 =>"Request Header Fields Too Large", - 449 =>"Retry With", - 450 =>"Blocked by Windows Parental Controls", - 451 =>"Unavailable For Legal Reasons", - 456 =>"Unrecoverable Error" - ); - - if(isset($codes[$code])){ - return "HTTP/1.0 ".$code." ".$codes[$code]; - }else{ - return "HTTP/1.0 ".$code." Something wrong happened"; - } - } + public $response_code; + public $response_message; //array + public $blog_id; + protected $required_perms = 'admin'; //must be changed by the childs class + /* + should be: + 'admin' + 'usage' + 'publish' + 'delete' + 'contentadmin' + 'categories' + 'media' + 'media_admin' + 'none' //must be have an account (without any rights) + 'unauth' //Open to the world + */ + + public function __construct() + { + + $this->response_code = RestQuery::get_full_code_header(400); + $this->response_message = array( + "error" => "Unrecoknized method", + "code" => 400 + ); + } + /** + * Check if required fields are set + * $strict => Go on error if a additionnal field is given + */ + protected function check_for_required_fields($arrayToCheck,$fieldsRequired,$fieldsOptionals = '') + { + if ($fieldsOptionals == ''){ + $fieldsOptionals == array(); + } + + $fieldsSetted = array_keys($arrayToCheck); + + if($fieldsOptionals == ''){ + if(empty(array_diff($fieldsSetted,$fieldsRequired))){ + return true; + }else{ + $this->response_code = RestQuery::get_full_code_header(400); + $this->response_message = array( + "error" => "Only and each of following parameters ". + implode(", ",$fieldsRequired)." are required", + "code" => 400 + ); + return false; + } + }else{ + //check if all required fields are set + foreach($fieldsRequired as $key){ + if(!isset($arrayToCheck[$key])){ + $this->response_code = RestQuery::get_full_code_header(400); + $this->response_message = array( + "error" => "field ".$key." is needed", + "code" => 400 + ); + return false; + } + } + //check if a field is not in required and in fieldsOptionals + foreach($fieldsSetted as $keyToTest){ + if((!in_array($keyToTest,$fieldsRequired)) && (!in_array($keyToTest,$fieldsOptionals))){ + $this->response_message = array( + "error" => "Unwanted field '".$keyToTest."'", + "code" => 400 + ); + return false; + } + } + + return true; + } + + + } + protected function body_to_array($body){ + if($ret = json_decode($body,true)){ + return $ret; + }else{ + $this->response_code = 301; + $this->response_message = array( + 'error' => 'Can\'t parse input JSON', + 'code' => 400 + ); + return false; + } + } + protected function is_allowed() + { + global $core; + if($core->auth){ + $perms = $core->auth->getAllPermissions(); + } + + + switch($this->required_perms){ + case 'unauth': + + + //on verifie quand même que l'API est ouverte + if((!$core->blog->settings->rest->rest_is_open) && ($core->auth === false)){ + return false; + }else{ + return true; + } + + break; + //to do + case 'none': + //user must be valid + if($core->auth === false){ + return false; + }else{ + return true; + } + break; + case 'media_admin': + break; + case 'media': + break; + case 'categories': + break; + case 'contentadmin': + break; + case 'delete': + break; + case 'publish': + break; + case 'usage': + break; + case 'admin': + if($core->auth === false){ + return false; + } + if ($core->auth->isSuperAdmin()){ + return true; + }else{ + return false; + } + break; + } + } + public function get_full_code_header($code){ + static $codes = array( + 100 =>"Continue", + 101 =>"Switching Protocols", + 102 =>"Processing", + 200 =>"OK", + 201 =>"Created", + 202 =>"Accepted", + 203 =>"Non-Authoritative Information", + 204 =>"No Content", + 205 =>"Reset Content", + 206 =>"Partial Content", + 207 =>"Multi-Status", + 210 =>"Content Different", + 226 =>"IM Used", + 300 =>"Multiple Choices", + 301 =>"Moved Permanently", + 302 =>"Moved Temporarily", + 303 =>"See Other", + 304 =>"Not Modified", + 305 =>"Use Proxy", + 306 =>"(aucun)", + 307 =>"Temporary Redirect", + 308 =>"Permanent Redirect", + 310 =>"Too many Redirects", + 400 =>"Bad Request", + 401 =>"Unauthorized", + 402 =>"Payment Required", + 403 =>"Forbidden", + 404 =>"Not Found", + 405 =>"Method Not Allowed", + 406 =>"Not Acceptable", + 407 =>"Proxy Authentication Required", + 408 =>"Request Time-out", + 409 =>"Conflict", + 410 =>"Gone", + 411 =>"Length Required", + 412 =>"Precondition Failed", + 413 =>"Request Entity Too Large", + 414 =>"Request-URI Too Long", + 415 =>"Unsupported Media Type", + 416 =>"Requested range unsatisfiable", + 417 =>"Expectation failed", + 418 =>"I’m a teapot", + 421 =>"Bad mapping / Misdirected Request", + 422 =>"Unprocessable entity", + 423 =>"Locked", + 424 =>"Method failure", + 425 =>"Unordered Collection", + 426 =>"Upgrade Required", + 428 =>"Precondition Required", + 429 =>"Too Many Requests", + 431 =>"Request Header Fields Too Large", + 449 =>"Retry With", + 450 =>"Blocked by Windows Parental Controls", + 451 =>"Unavailable For Legal Reasons", + 456 =>"Unrecoverable Error" + ); + + if(isset($codes[$code])){ + return "HTTP/1.0 ".$code." ".$codes[$code]; + }else{ + return "HTTP/1.0 ".$code." Something wrong happened"; + } + } } diff --git a/inc/class.rest.query.post.blogs.php b/inc/class.rest.query.post.blogs.php new file mode 100644 index 0000000..0a4205b --- /dev/null +++ b/inc/class.rest.query.post.blogs.php @@ -0,0 +1,97 @@ +blog_id = false; //this method doesn't depend on a bolg_id + $this->required_perms = 'admin'; //I want user have an account + + if($this->is_allowed() === false){ + //need To be authentified + $this->response_code = 403; + $this->response_message = array('code' => 403, 'error' => 'You need to be admin to create a new blog'); + return; + } + + $inputArray = $this-> body_to_array($body); + if ($inputArray === false){ + return false; + } + + //permit optional description + if(!isset($inputArray['blog_desc'])){ + $inputArray["blog_desc"] = ''; + } + //check if parameters are set + + if(!$this->check_for_required_fields( $inputArray, array('blog_id','blog_url','blog_name','blog_desc'), + array('lang','blog_timezone','url_scan')) ){ + return; + } + //Following lines are same as admin/blog.php + + $cur = $core->con->openCursor($core->prefix.'blog'); + $blog_id = $cur->blog_id = $inputArray['blog_id']; + $blog_url = $cur->blog_url = $inputArray['blog_url']; + $blog_name = $cur->blog_name = $inputArray['blog_name']; + $blog_desc = $cur->blog_desc = $inputArray['blog_desc']; + + try + { + # --BEHAVIOR-- adminBeforeBlogCreate + $core->callBehavior('adminBeforeBlogCreate',$cur,$blog_id); + + $core->addBlog($cur); + + # Default settings and override some + $core->blogDefaults($cur->blog_id); + $blog_settings = new dcSettings($core,$cur->blog_id); + $blog_settings->addNamespace('system'); + + if(isset($inputArray['lang'])){ + $blog_settings->system->put('lang',$inputArray['lang']); + }else{ + $blog_settings->system->put('lang',$core->auth->getInfo('user_lang')); + } + + if(isset($inputArray['blog_timezone'])){ + $blog_settings->system->put('blog_timezone',$inputArray['blog_timezone']); + }else{ + $blog_settings->system->put('blog_timezone',$core->auth->getInfo('user_tz')); + } + + if(isset($inputArray['url_scan'])){ + $blog_settings->system->put('url_scan',$inputArray['url_scan']); + }elseif(substr($blog_url,-1) == '?') { + $blog_settings->system->put('url_scan','query_string'); + } else { + $blog_settings->system->put('url_scan','path_info'); + } + + # --BEHAVIOR-- adminAfterBlogCreate + $core->callBehavior('adminAfterBlogCreate',$cur,$blog_id,$blog_settings); + + //cool + $this->response_code = 200; + $this->response_message = array( + 'code' => 200, + 'message' => 'Successfully created blog'.$blog_id + ); + + } + catch (Exception $e) + { + $this->response_code = 500; + $this->response_message = array( + 'code' => 500, + 'message' => $e->getMessage() + ); + } + return; + + } + +} \ No newline at end of file diff --git a/index.php b/index.php index af9c8fe..19d8e66 100644 --- a/index.php +++ b/index.php @@ -8,16 +8,16 @@ $apiKey = new ApiKey; // Setting default parameters if missing configuration $core->blog->settings->addNamespace('rest'); if (is_null($core->blog->settings->rest->rest_active)) { - try { - $core->blog->settings->rest->put('rest_active',false,'boolean',true); - $core->blog->settings->rest->put('rest_is_open',false,'boolean',true); - $core->blog->settings->rest->put('rest_send_cors_headers',true,'boolean',true); - $core->blog->triggerBlog(); - http::redirect($p_url); - } - catch (Exception $e) { - $core->error->add($e->getMessage()); - } + try { + $core->blog->settings->rest->put('rest_active',false,'boolean',true); + $core->blog->settings->rest->put('rest_is_open',false,'boolean',true); + $core->blog->settings->rest->put('rest_send_cors_headers',true,'boolean',true); + $core->blog->triggerBlog(); + http::redirect($p_url); + } + catch (Exception $e) { + $core->error->add($e->getMessage()); + } } // Getting current parameters $active = (boolean)$core->blog->settings->rest->rest_active; @@ -26,70 +26,70 @@ $sendHeaders =(boolean)$core->blog->settings->rest->rest_send_cors_headers; //Sousmission Formulaire parametres if ((!empty($_POST['saveconfig'])) && ($core->auth->isSuperAdmin())) { - try - { - $core->blog->settings->addNameSpace('rest'); - $active = (empty($_POST['active'])) ? false : true; - $core->blog->settings->rest->put('rest_active',$active,'boolean'); - - $openApi = (empty($_POST['open'])) ? false : true; - $core->blog->settings->rest->put('rest_is_open',$openApi,'boolean'); - - $sendHeaders = (empty($_POST['sendHeaders'])) ? false : true; - $core->blog->settings->rest->put('rest_send_cors_headers',$sendHeaders,'boolean'); - - dcPage::addSuccessNotice(__('Configuration successfully updated.')); - http::redirect($p_url); - }catch (Exception $e) - { - $core->error->add($e->getMessage()); - } + try + { + $core->blog->settings->addNameSpace('rest'); + $active = (empty($_POST['active'])) ? false : true; + $core->blog->settings->rest->put('rest_active',$active,'boolean'); + + $openApi = (empty($_POST['open'])) ? false : true; + $core->blog->settings->rest->put('rest_is_open',$openApi,'boolean'); + + $sendHeaders = (empty($_POST['sendHeaders'])) ? false : true; + $core->blog->settings->rest->put('rest_send_cors_headers',$sendHeaders,'boolean'); + + dcPage::addSuccessNotice(__('Configuration successfully updated.')); + http::redirect($p_url); + }catch (Exception $e) + { + $core->error->add($e->getMessage()); + } } //Sousmission Formulaire Reset API Key if(!empty($_POST['resetApiKey'])){ - $core->blog->settings->addNameSpace('rest'); - $apiKey -> new_key($core->auth->userID()); - dcPage::addSuccessNotice(__('Your new key is').' '.$apiKey->key); + $core->blog->settings->addNameSpace('rest'); + $apiKey -> new_key($core->auth->userID()); + dcPage::addSuccessNotice(__('Your new key is').' '.$apiKey->key); } ?> - Rest API config + Rest API config -

Documentation

+

Documentation

">Go to the Swagger documentation

-

- get_dc_admin_form($core->auth->userID()); ?> +

+ get_dc_admin_form($core->auth->userID()); ?> auth->isSuperAdmin()): ?> -

-
-

- - -

-

- - -

-

- formNonce(); ?> -

- - -

-

- -

- - +

+ +

+ + +

+

+ + +

+

+ formNonce(); ?> +

+ + +

+

+ +

+ +