Merge remote-tracking branch 'origin/master'
@ -11,81 +11,30 @@ class UserConsoleAPI(BaseHttpClient):
|
||||
self._name = 'region'
|
||||
self.default_headers = {"Content-Type": "application/json"}
|
||||
if conf["token"] is not None:
|
||||
self.default_headers.update({"Authorization": "Token {}".format(conf["token"])})
|
||||
self.default_headers.update({
|
||||
"Authorization":
|
||||
"Token {}".format(conf["token"])
|
||||
})
|
||||
if conf is None:
|
||||
self.base_url = "https://user.goodrain.com"
|
||||
else:
|
||||
self.base_url = conf["url"]
|
||||
|
||||
|
||||
def update_service(self, service_id, body):
|
||||
#todo 127.0.0.1:3333/api/codecheck
|
||||
|
||||
# url = self.base_url + '/api/services/{0}'.format(service_id)
|
||||
url = 'http://127.0.0.1:3228/api/codecheck/{0}'.format(service_id)
|
||||
res, body = self._put(url, self.default_headers, body)
|
||||
|
||||
def update_service_prop(self, service_id, body):
|
||||
url = self.base_url + '/api/services/{0}'.format(service_id)
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def codecheck(self, service_id, body):
|
||||
pass
|
||||
|
||||
def get_tenants(self, body, headers=None):
|
||||
url = self.base_url + '/api/tenants/all-members'
|
||||
if headers is None:
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
else:
|
||||
res, body = self._post(url, headers, body)
|
||||
return res, body
|
||||
|
||||
def get_tenant(self, body):
|
||||
url = self.base_url + '/api/tenants/member'
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def hibernate_service(self, body):
|
||||
url = self.base_url + '/api/tenants/services/hibernate'
|
||||
res, body = self._put(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def stat_service(self, body):
|
||||
url = self.base_url + '/api/tenants/services/statics'
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
|
||||
def code_check(self, body):
|
||||
#todo 127.0.0.1:3333/api/codecheck
|
||||
# url = self.base_url + '/api/tenants/services/codecheck'
|
||||
url = 'http://127.0.0.1:3228/api/codecheck'
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
|
||||
def service_publish_success(self, body):
|
||||
url = self.base_url + '/api/tenants/services/publish'
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def get_region_rules(self):
|
||||
region = os.environ.get('REGION_TAG')
|
||||
url = self.base_url + '/api/rules/' + region
|
||||
res, body = self._get(url, self.default_headers)
|
||||
return res, body
|
||||
|
||||
def post_rule_instance(self, rule_id, body):
|
||||
rule_id_str = str(rule_id)
|
||||
url = self.base_url + '/api/rules/' + rule_id_str + '/instance'
|
||||
res, body = self._post(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def post_rule_history(self, rule_id, body):
|
||||
rule_id_str = str(rule_id)
|
||||
url = self.base_url + '/api/rules/' + rule_id_str + '/history'
|
||||
res, body = self._put(url, self.default_headers, body)
|
||||
return res, body
|
||||
|
||||
def get_service_info(self, service_id):
|
||||
url = self.base_url + '/api/services/{0}/info'.format(service_id)
|
||||
res, body = self._get(url, self.default_headers)
|
||||
return res, body
|
||||
|
@ -92,6 +92,8 @@ type Conf struct {
|
||||
FailTime int
|
||||
CheckIntervalSec int
|
||||
InstalledMarker string
|
||||
DBType string
|
||||
DBConnectionInfo string
|
||||
|
||||
TTL int64 // 节点超时时间,单位秒
|
||||
ReqTimeout int // 请求超时时间,单位秒
|
||||
@ -116,7 +118,7 @@ func (a *Conf) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&a.OnlineNodePath, "onlineNodePath", "/rainbond/onlinenodes/", "the path of master node in etcd")
|
||||
fs.StringVar(&a.Proc, "procPath", "/rainbond/proc/", "the path of proc in etcd")
|
||||
fs.StringVar(&a.HostIP, "hostIP", "", "the host ip you can define. default get ip from eth0")
|
||||
fs.StringVar(&a.ExecutionRecordPath, "execRecordPath", "/acp_node/exec_record/", "the path of job exec record")
|
||||
fs.StringVar(&a.ExecutionRecordPath, "execRecordPath", "/acp_node/exec_record", "the path of job exec record")
|
||||
fs.StringSliceVar(&a.EventLogServer, "event-log-server", []string{"127.0.0.1:6367"}, "host:port slice of event log server")
|
||||
fs.StringVar(&a.K8SNode, "k8sNode", "/store/nodes/", "the path of k8s node")
|
||||
fs.StringVar(&a.InstalledMarker, "installed-marker", "/etc/acp_node/check/install/success", "the path of a file for check node is installed")
|
||||
@ -146,6 +148,8 @@ func (a *Conf) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&a.RunMode, "run-mode", "worker", "the acp_node run mode,could be 'worker' or 'master'")
|
||||
fs.StringVar(&a.NodeRule, "noderule", "compute", "current node rule,maybe is `compute` `manage` `storage` ")
|
||||
//fs.StringSliceVar(&a.EventServerAddress, "event-servers", []string{"http://127.0.0.1:6363"}, "event message server address.")
|
||||
fs.StringVar(&a.DBType, "db-type", "mysql", "db type mysql or etcd")
|
||||
fs.StringVar(&a.DBConnectionInfo, "mysql", "admin:admin@tcp(127.0.0.1:3306)/region", "mysql db connection info")
|
||||
}
|
||||
|
||||
//SetLog 设置log
|
||||
|
@ -22,6 +22,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/goodrain/rainbond/cmd/node/option"
|
||||
"github.com/goodrain/rainbond/pkg/db"
|
||||
"github.com/goodrain/rainbond/pkg/db/config"
|
||||
"github.com/goodrain/rainbond/pkg/node/api/controller"
|
||||
"github.com/goodrain/rainbond/pkg/node/core/job"
|
||||
"github.com/goodrain/rainbond/pkg/node/core/k8s"
|
||||
@ -86,6 +88,17 @@ func Run(c *option.Conf) error {
|
||||
}
|
||||
event.On(event.EXIT, ms.Stop)
|
||||
}
|
||||
//mysql init
|
||||
dbconfig := config.Config{
|
||||
DBType: c.DBType,
|
||||
MysqlConnectionInfo: c.DBConnectionInfo,
|
||||
}
|
||||
if err := db.CreateManager(dbconfig); err != nil {
|
||||
logrus.Warnf("create db manager error, %v", err)
|
||||
logrus.Warnf("Ignore this db error for node main functions, but discover services in this node may be influenced.")
|
||||
//return err
|
||||
}
|
||||
defer db.CloseManager()
|
||||
//启动API服务
|
||||
apiManager := api.NewManager(*s.Conf, s.HostNode, ms)
|
||||
apiManager.Start(errChan)
|
||||
|
@ -36,9 +36,9 @@ var discoverService *service.DiscoverAction
|
||||
//Init 初始化
|
||||
func Init(c *option.Conf, ms *masterserver.MasterServer) {
|
||||
datacenterConfig = config.GetDataCenterConfig()
|
||||
taskService = service.CreateTaskService(c)
|
||||
taskService = service.CreateTaskService(c, ms)
|
||||
taskTempService = service.CreateTaskTempService(c)
|
||||
taskGroupService = service.CreateTaskGroupService(c)
|
||||
taskGroupService = service.CreateTaskGroupService(c, ms)
|
||||
appService = service.CreateAppService(c)
|
||||
nodeService = service.CreateNodeService(c, ms.Cluster)
|
||||
discoverService = service.CreateDiscoverActionManager(c)
|
||||
|
@ -46,7 +46,7 @@ func ServiceDiscover(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
//ListenerDiscover ListenerDiscover
|
||||
func ListenerDiscover(w http.ResponseWriter, r *http.Request) {
|
||||
tenantName := chi.URLParam(r, "tenant_name")
|
||||
tenantName := chi.URLParam(r, "tenant_id")
|
||||
serviceNodes := chi.URLParam(r, "service_nodes")
|
||||
lds, err := discoverService.DiscoverListeners(tenantName, serviceNodes)
|
||||
if err != nil {
|
||||
@ -64,7 +64,7 @@ func ListenerDiscover(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
//ClusterDiscover ClusterDiscover
|
||||
func ClusterDiscover(w http.ResponseWriter, r *http.Request) {
|
||||
tenantName := chi.URLParam(r, "tenant_name")
|
||||
tenantName := chi.URLParam(r, "tenant_id")
|
||||
serviceNodes := chi.URLParam(r, "service_nodes")
|
||||
cds, err := discoverService.DiscoverClusters(tenantName, serviceNodes)
|
||||
if err != nil {
|
||||
|
1362
pkg/node/api/dist/css/print.css
vendored
125
pkg/node/api/dist/css/reset.css
vendored
@ -1,125 +0,0 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
|
||||
html,
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
applet,
|
||||
object,
|
||||
iframe,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote,
|
||||
pre,
|
||||
a,
|
||||
abbr,
|
||||
acronym,
|
||||
address,
|
||||
big,
|
||||
cite,
|
||||
code,
|
||||
del,
|
||||
dfn,
|
||||
em,
|
||||
img,
|
||||
ins,
|
||||
kbd,
|
||||
q,
|
||||
s,
|
||||
samp,
|
||||
small,
|
||||
strike,
|
||||
strong,
|
||||
sub,
|
||||
sup,
|
||||
tt,
|
||||
var,
|
||||
b,
|
||||
u,
|
||||
i,
|
||||
center,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
fieldset,
|
||||
form,
|
||||
label,
|
||||
legend,
|
||||
table,
|
||||
caption,
|
||||
tbody,
|
||||
tfoot,
|
||||
thead,
|
||||
tr,
|
||||
th,
|
||||
td,
|
||||
article,
|
||||
aside,
|
||||
canvas,
|
||||
details,
|
||||
embed,
|
||||
figure,
|
||||
figcaption,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
output,
|
||||
ruby,
|
||||
section,
|
||||
summary,
|
||||
time,
|
||||
mark,
|
||||
audio,
|
||||
video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol,
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote,
|
||||
q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before,
|
||||
blockquote:after,
|
||||
q:before,
|
||||
q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
1489
pkg/node/api/dist/css/screen.css
vendored
250
pkg/node/api/dist/css/style.css
vendored
@ -1,250 +0,0 @@
|
||||
.swagger-section #header a#logo {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
background: transparent url(../images/logo.png) no-repeat left center;
|
||||
padding: 20px 0 20px 40px;
|
||||
}
|
||||
#text-head {
|
||||
font-size: 80px;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
margin-right: 20%;
|
||||
}
|
||||
.navbar-fixed-top .navbar-nav {
|
||||
height: auto;
|
||||
}
|
||||
.navbar-fixed-top .navbar-brand {
|
||||
height: auto;
|
||||
}
|
||||
.navbar-header {
|
||||
height: auto;
|
||||
}
|
||||
.navbar-inverse {
|
||||
background-color: #000;
|
||||
border-color: #000;
|
||||
}
|
||||
#navbar-brand {
|
||||
margin-left: 20%;
|
||||
}
|
||||
.navtext {
|
||||
font-size: 10px;
|
||||
}
|
||||
.h1,
|
||||
h1 {
|
||||
font-size: 60px;
|
||||
}
|
||||
.navbar-default .navbar-header .navbar-brand {
|
||||
color: #a2dfee;
|
||||
}
|
||||
/* tag titles */
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
|
||||
color: #393939;
|
||||
font-family: 'Arvo', serif;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
|
||||
color: black;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
|
||||
color: #525252;
|
||||
padding-left: 0px;
|
||||
display: block;
|
||||
clear: none;
|
||||
float: left;
|
||||
font-family: 'Arvo', serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
.navbar-default .navbar-collapse,
|
||||
.navbar-default .navbar-form {
|
||||
border-color: #0A0A0A;
|
||||
}
|
||||
.container1 {
|
||||
width: 1500px;
|
||||
margin: auto;
|
||||
margin-top: 0;
|
||||
background-image: url('../images/shield.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: -40px -20px;
|
||||
margin-bottom: 210px;
|
||||
}
|
||||
.container-inner {
|
||||
width: 1200px;
|
||||
margin: auto;
|
||||
background-color: rgba(223, 227, 228, 0.75);
|
||||
padding-bottom: 40px;
|
||||
padding-top: 40px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.header-content {
|
||||
padding: 0;
|
||||
width: 1000px;
|
||||
}
|
||||
.title1 {
|
||||
font-size: 80px;
|
||||
font-family: 'Vollkorn', serif;
|
||||
color: #404040;
|
||||
text-align: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
#icon {
|
||||
margin-top: -18px;
|
||||
}
|
||||
.subtext {
|
||||
font-size: 25px;
|
||||
font-style: italic;
|
||||
color: #08b;
|
||||
text-align: right;
|
||||
padding-right: 250px;
|
||||
}
|
||||
.bg-primary {
|
||||
background-color: #00468b;
|
||||
}
|
||||
.navbar-default .nav > li > a,
|
||||
.navbar-default .nav > li > a:focus {
|
||||
color: #08b;
|
||||
}
|
||||
.navbar-default .nav > li > a,
|
||||
.navbar-default .nav > li > a:hover {
|
||||
color: #08b;
|
||||
}
|
||||
.navbar-default .nav > li > a,
|
||||
.navbar-default .nav > li > a:focus:hover {
|
||||
color: #08b;
|
||||
}
|
||||
.text-faded {
|
||||
font-size: 25px;
|
||||
font-family: 'Vollkorn', serif;
|
||||
}
|
||||
.section-heading {
|
||||
font-family: 'Vollkorn', serif;
|
||||
font-size: 45px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
hr {
|
||||
border-color: #00468b;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.description {
|
||||
margin-top: 20px;
|
||||
padding-bottom: 200px;
|
||||
}
|
||||
.description li {
|
||||
font-family: 'Vollkorn', serif;
|
||||
font-size: 25px;
|
||||
color: #525252;
|
||||
margin-left: 28%;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.gap {
|
||||
margin-top: 200px;
|
||||
}
|
||||
.troubleshootingtext {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
padding-left: 30%;
|
||||
}
|
||||
.troubleshootingtext li {
|
||||
list-style-type: circle;
|
||||
font-size: 25px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
.block.response_body.json:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.backdrop {
|
||||
color: blue;
|
||||
}
|
||||
#myModal {
|
||||
height: 100%;
|
||||
}
|
||||
.modal-backdrop {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
}
|
||||
.curl {
|
||||
padding: 10px;
|
||||
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||
font-size: 0.9em;
|
||||
max-height: 400px;
|
||||
margin-top: 5px;
|
||||
overflow-y: auto;
|
||||
background-color: #fcf6db;
|
||||
border: 1px solid #e5e0c6;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.curl_title {
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
padding: 15px 0 5px;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-weight: 500;
|
||||
line-height: 1.1;
|
||||
}
|
||||
.footer {
|
||||
display: none;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap h2 {
|
||||
padding: 0;
|
||||
}
|
||||
h2 {
|
||||
margin: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.markdown p {
|
||||
font-size: 15px;
|
||||
font-family: 'Arvo', serif;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap .code {
|
||||
font-size: 15px;
|
||||
font-family: 'Arvo', serif;
|
||||
}
|
||||
.swagger-section .swagger-ui-wrap b {
|
||||
font-family: 'Arvo', serif;
|
||||
}
|
||||
#signin:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.dropdown-menu {
|
||||
padding: 15px;
|
||||
}
|
||||
.navbar-right .dropdown-menu {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
#signinbutton {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #08b;
|
||||
}
|
||||
.navbar-default .nav > li .details {
|
||||
color: #000000;
|
||||
text-transform: none;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-style: italic;
|
||||
line-height: 20px;
|
||||
top: -2px;
|
||||
}
|
||||
.navbar-default .nav > li .details:hover {
|
||||
color: black;
|
||||
}
|
||||
#signout {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #08b;
|
||||
}
|
14
pkg/node/api/dist/css/typography.css
vendored
@ -1,14 +0,0 @@
|
||||
/* Google Font's Droid Sans */
|
||||
@font-face {
|
||||
font-family: 'Droid Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype');
|
||||
}
|
||||
/* Google Font's Droid Sans Bold */
|
||||
@font-face {
|
||||
font-family: 'Droid Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype');
|
||||
}
|
BIN
pkg/node/api/dist/fonts/DroidSans-Bold.ttf
vendored
BIN
pkg/node/api/dist/fonts/DroidSans.ttf
vendored
BIN
pkg/node/api/dist/images/collapse.gif
vendored
Before Width: | Height: | Size: 69 B |
BIN
pkg/node/api/dist/images/expand.gif
vendored
Before Width: | Height: | Size: 73 B |
BIN
pkg/node/api/dist/images/explorer_icons.png
vendored
Before Width: | Height: | Size: 5.0 KiB |
BIN
pkg/node/api/dist/images/favicon-16x16.png
vendored
Before Width: | Height: | Size: 445 B |
BIN
pkg/node/api/dist/images/favicon-32x32.png
vendored
Before Width: | Height: | Size: 1.1 KiB |
BIN
pkg/node/api/dist/images/favicon.ico
vendored
Before Width: | Height: | Size: 5.3 KiB |
BIN
pkg/node/api/dist/images/logo_small.png
vendored
Before Width: | Height: | Size: 455 B |
BIN
pkg/node/api/dist/images/pet_store_api.png
vendored
Before Width: | Height: | Size: 631 B |
BIN
pkg/node/api/dist/images/throbber.gif
vendored
Before Width: | Height: | Size: 9.0 KiB |
BIN
pkg/node/api/dist/images/wordnik_api.png
vendored
Before Width: | Height: | Size: 670 B |
108
pkg/node/api/dist/index.html
vendored
@ -1,108 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Swagger UI</title>
|
||||
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
|
||||
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css' />
|
||||
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css' />
|
||||
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css' />
|
||||
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css' />
|
||||
<link href='css/print.css' media='print' rel='stylesheet' type='text/css' />
|
||||
|
||||
<script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
|
||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
|
||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||
<script src='lib/marked.js' type='text/javascript'></script>
|
||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||
|
||||
<!-- Some basic translations -->
|
||||
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
|
||||
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
|
||||
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var url = window.location.search.match(/url=([^&]+)/);
|
||||
if (url && url.length > 1) {
|
||||
url = decodeURIComponent(url[1]);
|
||||
} else {
|
||||
url = "/swagger.json";
|
||||
}
|
||||
|
||||
hljs.configure({
|
||||
highlightSizeThreshold: 5000
|
||||
});
|
||||
|
||||
// Pre load translate...
|
||||
if (window.SwaggerTranslator) {
|
||||
window.SwaggerTranslator.translate();
|
||||
}
|
||||
window.swaggerUi = new SwaggerUi({
|
||||
url: url,
|
||||
dom_id: "swagger-ui-container",
|
||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
||||
onComplete: function(swaggerApi, swaggerUi) {
|
||||
if (typeof initOAuth == "function") {
|
||||
initOAuth({
|
||||
clientId: "your-client-id",
|
||||
clientSecret: "your-client-secret-if-required",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: " ",
|
||||
additionalQueryStringParams: {}
|
||||
});
|
||||
}
|
||||
|
||||
if (window.SwaggerTranslator) {
|
||||
window.SwaggerTranslator.translate();
|
||||
}
|
||||
},
|
||||
onFailure: function(data) {
|
||||
log("Unable to Load SwaggerUI");
|
||||
},
|
||||
docExpansion: "none",
|
||||
jsonEditor: false,
|
||||
defaultModelRendering: 'schema',
|
||||
showRequestHeaders: false
|
||||
});
|
||||
|
||||
window.swaggerUi.load();
|
||||
|
||||
function log() {
|
||||
if ('console' in window) {
|
||||
console.log.apply(console, arguments);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="swagger-section">
|
||||
<div id='header'>
|
||||
<div class="swagger-ui-wrap">
|
||||
<a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>
|
||||
<form id='api_selector'>
|
||||
<div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text" /></div>
|
||||
<div id='auth_container'></div>
|
||||
<div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
|
||||
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
56
pkg/node/api/dist/lang/en.js
vendored
@ -1,56 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Warning: Deprecated",
|
||||
"Implementation Notes":"Implementation Notes",
|
||||
"Response Class":"Response Class",
|
||||
"Status":"Status",
|
||||
"Parameters":"Parameters",
|
||||
"Parameter":"Parameter",
|
||||
"Value":"Value",
|
||||
"Description":"Description",
|
||||
"Parameter Type":"Parameter Type",
|
||||
"Data Type":"Data Type",
|
||||
"Response Messages":"Response Messages",
|
||||
"HTTP Status Code":"HTTP Status Code",
|
||||
"Reason":"Reason",
|
||||
"Response Model":"Response Model",
|
||||
"Request URL":"Request URL",
|
||||
"Response Body":"Response Body",
|
||||
"Response Code":"Response Code",
|
||||
"Response Headers":"Response Headers",
|
||||
"Hide Response":"Hide Response",
|
||||
"Headers":"Headers",
|
||||
"Try it out!":"Try it out!",
|
||||
"Show/Hide":"Show/Hide",
|
||||
"List Operations":"List Operations",
|
||||
"Expand Operations":"Expand Operations",
|
||||
"Raw":"Raw",
|
||||
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
|
||||
"Example Value":"Example Value",
|
||||
"Model Schema":"Model Schema",
|
||||
"Model":"Model",
|
||||
"Click to set as parameter value":"Click to set as parameter value",
|
||||
"apply":"apply",
|
||||
"Username":"Username",
|
||||
"Password":"Password",
|
||||
"Terms of service":"Terms of service",
|
||||
"Created by":"Created by",
|
||||
"See more at":"See more at",
|
||||
"Contact the developer":"Contact the developer",
|
||||
"api version":"api version",
|
||||
"Response Content Type":"Response Content Type",
|
||||
"Parameter content type:":"Parameter content type:",
|
||||
"fetching resource":"fetching resource",
|
||||
"fetching resource list":"fetching resource list",
|
||||
"Explore":"Explore",
|
||||
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.",
|
||||
"Please specify the protocol for":"Please specify the protocol for",
|
||||
"Can't read swagger JSON from":"Can't read swagger JSON from",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
|
||||
"Unable to read api":"Unable to read api",
|
||||
"from path":"from path",
|
||||
"server returned":"server returned"
|
||||
});
|
53
pkg/node/api/dist/lang/es.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Advertencia: Obsoleto",
|
||||
"Implementation Notes":"Notas de implementación",
|
||||
"Response Class":"Clase de la Respuesta",
|
||||
"Status":"Status",
|
||||
"Parameters":"Parámetros",
|
||||
"Parameter":"Parámetro",
|
||||
"Value":"Valor",
|
||||
"Description":"Descripción",
|
||||
"Parameter Type":"Tipo del Parámetro",
|
||||
"Data Type":"Tipo del Dato",
|
||||
"Response Messages":"Mensajes de la Respuesta",
|
||||
"HTTP Status Code":"Código de Status HTTP",
|
||||
"Reason":"Razón",
|
||||
"Response Model":"Modelo de la Respuesta",
|
||||
"Request URL":"URL de la Solicitud",
|
||||
"Response Body":"Cuerpo de la Respuesta",
|
||||
"Response Code":"Código de la Respuesta",
|
||||
"Response Headers":"Encabezados de la Respuesta",
|
||||
"Hide Response":"Ocultar Respuesta",
|
||||
"Try it out!":"Pruébalo!",
|
||||
"Show/Hide":"Mostrar/Ocultar",
|
||||
"List Operations":"Listar Operaciones",
|
||||
"Expand Operations":"Expandir Operaciones",
|
||||
"Raw":"Crudo",
|
||||
"can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
|
||||
"Example Value":"Valor de Ejemplo",
|
||||
"Model Schema":"Esquema del Modelo",
|
||||
"Model":"Modelo",
|
||||
"apply":"aplicar",
|
||||
"Username":"Nombre de usuario",
|
||||
"Password":"Contraseña",
|
||||
"Terms of service":"Términos de Servicio",
|
||||
"Created by":"Creado por",
|
||||
"See more at":"Ver más en",
|
||||
"Contact the developer":"Contactar al desarrollador",
|
||||
"api version":"versión de la api",
|
||||
"Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",
|
||||
"fetching resource":"buscando recurso",
|
||||
"fetching resource list":"buscando lista del recurso",
|
||||
"Explore":"Explorar",
|
||||
"Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",
|
||||
"Please specify the protocol for":"Por favor, especificar el protocola para",
|
||||
"Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",
|
||||
"Unable to read api":"No se puede leer la api",
|
||||
"from path":"desde ruta",
|
||||
"server returned":"el servidor retornó"
|
||||
});
|
54
pkg/node/api/dist/lang/fr.js
vendored
@ -1,54 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Avertissement : Obsolète",
|
||||
"Implementation Notes":"Notes d'implémentation",
|
||||
"Response Class":"Classe de la réponse",
|
||||
"Status":"Statut",
|
||||
"Parameters":"Paramètres",
|
||||
"Parameter":"Paramètre",
|
||||
"Value":"Valeur",
|
||||
"Description":"Description",
|
||||
"Parameter Type":"Type du paramètre",
|
||||
"Data Type":"Type de données",
|
||||
"Response Messages":"Messages de la réponse",
|
||||
"HTTP Status Code":"Code de statut HTTP",
|
||||
"Reason":"Raison",
|
||||
"Response Model":"Modèle de réponse",
|
||||
"Request URL":"URL appelée",
|
||||
"Response Body":"Corps de la réponse",
|
||||
"Response Code":"Code de la réponse",
|
||||
"Response Headers":"En-têtes de la réponse",
|
||||
"Hide Response":"Cacher la réponse",
|
||||
"Headers":"En-têtes",
|
||||
"Try it out!":"Testez !",
|
||||
"Show/Hide":"Afficher/Masquer",
|
||||
"List Operations":"Liste des opérations",
|
||||
"Expand Operations":"Développer les opérations",
|
||||
"Raw":"Brut",
|
||||
"can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut",
|
||||
"Example Value":"Exemple la valeur",
|
||||
"Model Schema":"Définition du modèle",
|
||||
"Model":"Modèle",
|
||||
"apply":"appliquer",
|
||||
"Username":"Nom d'utilisateur",
|
||||
"Password":"Mot de passe",
|
||||
"Terms of service":"Conditions de service",
|
||||
"Created by":"Créé par",
|
||||
"See more at":"Voir plus sur",
|
||||
"Contact the developer":"Contacter le développeur",
|
||||
"api version":"version de l'api",
|
||||
"Response Content Type":"Content Type de la réponse",
|
||||
"fetching resource":"récupération de la ressource",
|
||||
"fetching resource list":"récupération de la liste de ressources",
|
||||
"Explore":"Explorer",
|
||||
"Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",
|
||||
"Please specify the protocol for":"Veuillez spécifier un protocole pour",
|
||||
"Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",
|
||||
"Unable to read api":"Impossible de lire l'api",
|
||||
"from path":"à partir du chemin",
|
||||
"server returned":"réponse du serveur"
|
||||
});
|
56
pkg/node/api/dist/lang/geo.js
vendored
@ -1,56 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"ყურადღება: აღარ გამოიყენება",
|
||||
"Implementation Notes":"იმპლემენტაციის აღწერა",
|
||||
"Response Class":"რესპონს კლასი",
|
||||
"Status":"სტატუსი",
|
||||
"Parameters":"პარამეტრები",
|
||||
"Parameter":"პარამეტრი",
|
||||
"Value":"მნიშვნელობა",
|
||||
"Description":"აღწერა",
|
||||
"Parameter Type":"პარამეტრის ტიპი",
|
||||
"Data Type":"მონაცემის ტიპი",
|
||||
"Response Messages":"პასუხი",
|
||||
"HTTP Status Code":"HTTP სტატუსი",
|
||||
"Reason":"მიზეზი",
|
||||
"Response Model":"რესპონს მოდელი",
|
||||
"Request URL":"მოთხოვნის URL",
|
||||
"Response Body":"პასუხის სხეული",
|
||||
"Response Code":"პასუხის კოდი",
|
||||
"Response Headers":"პასუხის ჰედერები",
|
||||
"Hide Response":"დამალე პასუხი",
|
||||
"Headers":"ჰედერები",
|
||||
"Try it out!":"ცადე !",
|
||||
"Show/Hide":"გამოჩენა/დამალვა",
|
||||
"List Operations":"ოპერაციების სია",
|
||||
"Expand Operations":"ოპერაციები ვრცლად",
|
||||
"Raw":"ნედლი",
|
||||
"can't parse JSON. Raw result":"JSON-ის დამუშავება ვერ მოხერხდა. ნედლი პასუხი",
|
||||
"Example Value":"მაგალითი",
|
||||
"Model Schema":"მოდელის სტრუქტურა",
|
||||
"Model":"მოდელი",
|
||||
"Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე",
|
||||
"apply":"გამოყენება",
|
||||
"Username":"მოხმარებელი",
|
||||
"Password":"პაროლი",
|
||||
"Terms of service":"მომსახურების პირობები",
|
||||
"Created by":"შექმნა",
|
||||
"See more at":"ნახე ვრცლად",
|
||||
"Contact the developer":"დაუკავშირდი დეველოპერს",
|
||||
"api version":"api ვერსია",
|
||||
"Response Content Type":"პასუხის კონტენტის ტიპი",
|
||||
"Parameter content type:":"პარამეტრის კონტენტის ტიპი:",
|
||||
"fetching resource":"რესურსების მიღება",
|
||||
"fetching resource list":"რესურსების სიის მიღება",
|
||||
"Explore":"ნახვა",
|
||||
"Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.",
|
||||
"Please specify the protocol for":"მიუთითეთ პროტოკოლი",
|
||||
"Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება",
|
||||
"Unable to read api":"api წაკითხვა ვერ მოხერხდა",
|
||||
"from path":"მისამართიდან",
|
||||
"server returned":"სერვერმა დააბრუნა"
|
||||
});
|
52
pkg/node/api/dist/lang/it.js
vendored
@ -1,52 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Attenzione: Deprecato",
|
||||
"Implementation Notes":"Note di implementazione",
|
||||
"Response Class":"Classe della risposta",
|
||||
"Status":"Stato",
|
||||
"Parameters":"Parametri",
|
||||
"Parameter":"Parametro",
|
||||
"Value":"Valore",
|
||||
"Description":"Descrizione",
|
||||
"Parameter Type":"Tipo di parametro",
|
||||
"Data Type":"Tipo di dato",
|
||||
"Response Messages":"Messaggi della risposta",
|
||||
"HTTP Status Code":"Codice stato HTTP",
|
||||
"Reason":"Motivo",
|
||||
"Response Model":"Modello di risposta",
|
||||
"Request URL":"URL della richiesta",
|
||||
"Response Body":"Corpo della risposta",
|
||||
"Response Code":"Oggetto della risposta",
|
||||
"Response Headers":"Intestazioni della risposta",
|
||||
"Hide Response":"Nascondi risposta",
|
||||
"Try it out!":"Provalo!",
|
||||
"Show/Hide":"Mostra/Nascondi",
|
||||
"List Operations":"Mostra operazioni",
|
||||
"Expand Operations":"Espandi operazioni",
|
||||
"Raw":"Grezzo (raw)",
|
||||
"can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",
|
||||
"Model Schema":"Schema del modello",
|
||||
"Model":"Modello",
|
||||
"apply":"applica",
|
||||
"Username":"Nome utente",
|
||||
"Password":"Password",
|
||||
"Terms of service":"Condizioni del servizio",
|
||||
"Created by":"Creato da",
|
||||
"See more at":"Informazioni aggiuntive:",
|
||||
"Contact the developer":"Contatta lo sviluppatore",
|
||||
"api version":"versione api",
|
||||
"Response Content Type":"Tipo di contenuto (content type) della risposta",
|
||||
"fetching resource":"recuperando la risorsa",
|
||||
"fetching resource list":"recuperando lista risorse",
|
||||
"Explore":"Esplora",
|
||||
"Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",
|
||||
"Please specify the protocol for":"Si prega di specificare il protocollo per",
|
||||
"Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",
|
||||
"Unable to read api":"Impossibile leggere la api",
|
||||
"from path":"da cartella",
|
||||
"server returned":"il server ha restituito"
|
||||
});
|
53
pkg/node/api/dist/lang/ja.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"警告: 廃止予定",
|
||||
"Implementation Notes":"実装メモ",
|
||||
"Response Class":"レスポンスクラス",
|
||||
"Status":"ステータス",
|
||||
"Parameters":"パラメータ群",
|
||||
"Parameter":"パラメータ",
|
||||
"Value":"値",
|
||||
"Description":"説明",
|
||||
"Parameter Type":"パラメータタイプ",
|
||||
"Data Type":"データタイプ",
|
||||
"Response Messages":"レスポンスメッセージ",
|
||||
"HTTP Status Code":"HTTPステータスコード",
|
||||
"Reason":"理由",
|
||||
"Response Model":"レスポンスモデル",
|
||||
"Request URL":"リクエストURL",
|
||||
"Response Body":"レスポンスボディ",
|
||||
"Response Code":"レスポンスコード",
|
||||
"Response Headers":"レスポンスヘッダ",
|
||||
"Hide Response":"レスポンスを隠す",
|
||||
"Headers":"ヘッダ",
|
||||
"Try it out!":"実際に実行!",
|
||||
"Show/Hide":"表示/非表示",
|
||||
"List Operations":"操作一覧",
|
||||
"Expand Operations":"操作の展開",
|
||||
"Raw":"Raw",
|
||||
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
||||
"Model Schema":"モデルスキーマ",
|
||||
"Model":"モデル",
|
||||
"apply":"実行",
|
||||
"Username":"ユーザ名",
|
||||
"Password":"パスワード",
|
||||
"Terms of service":"サービス利用規約",
|
||||
"Created by":"Created by",
|
||||
"See more at":"See more at",
|
||||
"Contact the developer":"開発者に連絡",
|
||||
"api version":"APIバージョン",
|
||||
"Response Content Type":"レスポンス コンテンツタイプ",
|
||||
"fetching resource":"リソースの取得",
|
||||
"fetching resource list":"リソース一覧の取得",
|
||||
"Explore":"Explore",
|
||||
"Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
|
||||
"Please specify the protocol for":"プロトコルを指定してください",
|
||||
"Can't read swagger JSON from":"次からswagger JSONを読み込めません",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています",
|
||||
"Unable to read api":"APIを読み込めません",
|
||||
"from path":"次のパスから",
|
||||
"server returned":"サーバからの返答"
|
||||
});
|
53
pkg/node/api/dist/lang/ko-kr.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"경고:폐기예정됨",
|
||||
"Implementation Notes":"구현 노트",
|
||||
"Response Class":"응답 클래스",
|
||||
"Status":"상태",
|
||||
"Parameters":"매개변수들",
|
||||
"Parameter":"매개변수",
|
||||
"Value":"값",
|
||||
"Description":"설명",
|
||||
"Parameter Type":"매개변수 타입",
|
||||
"Data Type":"데이터 타입",
|
||||
"Response Messages":"응답 메세지",
|
||||
"HTTP Status Code":"HTTP 상태 코드",
|
||||
"Reason":"원인",
|
||||
"Response Model":"응답 모델",
|
||||
"Request URL":"요청 URL",
|
||||
"Response Body":"응답 본문",
|
||||
"Response Code":"응답 코드",
|
||||
"Response Headers":"응답 헤더",
|
||||
"Hide Response":"응답 숨기기",
|
||||
"Headers":"헤더",
|
||||
"Try it out!":"써보기!",
|
||||
"Show/Hide":"보이기/숨기기",
|
||||
"List Operations":"목록 작업",
|
||||
"Expand Operations":"전개 작업",
|
||||
"Raw":"원본",
|
||||
"can't parse JSON. Raw result":"JSON을 파싱할수 없음. 원본결과:",
|
||||
"Model Schema":"모델 스키마",
|
||||
"Model":"모델",
|
||||
"apply":"적용",
|
||||
"Username":"사용자 이름",
|
||||
"Password":"암호",
|
||||
"Terms of service":"이용약관",
|
||||
"Created by":"작성자",
|
||||
"See more at":"추가정보:",
|
||||
"Contact the developer":"개발자에게 문의",
|
||||
"api version":"api버전",
|
||||
"Response Content Type":"응답Content Type",
|
||||
"fetching resource":"리소스 가져오기",
|
||||
"fetching resource list":"리소스 목록 가져오기",
|
||||
"Explore":"탐색",
|
||||
"Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 읽어들일수 없습니다. access-control-origin 설정이 올바르지 않을수 있습니다.",
|
||||
"Please specify the protocol for":"다음을 위한 프로토콜을 정하세요",
|
||||
"Can't read swagger JSON from":"swagger JSON 을 다음으로 부터 읽을수 없습니다",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"리소스 정보 불러오기 완료. Swagger UI 랜더링",
|
||||
"Unable to read api":"api를 읽을 수 없습니다.",
|
||||
"from path":"다음 경로로 부터",
|
||||
"server returned":"서버 응답함."
|
||||
});
|
53
pkg/node/api/dist/lang/pl.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Uwaga: Wycofane",
|
||||
"Implementation Notes":"Uwagi Implementacji",
|
||||
"Response Class":"Klasa Odpowiedzi",
|
||||
"Status":"Status",
|
||||
"Parameters":"Parametry",
|
||||
"Parameter":"Parametr",
|
||||
"Value":"Wartość",
|
||||
"Description":"Opis",
|
||||
"Parameter Type":"Typ Parametru",
|
||||
"Data Type":"Typ Danych",
|
||||
"Response Messages":"Wiadomości Odpowiedzi",
|
||||
"HTTP Status Code":"Kod Statusu HTTP",
|
||||
"Reason":"Przyczyna",
|
||||
"Response Model":"Model Odpowiedzi",
|
||||
"Request URL":"URL Wywołania",
|
||||
"Response Body":"Treść Odpowiedzi",
|
||||
"Response Code":"Kod Odpowiedzi",
|
||||
"Response Headers":"Nagłówki Odpowiedzi",
|
||||
"Hide Response":"Ukryj Odpowiedź",
|
||||
"Headers":"Nagłówki",
|
||||
"Try it out!":"Wypróbuj!",
|
||||
"Show/Hide":"Pokaż/Ukryj",
|
||||
"List Operations":"Lista Operacji",
|
||||
"Expand Operations":"Rozwiń Operacje",
|
||||
"Raw":"Nieprzetworzone",
|
||||
"can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane",
|
||||
"Model Schema":"Schemat Modelu",
|
||||
"Model":"Model",
|
||||
"apply":"użyj",
|
||||
"Username":"Nazwa użytkownika",
|
||||
"Password":"Hasło",
|
||||
"Terms of service":"Warunki używania",
|
||||
"Created by":"Utworzone przez",
|
||||
"See more at":"Zobacz więcej na",
|
||||
"Contact the developer":"Kontakt z deweloperem",
|
||||
"api version":"wersja api",
|
||||
"Response Content Type":"Typ Zasobu Odpowiedzi",
|
||||
"fetching resource":"ładowanie zasobu",
|
||||
"fetching resource list":"ładowanie listy zasobów",
|
||||
"Explore":"Eksploruj",
|
||||
"Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.",
|
||||
"Please specify the protocol for":"Proszę podać protokół dla",
|
||||
"Can't read swagger JSON from":"Nie można odczytać swagger JSON z",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI",
|
||||
"Unable to read api":"Nie można odczytać api",
|
||||
"from path":"ze ścieżki",
|
||||
"server returned":"serwer zwrócił"
|
||||
});
|
53
pkg/node/api/dist/lang/pt.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Aviso: Depreciado",
|
||||
"Implementation Notes":"Notas de Implementação",
|
||||
"Response Class":"Classe de resposta",
|
||||
"Status":"Status",
|
||||
"Parameters":"Parâmetros",
|
||||
"Parameter":"Parâmetro",
|
||||
"Value":"Valor",
|
||||
"Description":"Descrição",
|
||||
"Parameter Type":"Tipo de parâmetro",
|
||||
"Data Type":"Tipo de dados",
|
||||
"Response Messages":"Mensagens de resposta",
|
||||
"HTTP Status Code":"Código de status HTTP",
|
||||
"Reason":"Razão",
|
||||
"Response Model":"Modelo resposta",
|
||||
"Request URL":"URL requisição",
|
||||
"Response Body":"Corpo da resposta",
|
||||
"Response Code":"Código da resposta",
|
||||
"Response Headers":"Cabeçalho da resposta",
|
||||
"Headers":"Cabeçalhos",
|
||||
"Hide Response":"Esconder resposta",
|
||||
"Try it out!":"Tente agora!",
|
||||
"Show/Hide":"Mostrar/Esconder",
|
||||
"List Operations":"Listar operações",
|
||||
"Expand Operations":"Expandir operações",
|
||||
"Raw":"Cru",
|
||||
"can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
|
||||
"Model Schema":"Modelo esquema",
|
||||
"Model":"Modelo",
|
||||
"apply":"Aplicar",
|
||||
"Username":"Usuário",
|
||||
"Password":"Senha",
|
||||
"Terms of service":"Termos do serviço",
|
||||
"Created by":"Criado por",
|
||||
"See more at":"Veja mais em",
|
||||
"Contact the developer":"Contate o desenvolvedor",
|
||||
"api version":"Versão api",
|
||||
"Response Content Type":"Tipo de conteúdo da resposta",
|
||||
"fetching resource":"busca recurso",
|
||||
"fetching resource list":"buscando lista de recursos",
|
||||
"Explore":"Explorar",
|
||||
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin",
|
||||
"Please specify the protocol for":"Por favor especifique o protocolo",
|
||||
"Can't read swagger JSON from":"Não é possível ler o JSON Swagger de",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI",
|
||||
"Unable to read api":"Não foi possível ler api",
|
||||
"from path":"do caminho",
|
||||
"server returned":"servidor retornou"
|
||||
});
|
56
pkg/node/api/dist/lang/ru.js
vendored
@ -1,56 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Предупреждение: Устарело",
|
||||
"Implementation Notes":"Заметки",
|
||||
"Response Class":"Пример ответа",
|
||||
"Status":"Статус",
|
||||
"Parameters":"Параметры",
|
||||
"Parameter":"Параметр",
|
||||
"Value":"Значение",
|
||||
"Description":"Описание",
|
||||
"Parameter Type":"Тип параметра",
|
||||
"Data Type":"Тип данных",
|
||||
"HTTP Status Code":"HTTP код",
|
||||
"Reason":"Причина",
|
||||
"Response Model":"Структура ответа",
|
||||
"Request URL":"URL запроса",
|
||||
"Response Body":"Тело ответа",
|
||||
"Response Code":"HTTP код ответа",
|
||||
"Response Headers":"Заголовки ответа",
|
||||
"Hide Response":"Спрятать ответ",
|
||||
"Headers":"Заголовки",
|
||||
"Response Messages":"Что может прийти в ответ",
|
||||
"Try it out!":"Попробовать!",
|
||||
"Show/Hide":"Показать/Скрыть",
|
||||
"List Operations":"Операции кратко",
|
||||
"Expand Operations":"Операции подробно",
|
||||
"Raw":"В сыром виде",
|
||||
"can't parse JSON. Raw result":"Не удается распарсить ответ:",
|
||||
"Example Value":"Пример",
|
||||
"Model Schema":"Структура",
|
||||
"Model":"Описание",
|
||||
"Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра",
|
||||
"apply":"применить",
|
||||
"Username":"Имя пользователя",
|
||||
"Password":"Пароль",
|
||||
"Terms of service":"Условия использования",
|
||||
"Created by":"Разработано",
|
||||
"See more at":"Еще тут",
|
||||
"Contact the developer":"Связаться с разработчиком",
|
||||
"api version":"Версия API",
|
||||
"Response Content Type":"Content Type ответа",
|
||||
"Parameter content type:":"Content Type параметра:",
|
||||
"fetching resource":"Получение ресурса",
|
||||
"fetching resource list":"Получение ресурсов",
|
||||
"Explore":"Показать",
|
||||
"Show Swagger Petstore Example Apis":"Показать примеры АПИ",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа",
|
||||
"Please specify the protocol for":"Пожалуйста, укажите протокол для",
|
||||
"Can't read swagger JSON from":"Не получается прочитать swagger json из",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",
|
||||
"Unable to read api":"Не удалось прочитать api",
|
||||
"from path":"по адресу",
|
||||
"server returned":"сервер сказал"
|
||||
});
|
53
pkg/node/api/dist/lang/tr.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Uyarı: Deprecated",
|
||||
"Implementation Notes":"Gerçekleştirim Notları",
|
||||
"Response Class":"Dönen Sınıf",
|
||||
"Status":"Statü",
|
||||
"Parameters":"Parametreler",
|
||||
"Parameter":"Parametre",
|
||||
"Value":"Değer",
|
||||
"Description":"Açıklama",
|
||||
"Parameter Type":"Parametre Tipi",
|
||||
"Data Type":"Veri Tipi",
|
||||
"Response Messages":"Dönüş Mesajı",
|
||||
"HTTP Status Code":"HTTP Statü Kodu",
|
||||
"Reason":"Gerekçe",
|
||||
"Response Model":"Dönüş Modeli",
|
||||
"Request URL":"İstek URL",
|
||||
"Response Body":"Dönüş İçeriği",
|
||||
"Response Code":"Dönüş Kodu",
|
||||
"Response Headers":"Dönüş Üst Bilgileri",
|
||||
"Hide Response":"Dönüşü Gizle",
|
||||
"Headers":"Üst Bilgiler",
|
||||
"Try it out!":"Dene!",
|
||||
"Show/Hide":"Göster/Gizle",
|
||||
"List Operations":"Operasyonları Listele",
|
||||
"Expand Operations":"Operasyonları Aç",
|
||||
"Raw":"Ham",
|
||||
"can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç",
|
||||
"Model Schema":"Model Şema",
|
||||
"Model":"Model",
|
||||
"apply":"uygula",
|
||||
"Username":"Kullanıcı Adı",
|
||||
"Password":"Parola",
|
||||
"Terms of service":"Servis şartları",
|
||||
"Created by":"Oluşturan",
|
||||
"See more at":"Daha fazlası için",
|
||||
"Contact the developer":"Geliştirici ile İletişime Geçin",
|
||||
"api version":"api versiyon",
|
||||
"Response Content Type":"Dönüş İçerik Tipi",
|
||||
"fetching resource":"kaynak getiriliyor",
|
||||
"fetching resource list":"kaynak listesi getiriliyor",
|
||||
"Explore":"Keşfet",
|
||||
"Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.",
|
||||
"Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz",
|
||||
"Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor",
|
||||
"Unable to read api":"api okunamadı",
|
||||
"from path":"yoldan",
|
||||
"server returned":"sunucuya dönüldü"
|
||||
});
|
39
pkg/node/api/dist/lang/translator.js
vendored
@ -1,39 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Translator for documentation pages.
|
||||
*
|
||||
* To enable translation you should include one of language-files in your index.html
|
||||
* after <script src='lang/translator.js' type='text/javascript'></script>.
|
||||
* For example - <script src='lang/ru.js' type='text/javascript'></script>
|
||||
*
|
||||
* If you wish to translate some new texts you should do two things:
|
||||
* 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
|
||||
* 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.
|
||||
* The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.
|
||||
*
|
||||
*/
|
||||
window.SwaggerTranslator = {
|
||||
|
||||
_words:[],
|
||||
|
||||
translate: function(sel) {
|
||||
var $this = this;
|
||||
sel = sel || '[data-sw-translate]';
|
||||
|
||||
$(sel).each(function() {
|
||||
$(this).html($this._tryTranslate($(this).html()));
|
||||
|
||||
$(this).val($this._tryTranslate($(this).val()));
|
||||
$(this).attr('title', $this._tryTranslate($(this).attr('title')));
|
||||
});
|
||||
},
|
||||
|
||||
_tryTranslate: function(word) {
|
||||
return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
|
||||
},
|
||||
|
||||
learn: function(wordsMap) {
|
||||
this._words = wordsMap;
|
||||
}
|
||||
};
|
53
pkg/node/api/dist/lang/zh-cn.js
vendored
@ -1,53 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"警告:已过时",
|
||||
"Implementation Notes":"实现备注",
|
||||
"Response Class":"响应类",
|
||||
"Status":"状态",
|
||||
"Parameters":"参数",
|
||||
"Parameter":"参数",
|
||||
"Value":"值",
|
||||
"Description":"描述",
|
||||
"Parameter Type":"参数类型",
|
||||
"Data Type":"数据类型",
|
||||
"Response Messages":"响应消息",
|
||||
"HTTP Status Code":"HTTP状态码",
|
||||
"Reason":"原因",
|
||||
"Response Model":"响应模型",
|
||||
"Request URL":"请求URL",
|
||||
"Response Body":"响应体",
|
||||
"Response Code":"响应码",
|
||||
"Response Headers":"响应头",
|
||||
"Hide Response":"隐藏响应",
|
||||
"Headers":"头",
|
||||
"Try it out!":"试一下!",
|
||||
"Show/Hide":"显示/隐藏",
|
||||
"List Operations":"显示操作",
|
||||
"Expand Operations":"展开操作",
|
||||
"Raw":"原始",
|
||||
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
||||
"Model Schema":"模型架构",
|
||||
"Model":"模型",
|
||||
"apply":"应用",
|
||||
"Username":"用户名",
|
||||
"Password":"密码",
|
||||
"Terms of service":"服务条款",
|
||||
"Created by":"创建者",
|
||||
"See more at":"查看更多:",
|
||||
"Contact the developer":"联系开发者",
|
||||
"api version":"api版本",
|
||||
"Response Content Type":"响应Content Type",
|
||||
"fetching resource":"正在获取资源",
|
||||
"fetching resource list":"正在获取资源列表",
|
||||
"Explore":"浏览",
|
||||
"Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。",
|
||||
"Please specify the protocol for":"请指定协议:",
|
||||
"Can't read swagger JSON from":"无法读取swagger JSON于",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI",
|
||||
"Unable to read api":"无法读取api",
|
||||
"from path":"从路径",
|
||||
"server returned":"服务器返回"
|
||||
});
|
15
pkg/node/api/dist/lib/backbone-min.js
vendored
2065
pkg/node/api/dist/lib/es5-shim.js
vendored
4608
pkg/node/api/dist/lib/handlebars-4.0.5.js
vendored
@ -1,34 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
var configure, highlightBlock;
|
||||
|
||||
configure = hljs.configure;
|
||||
// "extending" hljs.configure method
|
||||
hljs.configure = function _configure (options) {
|
||||
var size = options.highlightSizeThreshold;
|
||||
|
||||
// added highlightSizeThreshold option to set maximum size
|
||||
// of processed string. Set to null if not a number
|
||||
hljs.highlightSizeThreshold = size === +size ? size : null;
|
||||
|
||||
configure.call(this, options);
|
||||
};
|
||||
|
||||
highlightBlock = hljs.highlightBlock;
|
||||
|
||||
// "extending" hljs.highlightBlock method
|
||||
hljs.highlightBlock = function _highlightBlock (el) {
|
||||
var innerHTML = el.innerHTML;
|
||||
var size = hljs.highlightSizeThreshold;
|
||||
|
||||
// check if highlightSizeThreshold is not set or element innerHTML
|
||||
// is less than set option highlightSizeThreshold
|
||||
if (size == null || size > innerHTML.length) {
|
||||
// proceed with hljs.highlightBlock
|
||||
highlightBlock.call(hljs, el);
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
2
pkg/node/api/dist/lib/jquery-1.8.0.min.js
vendored
18
pkg/node/api/dist/lib/jquery.ba-bbq.min.js
vendored
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
|
||||
* http://benalman.com/projects/jquery-bbq-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
|
||||
/*
|
||||
* jQuery hashchange event - v1.2 - 2/11/2010
|
||||
* http://benalman.com/projects/jquery-hashchange-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
|
1
pkg/node/api/dist/lib/jquery.slideto.min.js
vendored
@ -1 +0,0 @@
|
||||
(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);
|
8
pkg/node/api/dist/lib/jquery.wiggle.min.js
vendored
@ -1,8 +0,0 @@
|
||||
/*
|
||||
jQuery Wiggle
|
||||
Author: WonderGroup, Jordan Thomas
|
||||
URL: http://labs.wondergroup.com/demos/mini-ui/index.html
|
||||
License: MIT (http://en.wikipedia.org/wiki/MIT_License)
|
||||
*/
|
||||
jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
|
||||
if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
|
3
pkg/node/api/dist/lib/js-yaml.min.js
vendored
11
pkg/node/api/dist/lib/jsoneditor.min.js
vendored
102
pkg/node/api/dist/lib/lodash.min.js
vendored
@ -1,102 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash compat -o ./lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n<t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return null==n?"":n+""}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
|
||||
return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function a(n){return Nn[n]}function c(n){return Tn[n]}function l(n,t,r){return t?n=Bn[n]:r&&(n=Dn[n]),"\\"+n}function s(n){return"\\"+Dn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&typeof n=="object"}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
|
||||
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=P,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Pn[n]}function m(_){function Nn(n){if(h(n)&&!(Wo(n)||n instanceof zn)){if(n instanceof Pn)return n;if(eu.call(n,"__chain__")&&eu.call(n,"__wrapped__"))return qr(n)}return new Pn(n)}function Tn(){}function Pn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
|
||||
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=Cu,this.__views__=[]}function Bn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:mu(null),set:new hu};t--;)this.push(n[t])}function Mn(n,t){var r=n.data;return(typeof t=="string"||de(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=De(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
|
||||
return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Zn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Xn(n,t){for(var r=-1,e=n.length,u=De(e);++r<e;)u[r]=t(n[r],r,n);return u}function Hn(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Qn(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function nt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;
|
||||
return false}function tt(n,t,r,e){return n!==w&&eu.call(e,r)?n:t}function rt(n,t,r){for(var e=-1,u=Ko(t),o=u.length;++e<o;){var i=u[e],f=n[i],a=r(f,t[i],i,n,t);(a===a?a===f:f!==f)&&(f!==w||i in n)||(n[i]=a)}return n}function et(n,t){return null==t?n:ot(t,Ko(t),n)}function ut(n,t){for(var r=-1,e=null==n,u=!e&&Sr(n),o=u?n.length:0,i=t.length,f=De(i);++r<i;){var a=t[r];f[r]=u?Ur(a,o)?n[a]:w:e?w:n[a]}return f}function ot(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function it(n,t,r){
|
||||
var e=typeof n;return"function"==e?t===w?n:Dt(n,t,r):null==n?Ne:"object"==e?At(n):t===w?Be(n):jt(n,t)}function ft(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==w)return f;if(!de(n))return n;if(e=Wo(n)){if(f=Ir(n),!t)return qn(n,f)}else{var a=ou.call(n),c=a==K;if(a!=Z&&a!=z&&(!c||u))return Ln[a]?Er(n,a,t):u?n:{};if(Gn(n))return u?n:{};if(f=Rr(c?{}:n),!t)return et(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Kn:gt)(n,function(e,u){f[u]=ft(e,t,r,u,n,o,i);
|
||||
}),f}function at(n,t,r){if(typeof n!="function")throw new Xe(T);return _u(function(){n.apply(w,r)},t)}function ct(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=jr(),f=i===r,a=f&&t.length>=F&&mu&&hu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++o<e;)if(a=n[o],f&&a===a){for(var l=c;l--;)if(t[l]===a)continue n;u.push(a)}else 0>i(t,a,0)&&u.push(a);return u}function lt(n,t){var r=true;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){
|
||||
i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];h(i)&&Sr(i)&&(r||Wo(i)||_e(i))?t?_t(i,t,r,e):Hn(e,i):r||(e[e.length]=i)}return e}function vt(n,t){return Du(n,t,Ee)}function gt(n,t){return Du(n,t,Ko)}function yt(n,t){return Mu(n,t,Ko)}function dt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){
|
||||
var i=t[r];ye(n[i])&&(o[++u]=i)}return o}function mt(n,t,r){if(null!=n){n=Dr(n),r!==w&&r in n&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=Dr(n)[t[r++]];return r&&r==e?n:w}}function wt(n,t,r,e,u,o){if(n===t)return true;if(null==n||null==t||!de(n)&&!h(t))return n!==n&&t!==t;n:{var i=wt,f=Wo(n),a=Wo(t),c=B,l=B;f||(c=ou.call(n),c==z?c=Z:c!=Z&&(f=je(n))),a||(l=ou.call(t),l==z?l=Z:l!=Z&&je(t));var s=c==Z&&!Gn(n),a=l==Z&&!Gn(t),l=c==l;if(!l||f||s){if(!e&&(c=s&&eu.call(n,"__wrapped__"),a=a&&eu.call(t,"__wrapped__"),
|
||||
c||a)){n=i(c?n.value():n,a?t.value():t,r,e,u,o);break n}if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(f?mr:xr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false}else n=wr(n,t,c)}return n}function xt(n,t,r){var e=t.length,u=e,o=!r;if(null==n)return!u;for(n=Dr(n);e--;){var i=t[e];if(o&&i[2]?i[1]!==n[i[0]]:!(i[0]in n))return false}for(;++e<u;){var i=t[e],f=i[0],a=n[f],c=i[1];if(o&&i[2]){if(a===w&&!(f in n))return false}else if(i=r?r(a,c,f):w,i===w?!wt(c,a,r,true):!i)return false;
|
||||
}return true}function bt(n,t){var r=-1,e=Sr(n)?De(n.length):[];return zu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function At(n){var t=kr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:(n=Dr(n),n[r]===e&&(e!==w||r in n))}}return function(n){return xt(n,t)}}function jt(n,t){var r=Wo(n),e=Wr(n)&&t===t&&!de(t),u=n+"";return n=Mr(n),function(o){if(null==o)return false;var i=u;if(o=Dr(o),!(!r&&e||i in o)){if(o=1==n.length?o:mt(o,St(n,0,-1)),null==o)return false;i=Gr(n),o=Dr(o);
|
||||
}return o[i]===t?t!==w||i in o:wt(t,o[i],w,true)}}function kt(n,t,r,e,u){if(!de(n))return n;var o=Sr(t)&&(Wo(t)||je(t)),i=o?w:Ko(t);return Kn(i||t,function(f,a){if(i&&(a=f,f=t[a]),h(f)){e||(e=[]),u||(u=[]);n:{for(var c=a,l=e,s=u,p=l.length,_=t[c];p--;)if(l[p]==_){n[c]=s[p];break n}var p=n[c],v=r?r(p,_,c,n,t):w,g=v===w;g&&(v=_,Sr(_)&&(Wo(_)||je(_))?v=Wo(p)?p:Sr(p)?qn(p):[]:xe(_)||_e(_)?v=_e(p)?Ie(p):xe(p)?p:{}:g=false),l.push(_),s.push(v),g?n[c]=kt(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[c]=v)}}else c=n[a],
|
||||
l=r?r(c,f,a,n,t):w,(s=l===w)&&(l=f),l===w&&(!o||a in n)||!s&&(l===l?l===c:c!==c)||(n[a]=l)}),n}function Ot(n){return function(t){return null==t?w:Dr(t)[n]}}function It(n){var t=n+"";return n=Mr(n),function(r){return mt(r,n,t)}}function Rt(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ur(e)){var u=e;vu.call(n,e,1)}}return n}function Et(n,t){return n+wu(Ru()*(t-n+1))}function Ct(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function St(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,
|
||||
0>t&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e<u;)r[e]=n[e+t];return r}function Ut(n,t){var r;return zu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function $t(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Wt(t,r,e){var u=br(),o=-1;return r=Xn(r,function(n){return u(n)}),t=bt(t,function(n){return{a:Xn(r,function(t){return t(n)}),b:++o,c:n}}),$t(t,function(t,r){var u;n:{for(var o=-1,i=t.a,f=r.a,a=i.length,c=e.length;++o<a;)if(u=n(i[o],f[o])){
|
||||
if(o>=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&mu&&hu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=a.length;p--;)if(a[p]===s)continue n;t&&a.push(s),c.push(l)}else 0>u(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r<e;)u[r]=n[t[r]];
|
||||
return u}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?St(n,e?0:o,e?o+1:u):St(n,e?o+1:0,e?u:o)}function Pt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;)var o=t[e],r=o.func.apply(o.thisArg,Hn([r],o.args));return r}function zt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Uu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)&&null!==i?e=o+1:u=o}return u}return Bt(n,t,Ne,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,a=t===w;u<o;){
|
||||
var c=wu((u+o)/2),l=r(n[c]),s=l!==w,p=l===l;(i?p||e:f?p&&s&&(e||null!=l):a?p&&(e||s):null==l?0:e?l<=t:l<t)?u=c+1:o=c}return ku(o,Su)}function Dt(n,t,r){if(typeof n!="function")return Ne;if(t===w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Mt(n){var t=new au(n.byteLength);
|
||||
return new gu(t).set(new gu(n)),t}function qt(n,t,r){for(var e=r.length,u=-1,o=ju(n.length-e,0),i=-1,f=t.length,a=De(f+o);++i<f;)a[i]=t[i];for(;++u<e;)a[r[u]]=n[u];for(;o--;)a[i++]=n[u++];return a}function Kt(n,t,r){for(var e=-1,u=r.length,o=-1,i=ju(n.length-u,0),f=-1,a=t.length,c=De(i+a);++o<i;)c[o]=n[o];for(i=o;++f<a;)c[i+f]=t[f];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Vt(n,t){return function(r,e,u){var o=t?t():{};if(e=br(e,u,3),Wo(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r);
|
||||
}}else zu(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function Zt(n){return pe(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u?r[u-2]:w,i=2<u?r[2]:w,f=1<u?r[u-1]:w;for(typeof o=="function"?(o=Dt(o,f,5),u-=2):(o=typeof f=="function"?f:w,u-=o?1:0),i&&$r(r[0],r[1],i)&&(o=3>u?w:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Yt(n,t){return function(r,e){var u=r?Vu(r):0;if(!Lr(u))return n(r,e);for(var o=t?u:-1,i=Dr(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Gt(n){return function(t,r,e){
|
||||
var u=Dr(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){var f=e[i];if(false===r(u[f],f,u))break}return t}}function Jt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments)}var e=Ht(n);return r}function Xt(n){return function(t){var r=-1;t=Fe(Ue(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Ht(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);
|
||||
case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pu(n.prototype),t=n.apply(r,t);return de(t)?t:r}}function Qt(n){function t(r,e,u){return u&&$r(r,e,u)&&(e=w),r=dr(r,n,w,w,w,w,w,e),r.placeholder=t.placeholder,r}return t}function nr(n,t){return pe(function(r){var e=r[0];return null==e?e:(r.push(t),n.apply(w,r))})}function tr(n,t){return function(r,e,u){
|
||||
if(u&&$r(r,e,u)&&(e=w),e=br(e,u,3),1==e.length){u=r=Wo(r)?r:Br(r);for(var o=e,i=-1,f=u.length,a=t,c=a;++i<f;){var l=u[i],s=+o(l);n(s,a)&&(a=s,c=l)}if(u=c,!r.length||u!==t)return u}return st(r,e,n,t)}}function rr(n,r){return function(e,u,o){return u=br(u,o,3),Wo(e)?(u=t(e,u,r),-1<u?e[u]:w):ht(e,u,n)}}function er(n){return function(r,e,u){return r&&r.length?(e=br(e,u,3),t(r,e,n)):-1}}function ur(n){return function(t,r,e){return r=br(r,e,3),ht(t,r,n,true)}}function or(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,o=De(r);n?e--:++e<r;){
|
||||
var i=o[u++]=arguments[e];if(typeof i!="function")throw new Xe(T);!t&&Pn.prototype.thru&&"wrapper"==Ar(i)&&(t=new Pn([],true))}for(e=t?-1:r;++e<r;){var i=o[e],u=Ar(i),f="wrapper"==u?Ku(i):w;t=f&&Fr(f[0])&&f[1]==(E|k|I|C)&&!f[4].length&&1==f[9]?t[Ar(f[0])].apply(t,f[3]):1==i.length&&Fr(i)?t[u]():t.thru(i)}return function(){var n=arguments,e=n[0];if(t&&1==n.length&&Wo(e)&&e.length>=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++u<r;)n=o[u].call(this,n);return n}}}function ir(n,t){
|
||||
return function(r,e,u){return typeof e=="function"&&u===w&&Wo(r)?n(r,e):t(r,Dt(e,u,3))}}function fr(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r,Ee)}}function ar(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r)}}function cr(n){return function(t,r,e){var u={};return r=br(r,e,3),gt(t,function(t,e,o){o=r(t,e,o),e=n?o:e,t=n?t:o,u[e]=t}),u}}function lr(n){return function(t,r,e){return t=u(t),(n?t:"")+_r(t,r,e)+(n?"":t)}}function sr(n){
|
||||
var t=pe(function(r,e){var u=v(e,t.placeholder);return dr(r,n,w,e,u)});return t}function pr(n,t){return function(r,e,u,o){var i=3>arguments.length;return typeof e=="function"&&o===w&&Wo(r)?n(r,e,u,i):Ct(r,br(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,x=m,j=De(m);x--;)j[x]=arguments[x];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var x=l.placeholder,k=v(j,x),m=m-k.length;if(m<c){var O=f?qn(f):w,m=ju(c-m,0),E=_?k:w,k=_?w:k,C=_?j:w,j=_?w:j;return t|=_?I:R,t&=~(_?R:I),
|
||||
g||(t&=~(b|A)),j=[n,t,r,C,E,j,k,O,a,m],O=hr.apply(w,j),Fr(n)&&Zu(O,j),O.placeholder=x,O}}if(x=p?r:this,O=h?x[n]:n,f)for(m=j.length,E=ku(f.length,m),k=qn(j);E--;)C=f[E],j[E]=Ur(C,m)?k[C]:w;return s&&a<j.length&&(j.length=a),this&&this!==Yn&&this instanceof l&&(O=d||Ht(n)),O.apply(x,j)}var s=t&E,p=t&b,h=t&A,_=t&k,g=t&j,y=t&O,d=h?w:Ht(n);return l}function _r(n,t,r){return n=n.length,t=+t,n<t&&bu(t)?(t-=n,r=null==r?" ":r+"",$e(r,du(t/r.length)).slice(0,t)):""}function vr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,a=-1,c=e.length,l=De(c+f);++a<c;)l[a]=e[a];
|
||||
for(;f--;)l[a++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&b,i=Ht(n);return u}function gr(n){var t=Ve[n];return function(n,r){return(r=r===w?0:+r||0)?(r=su(10,r),t(n*r)/r):t(n)}}function yr(n){return function(t,r,e,u){var o=br(e);return null==e&&o===it?zt(t,r,n):Bt(t,r,o(e,u,1),n)}}function dr(n,t,r,e,u,o,i,f){var a=t&A;if(!a&&typeof n!="function")throw new Xe(T);var c=e?e.length:0;if(c||(t&=~(I|R),e=u=w),c-=u?u.length:0,t&R){var l=e,s=u;e=u=w}var p=a?w:Ku(n);
|
||||
return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==E&&e==k||t==E&&e==C&&r[7].length<=p[8]||t==(E|C)&&e==k,(f<E||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:j),(e=p[3])&&(u=r[3],r[3]=u?qt(u,e,p[4]):qn(e),r[4]=u?v(r[3],P):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Kt(u,e,p[6]):qn(e),r[6]=u?v(r[5],P):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&E&&(r[8]=null==r[8]?p[8]:ku(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),r[9]=null==f?a?0:n.length:ju(f-c,0)||0,n=t==b?Jt(r[0],r[2]):t!=I&&t!=(b|I)||r[4].length?hr.apply(w,r):vr.apply(w,r),
|
||||
(p?qu:Zu)(n,r)}function mr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length;if(a!=c&&(!u||c<=a))return false;for(;++f<a;){var l=n[f],c=t[f],s=e?e(u?c:l,u?l:c,f):w;if(s!==w){if(s)continue;return false}if(u){if(!nt(t,function(n){return l===n||r(l,n,e,u,o,i)}))return false}else if(l!==c&&!r(l,c,e,u,o,i))return false}return true}function wr(n,t,r){switch(r){case D:case M:return+n==+t;case q:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:n==+t;case Y:case G:return n==t+""}return false}function xr(n,t,r,e,u,o,i){
|
||||
var f=Ko(n),a=f.length,c=Ko(t).length;if(a!=c&&!u)return false;for(c=a;c--;){var l=f[c];if(!(u?l in t:eu.call(t,l)))return false}for(var s=u;++c<a;){var l=f[c],p=n[l],h=t[l],_=e?e(u?h:p,u?p:h,l):w;if(_===w?!r(p,h,e,u,o,i):!_)return false;s||(s="constructor"==l)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function br(n,t,r){var e=Nn.callback||Le,e=e===Le?it:e;return r?e(n,t,r):e}function Ar(n){
|
||||
for(var t=n.name+"",r=Fu[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function jr(n,t,e){var u=Nn.indexOf||Yr,u=u===Yr?r:u;return n?u(n,t,e):u}function kr(n){n=Ce(n);for(var t=n.length;t--;){var r,e=n[t];r=n[t][1],r=r===r&&!de(r),e[2]=r}return n}function Or(n,t){var r=null==n?w:n[t];return me(r)?r:w}function Ir(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&eu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Rr(n){return n=n.constructor,
|
||||
typeof n=="function"&&n instanceof n||(n=Ye),new n}function Er(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case D:case M:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return e instanceof e&&(e=Lu[t]),t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Y:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function Cr(n,t,r){return null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),t=Gr(t)),
|
||||
t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Sr(n){return null!=n&&Lr(Vu(n))}function Ur(n,t){return n=typeof n=="number"||Rn.test(n)?+n:-1,t=null==t?$u:t,-1<n&&0==n%1&&n<t}function $r(n,t,r){if(!de(r))return false;var e=typeof t;return("number"==e?Sr(r)&&Ur(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Wr(n,t){var r=typeof n;return"string"==r&&dn.test(n)||"number"==r?true:Wo(n)?false:!yn.test(n)||null!=t&&n in Dr(t)}function Fr(n){var t=Ar(n),r=Nn[t];return typeof r=="function"&&t in zn.prototype?n===r?true:(t=Ku(r),
|
||||
!!t&&n===t[0]):false}function Lr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=$u}function Nr(n,t){return n===w?t:Fo(n,t,Nr)}function Tr(n,t){n=Dr(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Pr(n,t){var r={};return vt(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function zr(n){for(var t=Ee(n),r=t.length,e=r&&n.length,u=!!e&&Lr(e)&&(Wo(n)||_e(n)||Ae(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Ur(f,e)||eu.call(n,f))&&i.push(f)}return i}function Br(n){return null==n?[]:Sr(n)?Nn.support.unindexedChars&&Ae(n)?n.split(""):de(n)?n:Ye(n):Se(n);
|
||||
}function Dr(n){if(Nn.support.unindexedChars&&Ae(n)){for(var t=-1,r=n.length,e=Ye(n);++t<r;)e[t]=n.charAt(t);return e}return de(n)?n:Ye(n)}function Mr(n){if(Wo(n))return n;var t=[];return u(n).replace(mn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function qr(n){return n instanceof zn?n.clone():new Pn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Kr(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0>t?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),
|
||||
t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:w}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),e<u&&(t===t?t===n[e]:n[e]!==n[e])?e:-1;return r(n,t,e||0)}function Gr(n){var t=n?n.length:0;return t?n[t-1]:w}function Jr(n){return Kr(n,1)}function Xr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=$r(n,t,u)?w:t,t=false);var o=br();if((null!=e||o!==it)&&(e=o(e,u,3)),t&&jr()===r){t=e;var i;e=-1,
|
||||
u=n.length;for(var o=-1,f=[];++e<u;){var a=n[e],c=t?t(a,e,n):a;e&&i===c||(i=c,f[++o]=a)}n=f}else n=Lt(n,e);return n}function Hr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Zn(n,function(n){return Sr(n)?(r=ju(n.length,r),true):void 0});for(var e=De(r);++t<r;)e[t]=Xn(n,Ot(t));return e}function Qr(n,t,r){return n&&n.length?(n=Hr(n),null==t?n:(t=Dt(t,r,4),Xn(n,function(n){return Qn(n,t,w,true)}))):[]}function ne(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Wo(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1]);
|
||||
}return u}function te(n){return n=Nn(n),n.__chain__=true,n}function re(n,t,r){return t.call(r,n)}function ee(n,t,r){var e=Wo(n)?Vn:lt;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ue(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,t)}function oe(n,t,r,e){var u=n?Vu(n):0;return Lr(u)||(n=Se(n),u=n.length),r=typeof r!="number"||e&&$r(t,r,e)?0:0>r?ju(u+r,0):r||0,typeof n=="string"||!Wo(n)&&Ae(n)?r<=u&&-1<n.indexOf(t,r):!!u&&-1<jr(n,t,r)}function ie(n,t,r){var e=Wo(n)?Xn:bt;
|
||||
return t=br(t,r,3),e(n,t)}function fe(n,t,r){if(r?$r(n,t,r):null==t){n=Br(n);var e=n.length;return 0<e?n[Et(0,e-1)]:w}r=-1,n=Oe(n);var e=n.length,u=e-1;for(t=ku(0>t?0:+t||0,e);++r<t;){var e=Et(r,u),o=n[e];n[e]=n[r],n[r]=o}return n.length=t,n}function ae(n,t,r){var e=Wo(n)?nt:Ut;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ce(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),
|
||||
1>=n&&(t=w),r}}function le(n,t,r){function e(t,r){r&&cu(r),a=p=h=w,t&&(_=wo(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(wo()-l);0>=n||n>t?e(h,a):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=wo(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=cu(a)),_=l,c=n.apply(s,f)):a||(a=_u(o,e))}return i&&p?p=cu(p):p||t===v||(p=_u(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Xe(T);
|
||||
if(t=0>t?0:+t||0,true===r)var y=true,g=false;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&cu(p),a&&cu(a),_=0,a=p=h=w},i}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new Xe(T);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function pe(n,t){if(typeof n!="function")throw new Xe(T);return t=ju(t===w?n.length-1:+t||0,0),
|
||||
function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=De(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function he(n,t){return n>t}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r=typeof r=="function"?Dt(r,e,3):w)?r(n,t):w,e===w?wt(n,t,r):!!e}function ge(n){return h(n)&&typeof n.message=="string"&&ou.call(n)==q;
|
||||
}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function me(n){return null==n?false:ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n)}function we(n){return typeof n=="number"||h(n)&&ou.call(n)==V}function xe(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),false}),false!==r):(vt(n,function(n,t){
|
||||
r=t}),r===w||eu.call(n,r))}function be(n){return de(n)&&ou.call(n)==Y}function Ae(n){return typeof n=="string"||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return n<t}function Oe(n){var t=n?Vu(n):0;return Lr(t)?t?Nn.support.unindexedChars&&Ae(n)?n.split(""):qn(n):[]:Se(n)}function Ie(n){return ot(n,Ee(n))}function Re(n){return dt(n,Ee(n))}function Ee(n){if(null==n)return[];de(n)||(n=Ye(n));for(var t=n.length,r=Nn.support,t=t&&Lr(t)&&(Wo(n)||_e(n)||Ae(n))&&t||0,e=n.constructor,u=-1,e=ye(e)&&e.prototype||nu,o=e===n,i=De(t),f=0<t,a=r.enumErrorProps&&(n===Qe||n instanceof qe),c=r.enumPrototypes&&ye(n);++u<t;)i[u]=u+"";
|
||||
for(var l in n)c&&"prototype"==l||a&&("message"==l||"name"==l)||f&&Ur(l,t)||"constructor"==l&&(o||!eu.call(n,l))||i.push(l);if(r.nonEnumShadows&&n!==nu)for(t=n===tu?G:n===Qe?q:ou.call(n),r=Nu[t]||Nu[Z],t==Z&&(e=nu),t=Wn.length;t--;)l=Wn[t],u=r[l],o&&u||(u?!eu.call(n,l):n[l]===e[l])||i.push(l);return i}function Ce(n){n=Dr(n);for(var t=-1,r=Ko(n),e=r.length,u=De(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u}function Se(n){return Nt(n,Ko(n))}function Ue(n){return(n=u(n))&&n.replace(En,a).replace(bn,"");
|
||||
}function $e(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!bu(t))return r;do t%2&&(r+=n),t=wu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=w),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=w),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,true))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):w;((u=u&&u.length?dt(t,u):w)?u.length:e)||(u=false,
|
||||
r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=true,e=-1,i=ye(n),f=u.length;false===r?o=false:de(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var a=t[r];n[r]=a,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return t.apply(n,Hn([this.value()],arguments))}}(a))}return n}function ze(){}function Be(n){return Wr(n)?Ot(n):It(n)}_=_?Jn.defaults(Yn.Object(),_,Jn.pick(Yn,$n)):Yn;
|
||||
var De=_.Array,Me=_.Date,qe=_.Error,Ke=_.Function,Ve=_.Math,Ze=_.Number,Ye=_.Object,Ge=_.RegExp,Je=_.String,Xe=_.TypeError,He=De.prototype,Qe=qe.prototype,nu=Ye.prototype,tu=Je.prototype,ru=Ke.prototype.toString,eu=nu.hasOwnProperty,uu=0,ou=nu.toString,iu=Yn._,fu=Ge("^"+ru.call(eu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),au=_.ArrayBuffer,cu=_.clearTimeout,lu=_.parseFloat,su=Ve.pow,pu=nu.propertyIsEnumerable,hu=Or(_,"Set"),_u=_.setTimeout,vu=He.splice,gu=_.Uint8Array,yu=Or(_,"WeakMap"),du=Ve.ceil,mu=Or(Ye,"create"),wu=Ve.floor,xu=Or(De,"isArray"),bu=_.isFinite,Au=Or(Ye,"keys"),ju=Ve.max,ku=Ve.min,Ou=Or(Me,"now"),Iu=_.parseInt,Ru=Ve.random,Eu=Ze.NEGATIVE_INFINITY,Cu=Ze.POSITIVE_INFINITY,Su=4294967294,Uu=2147483647,$u=9007199254740991,Wu=yu&&new yu,Fu={},Lu={};
|
||||
Lu[X]=_.Float32Array,Lu[H]=_.Float64Array,Lu[Q]=_.Int8Array,Lu[nn]=_.Int16Array,Lu[tn]=_.Int32Array,Lu[rn]=gu,Lu[en]=_.Uint8ClampedArray,Lu[un]=_.Uint16Array,Lu[on]=_.Uint32Array;var Nu={};Nu[B]=Nu[M]=Nu[V]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Nu[D]=Nu[G]={constructor:true,toString:true,valueOf:true},Nu[q]=Nu[K]=Nu[Y]={constructor:true,toString:true},Nu[Z]={constructor:true},Kn(Wn,function(n){for(var t in Nu)if(eu.call(Nu,t)){var r=Nu[t];r[n]=eu.call(r,n)}});var Tu=Nn.support={};!function(n){
|
||||
var t=function(){this.x=n},r={0:n,length:n},e=[];t.prototype={valueOf:n,y:n};for(var u in new t)e.push(u);Tu.enumErrorProps=pu.call(Qe,"message")||pu.call(Qe,"name"),Tu.enumPrototypes=pu.call(t,"prototype"),Tu.nonEnumShadows=!/valueOf/.test(e),Tu.ownLast="x"!=e[0],Tu.spliceObjects=(vu.call(r,0,1),!r[0]),Tu.unindexedChars="xx"!="x"[0]+Ye("x")[0]}(1,0),Nn.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:Nn}};var Pu=function(){function n(){}return function(t){if(de(t)){n.prototype=t;
|
||||
var r=new n;n.prototype=w}return r||{}}}(),zu=Yt(gt),Bu=Yt(yt,true),Du=Gt(),Mu=Gt(true),qu=Wu?function(n,t){return Wu.set(n,t),n}:Ne,Ku=Wu?function(n){return Wu.get(n)}:ze,Vu=Ot("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=wo(),o=W-(u-t);if(t=u,0<o){if(++n>=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?ct(n,_t(t,false,true)):[]}),Gu=er(),Ju=er(true),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o===r,f=[];e--;){var a=n[e]=Sr(a=n[e])?a:[];u[e]=i&&120<=a.length&&mu&&hu?new Dn(e&&a):null;
|
||||
}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c<l;)if(a=i[c],0>(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(true),to=pe(function(n){return Lt(_t(n,false,true))}),ro=pe(function(n,t){return Sr(n)?ct(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2<t?n[t-2]:w,e=1<t?n[t-1]:w;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,
|
||||
e):w,e=w),n.length=t,Qr(n,r,e)}),oo=pe(function(n){return n=_t(n),this.thru(function(t){t=Wo(t)?t:[Dr(t)];for(var r=n,e=-1,u=t.length,o=-1,i=r.length,f=De(u+i);++e<u;)f[e]=t[e];for(;++o<i;)f[e++]=r[o];return f})}),io=pe(function(n,t){return Sr(n)&&(n=Br(n)),ut(n,_t(t))}),fo=Vt(function(n,t,r){eu.call(n,r)?++n[r]:n[r]=1}),ao=rr(zu),co=rr(Bu,true),lo=ir(Kn,zu),so=ir(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Bu),po=Vt(function(n,t,r){eu.call(n,r)?n[r].push(t):n[r]=[t]}),ho=Vt(function(n,t,r){
|
||||
n[r]=t}),_o=pe(function(n,t,r){var e=-1,u=typeof t=="function",o=Wr(t),i=Sr(n)?De(n.length):[];return zu(n,function(n){var f=u?t:o&&null!=n?n[t]:w;i[++e]=f?f.apply(n,r):Cr(n,t,r)}),i}),vo=Vt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),go=pr(Qn,zu),yo=pr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Bu),mo=pe(function(n,t){if(null==n)return[];var r=t[2];return r&&$r(t[0],t[1],r)&&(t.length=1),Wt(n,_t(t),[])}),wo=Ou||function(){return(new Me).getTime();
|
||||
},xo=pe(function(n,t,r){var e=b;if(r.length)var u=v(r,xo.placeholder),e=e|I;return dr(n,e,t,r,u)}),bo=pe(function(n,t){t=t.length?_t(t):Re(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=dr(n[u],b,n)}return n}),Ao=pe(function(n,t,r){var e=b|A;if(r.length)var u=v(r,Ao.placeholder),e=e|I;return dr(t,e,n,r,u)}),jo=Qt(k),ko=Qt(O),Oo=pe(function(n,t){return at(n,1,t)}),Io=pe(function(n,t,r){return at(n,t,r)}),Ro=or(),Eo=or(true),Co=pe(function(n,t){if(t=_t(t),typeof n!="function"||!Vn(t,e))throw new Xe(T);
|
||||
var r=t.length;return pe(function(e){for(var u=ku(e.length,r);u--;)e[u]=t[u](e[u]);return n.apply(this,e)})}),So=sr(I),Uo=sr(R),$o=pe(function(n,t){return dr(n,C,w,w,w,_t(t))}),Wo=xu||function(n){return h(n)&&Lr(n.length)&&ou.call(n)==B},Fo=Zt(kt),Lo=Zt(function(n,t,r){return r?rt(n,t,r):et(n,t)}),No=nr(Lo,function(n,t){return n===w?t:n}),To=nr(Fo,Nr),Po=ur(gt),zo=ur(yt),Bo=fr(Du),Do=fr(Mu),Mo=ar(gt),qo=ar(yt),Ko=Au?function(n){var t=null==n?w:n.constructor;return typeof t=="function"&&t.prototype===n||(typeof n=="function"?Nn.support.enumPrototypes:Sr(n))?zr(n):de(n)?Au(n):[];
|
||||
}:zr,Vo=cr(true),Zo=cr(),Yo=pe(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Xn(_t(t),Je),Tr(n,ct(Ee(n),t));var r=Dt(t[0],t[1],3);return Pr(n,function(n,t,e){return!r(n,t,e)})}),Go=pe(function(n,t){return null==n?{}:"function"==typeof t[0]?Pr(n,Dt(t[0],t[1],3)):Tr(n,_t(t))}),Jo=Xt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Xo=Xt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Ho=lr(),Qo=lr(true),ni=Xt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
|
||||
}),ti=Xt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),ri=pe(function(n,t){try{return n.apply(w,t)}catch(r){return ge(r)?r:new qe(r)}}),ei=pe(function(n,t){return function(r){return Cr(r,n,t)}}),ui=pe(function(n,t){return function(r){return Cr(n,r,t)}}),oi=gr("ceil"),ii=gr("floor"),fi=tr(he,Eu),ai=tr(ke,Cu),ci=gr("round");return Nn.prototype=Tn.prototype,Pn.prototype=Pu(Tn.prototype),Pn.prototype.constructor=Pn,zn.prototype=Pu(Tn.prototype),zn.prototype.constructor=zn,
|
||||
Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Bn.prototype.get=function(n){return"__proto__"==n?w:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&eu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;typeof n=="string"||de(n)?t.set.add(n):t.hash[n]=true},se.Cache=Bn,Nn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);
|
||||
var r=n;n=t,t=r}return n=bu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=w),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,w,w,w,w,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ce,Nn.bind=xo,Nn.bindAll=bo,Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(wu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));r<e;)o[++u]=St(n,r,r+=t);return o},Nn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){
|
||||
var o=n[t];o&&(u[++e]=o)}return u},Nn.constant=function(n){return function(){return n}},Nn.countBy=fo,Nn.create=function(n,t,r){var e=Pu(n);return r&&$r(n,t,r)&&(t=w),t?et(e,t):e},Nn.curry=jo,Nn.curryRight=ko,Nn.debounce=le,Nn.defaults=No,Nn.defaultsDeep=To,Nn.defer=Oo,Nn.delay=Io,Nn.difference=Yu,Nn.drop=Kr,Nn.dropRight=Vr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true,true):[]},Nn.dropWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true):[]},Nn.fill=function(n,t,r,e){
|
||||
var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&$r(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=ue,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&$r(n,t,r)&&(t=false),e?_t(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?_t(n,true):[]},Nn.flow=Ro,Nn.flowRight=Eo,Nn.forEach=lo,Nn.forEachRight=so,Nn.forIn=Bo,Nn.forInRight=Do,Nn.forOwn=Mo,Nn.forOwnRight=qo,Nn.functions=Re,
|
||||
Nn.groupBy=po,Nn.indexBy=ho,Nn.initial=function(n){return Vr(n,1)},Nn.intersection=Xu,Nn.invert=function(n,t,r){r&&$r(n,t,r)&&(t=w),r=-1;for(var e=Ko(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?eu.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},Nn.invoke=_o,Nn.keys=Ko,Nn.keysIn=Ee,Nn.map=ie,Nn.mapKeys=Vo,Nn.mapValues=Zo,Nn.matches=Te,Nn.matchesProperty=function(n,t){return jt(n,ft(t,true))},Nn.memoize=se,Nn.merge=Fo,Nn.method=ei,Nn.methodOf=ui,Nn.mixin=Pe,Nn.modArgs=Co,Nn.negate=function(n){if(typeof n!="function")throw new Xe(T);
|
||||
return function(){return!n.apply(this,arguments)}},Nn.omit=Yo,Nn.once=function(n){return ce(2,n)},Nn.pairs=Ce,Nn.partial=So,Nn.partialRight=Uo,Nn.partition=vo,Nn.pick=Go,Nn.pluck=function(n,t){return ie(n,Be(t))},Nn.property=Be,Nn.propertyOf=function(n){return function(t){return mt(n,Mr(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=jr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)vu.call(t,o,1);return t},Nn.pullAt=Hu,Nn.range=function(n,t,r){
|
||||
r&&$r(n,t,r)&&(t=r=w),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(du((t-n)/(r||1)),0);for(var u=De(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=$o,Nn.reject=function(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=br(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return Rt(n,o),e},Nn.rest=Jr,Nn.restParam=pe,Nn.set=function(n,t,r){if(null==n)return n;
|
||||
var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Mr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];de(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Ur(t[e+1])?[]:{})),i=i[f]}return n},Nn.shuffle=function(n){return fe(n,Cu)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&$r(n,t,r)&&(t=0,r=e),St(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&$r(n,t,r)&&(t=w);var e=-1;return t=br(t,r,3),n=bt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),$t(n,f)},Nn.sortByAll=mo,
|
||||
Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&$r(t,r,e)&&(r=w),Wo(t)||(t=null==t?[]:[t]),Wo(r)||(r=null==r?[]:[r]),Wt(n,t,r))},Nn.spread=function(n){if(typeof n!="function")throw new Xe(T);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),false,true):[];
|
||||
},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xe(T);return false===r?e=false:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=wu(n),1>n||!bu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Nn.toArray=Oe,
|
||||
Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=br(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:w)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){
|
||||
var r=arguments[n];if(Sr(r))var e=e?Hn(ct(e,r),ct(r,e)):r}return e?Lt(e):[]},Nn.zip=eo,Nn.zipObject=ne,Nn.zipWith=uo,Nn.backflow=Eo,Nn.collect=ie,Nn.compose=Eo,Nn.each=lo,Nn.eachRight=so,Nn.extend=Lo,Nn.iteratee=Le,Nn.methods=Re,Nn.object=ne,Nn.select=ue,Nn.tail=Jr,Nn.unique=Xr,Pe(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=ri,Nn.camelCase=Jo,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.ceil=oi,Nn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&$r(n,t,r)?t=false:typeof t=="function"&&(e=r,
|
||||
r=t,t=false),typeof r=="function"?ft(n,t,Dt(r,e,3)):ft(n,t)},Nn.cloneDeep=function(n,t,r){return typeof t=="function"?ft(n,true,Dt(t,r,3)):ft(n,true)},Nn.deburr=Ue,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===w?e:ku(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&xn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=ee,Nn.find=ao,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=co,
|
||||
Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return ao(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?w:mt(n,Mr(t),t+""),n===w?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),null==n)return false;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){
|
||||
return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=ku(t,r)&&n<ju(t,r)},Nn.isArguments=_e,Nn.isArray=Wo,Nn.isBoolean=function(n){return true===n||false===n||h(n)&&ou.call(n)==D},Nn.isDate=function(n){return h(n)&&ou.call(n)==M},Nn.isElement=function(n){return!!n&&1===n.nodeType&&h(n)&&!xe(n)},Nn.isEmpty=function(n){return null==n?true:Sr(n)&&(Wo(n)||Ae(n)||_e(n)||h(n)&&ye(n.splice))?!n.length:!Ko(n).length},Nn.isEqual=ve,Nn.isError=ge,Nn.isFinite=function(n){return typeof n=="number"&&bu(n)},Nn.isFunction=ye,Nn.isMatch=function(n,t,r,e){
|
||||
return r=typeof r=="function"?Dt(r,e,3):w,xt(n,kr(t),r)},Nn.isNaN=function(n){return we(n)&&n!=+n},Nn.isNative=me,Nn.isNull=function(n){return null===n},Nn.isNumber=we,Nn.isObject=de,Nn.isPlainObject=xe,Nn.isRegExp=be,Nn.isString=Ae,Nn.isTypedArray=je,Nn.isUndefined=function(n){return n===w},Nn.kebabCase=Xo,Nn.last=Gr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;
|
||||
if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ai,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=wo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&bu(t)?(e=(t-e)/2,t=wu(e),e=du(e),r=_r("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Ho,Nn.padRight=Qo,Nn.parseInt=function(n,t,r){return(r?$r(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Iu(n,t||(On.test(n)?16:10))},Nn.random=function(n,t,r){r&&$r(n,t,r)&&(t=r=w);
|
||||
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Ru(),ku(n+r*(t-n+lu("1e-"+((r+"").length-1))),t)):Et(n,t)},Nn.reduce=go,Nn.reduceRight=yo,Nn.repeat=$e,Nn.result=function(n,t,r){var e=null==n?w:Dr(n)[t];return e===w&&(null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),e=null==n?w:Dr(n)[Gr(t)]),e=e===w?r:e),ye(e)?e.call(n):e},Nn.round=ci,Nn.runInContext=m,Nn.size=function(n){
|
||||
var t=n?Vu(n):0;return Lr(t)?t:Ko(n).length},Nn.snakeCase=ni,Nn.some=ae,Nn.sortedIndex=Qu,Nn.sortedLastIndex=no,Nn.startCase=ti,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:ku(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=w),t=br(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=w),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt);
|
||||
var o,i,f=Ko(r),a=Nt(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Sn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),
|
||||
l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(w,a)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n;
|
||||
},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=w);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(be(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),
|
||||
-1<o&&(t=t.slice(0,o)));return t+r},Nn.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},Nn.uniqueId=function(n){var t=++uu;return u(n)+t},Nn.words=Fe,Nn.all=ee,Nn.any=ae,Nn.contains=oe,Nn.eq=ve,Nn.detect=ao,Nn.foldl=go,Nn.foldr=yo,Nn.head=Zr,Nn.include=oe,Nn.inject=go,Pe(Nn,function(){var n={};return gt(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),false),Nn.sample=fe,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return fe(t,n)}):fe(this.value());
|
||||
},Nn.VERSION=x,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Kn(["drop","take"],function(n,t){zn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new zn(this);r=null==r?1:ju(wu(r)||0,0);var u=this.clone();return e?u.__takeCount__=ku(u.__takeCount__,r):u.__views__.push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){
|
||||
var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:br(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){
|
||||
return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=br(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0<n||0>t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu);
|
||||
},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){var t=e?[1]:arguments,o=this.__chain__,i=this.__wrapped__,f=!!this.__actions__.length,a=i instanceof zn,c=t[0],l=a||Wo(i);l&&r&&typeof c=="function"&&1!=c.length&&(a=l=false);var s=function(n){return e&&o?u(n,1)[0]:u.apply(w,Hn([n],t))},c={func:re,args:[s],thisArg:w},f=a&&!f;return e&&!o?f?(i=i.clone(),i.__actions__.push(c),
|
||||
n.call(i)):u.call(w,this.value())[0]:!e&&l?(i=f?i:new zn(this),i=n.apply(i,t),i.__actions__.push(c),new Pn(i,o)):this.thru(s)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=!Tu.spliceObjects&&/^(?:pop|shift|splice)$/.test(n),u=/^(?:join|pop|replace|shift)$/.test(n),o=e?function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n}:t;Nn.prototype[n]=function(){
|
||||
var n=arguments;return u&&!this.__chain__?o.apply(this.value(),n):this[r](function(t){return o.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),
|
||||
n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,a=-1,c=f.length;++a<c;){var l=f[a],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":i-=s;break;case"take":i=ku(i,n+s);break;case"takeRight":n=ju(n,i-s)}}if(n={start:n,end:i},i=n.start,f=n.end,n=f-i,
|
||||
u=u?f:i-1,i=this.__iteratees__,f=i.length,a=0,c=ku(n,this.__takeCount__),!e||o<F||o==n&&c==n)return Pt(t,this.__actions__);e=[];n:for(;n--&&a<c;){for(u+=r,o=-1,l=t[u];++o<f;){var p=i[o],s=p.type,p=p.iteratee(l);if(s==N)l=p;else if(!p){if(s==L)continue n;break n}}e[a++]=l}return e},Nn.prototype.chain=function(){return te(this)},Nn.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},Nn.prototype.concat=oo,Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Tn;){var e=qr(r);
|
||||
t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){var n=this.__wrapped__,t=function(n){return n.reverse()};return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),n=n.reverse(),n.__actions__.push({func:re,args:[t],thisArg:w}),new Pn(n,this.__chain__)):this.thru(t)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Pt(this.__wrapped__,this.__actions__);
|
||||
},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest,Nn}var w,x="3.10.1",b=1,A=2,j=4,k=8,O=16,I=32,R=64,E=128,C=256,S=30,U="...",$=150,W=16,F=200,L=1,N=2,T="Expected a function",P="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,xn=RegExp(wn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={};
|
||||
Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=false;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=true,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a",
|
||||
"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y",
|
||||
"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Pn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\",
|
||||
"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return false}}return function(n){
|
||||
return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Jn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Jn, define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this);
|
1272
pkg/node/api/dist/lib/marked.js
vendored
23
pkg/node/api/dist/lib/object-assign-pollyfill.js
vendored
@ -1,23 +0,0 @@
|
||||
if (typeof Object.assign != 'function') {
|
||||
(function () {
|
||||
Object.assign = function (target) {
|
||||
'use strict';
|
||||
if (target === undefined || target === null) {
|
||||
throw new TypeError('Cannot convert undefined or null to object');
|
||||
}
|
||||
|
||||
var output = Object(target);
|
||||
for (var index = 1; index < arguments.length; index++) {
|
||||
var source = arguments[index];
|
||||
if (source !== undefined && source !== null) {
|
||||
for (var nextKey in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, nextKey)) {
|
||||
output[nextKey] = source[nextKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
})();
|
||||
}
|
347
pkg/node/api/dist/lib/swagger-oauth.js
vendored
@ -1,347 +0,0 @@
|
||||
var appName;
|
||||
var popupMask;
|
||||
var popupDialog;
|
||||
var clientId;
|
||||
var realm;
|
||||
var redirect_uri;
|
||||
var clientSecret;
|
||||
var scopeSeparator;
|
||||
var additionalQueryStringParams;
|
||||
|
||||
function handleLogin() {
|
||||
var scopes = [];
|
||||
|
||||
var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
|
||||
if(auths) {
|
||||
var key;
|
||||
var defs = auths;
|
||||
for(key in defs) {
|
||||
var auth = defs[key];
|
||||
if(auth.type === 'oauth2' && auth.scopes) {
|
||||
var scope;
|
||||
if(Array.isArray(auth.scopes)) {
|
||||
// 1.2 support
|
||||
var i;
|
||||
for(i = 0; i < auth.scopes.length; i++) {
|
||||
scopes.push(auth.scopes[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// 2.0 support
|
||||
for(scope in auth.scopes) {
|
||||
scopes.push({scope: scope, description: auth.scopes[scope], OAuthSchemeKey: key});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(window.swaggerUi.api
|
||||
&& window.swaggerUi.api.info) {
|
||||
appName = window.swaggerUi.api.info.title;
|
||||
}
|
||||
|
||||
$('.api-popup-dialog').remove();
|
||||
popupDialog = $(
|
||||
[
|
||||
'<div class="api-popup-dialog">',
|
||||
'<div class="api-popup-title">Select OAuth2.0 Scopes</div>',
|
||||
'<div class="api-popup-content">',
|
||||
'<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.',
|
||||
'<a href="#">Learn how to use</a>',
|
||||
'</p>',
|
||||
'<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>',
|
||||
'<ul class="api-popup-scopes">',
|
||||
'</ul>',
|
||||
'<p class="error-msg"></p>',
|
||||
'<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>',
|
||||
'</div>',
|
||||
'</div>'].join(''));
|
||||
$(document.body).append(popupDialog);
|
||||
|
||||
//TODO: only display applicable scopes (will need to pass them into handleLogin)
|
||||
popup = popupDialog.find('ul.api-popup-scopes').empty();
|
||||
for (i = 0; i < scopes.length; i ++) {
|
||||
scope = scopes[i];
|
||||
str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"' +'" oauthtype="' + scope.OAuthSchemeKey +'"/>' + '<label for="scope_' + i + '">' + scope.scope ;
|
||||
if (scope.description) {
|
||||
if ($.map(auths, function(n, i) { return i; }).length > 1) //if we have more than one scheme, display schemes
|
||||
str += '<br/><span class="api-scope-desc">' + scope.description + ' ('+ scope.OAuthSchemeKey+')' +'</span>';
|
||||
else
|
||||
str += '<br/><span class="api-scope-desc">' + scope.description + '</span>';
|
||||
}
|
||||
str += '</label></li>';
|
||||
popup.append(str);
|
||||
}
|
||||
|
||||
var $win = $(window),
|
||||
dw = $win.width(),
|
||||
dh = $win.height(),
|
||||
st = $win.scrollTop(),
|
||||
dlgWd = popupDialog.outerWidth(),
|
||||
dlgHt = popupDialog.outerHeight(),
|
||||
top = (dh -dlgHt)/2 + st,
|
||||
left = (dw - dlgWd)/2;
|
||||
|
||||
popupDialog.css({
|
||||
top: (top < 0? 0 : top) + 'px',
|
||||
left: (left < 0? 0 : left) + 'px'
|
||||
});
|
||||
|
||||
popupDialog.find('button.api-popup-cancel').click(function() {
|
||||
popupMask.hide();
|
||||
popupDialog.hide();
|
||||
popupDialog.empty();
|
||||
popupDialog = [];
|
||||
});
|
||||
|
||||
$('button.api-popup-authbtn').unbind();
|
||||
popupDialog.find('button.api-popup-authbtn').click(function() {
|
||||
popupMask.hide();
|
||||
popupDialog.hide();
|
||||
|
||||
var authSchemes = window.swaggerUi.api.authSchemes;
|
||||
var host = window.location;
|
||||
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
||||
var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
||||
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
|
||||
var url = null;
|
||||
var scopes = []
|
||||
var o = popup.find('input:checked');
|
||||
var OAuthSchemeKeys = [];
|
||||
var state;
|
||||
for(k =0; k < o.length; k++) {
|
||||
var scope = $(o[k]).attr('scope');
|
||||
if (scopes.indexOf(scope) === -1)
|
||||
scopes.push(scope);
|
||||
var OAuthSchemeKey = $(o[k]).attr('oauthtype');
|
||||
if (OAuthSchemeKeys.indexOf(OAuthSchemeKey) === -1)
|
||||
OAuthSchemeKeys.push(OAuthSchemeKey);
|
||||
}
|
||||
|
||||
//TODO: merge not replace if scheme is different from any existing
|
||||
//(needs to be aware of schemes to do so correctly)
|
||||
window.enabledScopes=scopes;
|
||||
|
||||
for (var key in authSchemes) {
|
||||
if (authSchemes.hasOwnProperty(key) && OAuthSchemeKeys.indexOf(key) != -1) { //only look at keys that match this scope.
|
||||
var flow = authSchemes[key].flow;
|
||||
|
||||
if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
|
||||
var dets = authSchemes[key];
|
||||
url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
|
||||
window.swaggerUi.tokenName = dets.tokenName || 'access_token';
|
||||
window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
|
||||
state = key;
|
||||
}
|
||||
else if(authSchemes[key].type === 'oauth2' && flow && (flow === 'application')) {
|
||||
var dets = authSchemes[key];
|
||||
window.swaggerUi.tokenName = dets.tokenName || 'access_token';
|
||||
clientCredentialsFlow(scopes, dets.tokenUrl, key);
|
||||
return;
|
||||
}
|
||||
else if(authSchemes[key].grantTypes) {
|
||||
// 1.2 support
|
||||
var o = authSchemes[key].grantTypes;
|
||||
for(var t in o) {
|
||||
if(o.hasOwnProperty(t) && t === 'implicit') {
|
||||
var dets = o[t];
|
||||
var ep = dets.loginEndpoint.url;
|
||||
url = dets.loginEndpoint.url + '?response_type=token';
|
||||
window.swaggerUi.tokenName = dets.tokenName;
|
||||
}
|
||||
else if (o.hasOwnProperty(t) && t === 'accessCode') {
|
||||
var dets = o[t];
|
||||
var ep = dets.tokenRequestEndpoint.url;
|
||||
url = dets.tokenRequestEndpoint.url + '?response_type=code';
|
||||
window.swaggerUi.tokenName = dets.tokenName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
redirect_uri = redirectUrl;
|
||||
|
||||
url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
|
||||
url += '&realm=' + encodeURIComponent(realm);
|
||||
url += '&client_id=' + encodeURIComponent(clientId);
|
||||
url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator));
|
||||
url += '&state=' + encodeURIComponent(state);
|
||||
for (var key in additionalQueryStringParams) {
|
||||
url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]);
|
||||
}
|
||||
|
||||
window.open(url);
|
||||
});
|
||||
|
||||
popupMask.show();
|
||||
popupDialog.show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
function handleLogout() {
|
||||
for(key in window.swaggerUi.api.clientAuthorizations.authz){
|
||||
window.swaggerUi.api.clientAuthorizations.remove(key)
|
||||
}
|
||||
window.enabledScopes = null;
|
||||
$('.api-ic.ic-on').addClass('ic-off');
|
||||
$('.api-ic.ic-on').removeClass('ic-on');
|
||||
|
||||
// set the info box
|
||||
$('.api-ic.ic-warning').addClass('ic-error');
|
||||
$('.api-ic.ic-warning').removeClass('ic-warning');
|
||||
}
|
||||
|
||||
function initOAuth(opts) {
|
||||
var o = (opts||{});
|
||||
var errors = [];
|
||||
|
||||
appName = (o.appName||errors.push('missing appName'));
|
||||
popupMask = (o.popupMask||$('#api-common-mask'));
|
||||
popupDialog = (o.popupDialog||$('.api-popup-dialog'));
|
||||
clientId = (o.clientId||errors.push('missing client id'));
|
||||
clientSecret = (o.clientSecret||null);
|
||||
realm = (o.realm||errors.push('missing realm'));
|
||||
scopeSeparator = (o.scopeSeparator||' ');
|
||||
additionalQueryStringParams = (o.additionalQueryStringParams||{});
|
||||
|
||||
if(errors.length > 0){
|
||||
log('auth unable initialize oauth: ' + errors);
|
||||
return;
|
||||
}
|
||||
|
||||
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
||||
$('.api-ic').unbind();
|
||||
$('.api-ic').click(function(s) {
|
||||
if($(s.target).hasClass('ic-off'))
|
||||
handleLogin();
|
||||
else {
|
||||
handleLogout();
|
||||
}
|
||||
false;
|
||||
});
|
||||
}
|
||||
|
||||
function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) {
|
||||
var params = {
|
||||
'client_id': clientId,
|
||||
'client_secret': clientSecret,
|
||||
'scope': scopes.join(' '),
|
||||
'grant_type': 'client_credentials'
|
||||
}
|
||||
$.ajax(
|
||||
{
|
||||
url : tokenUrl,
|
||||
type: "POST",
|
||||
data: params,
|
||||
success:function(data, textStatus, jqXHR)
|
||||
{
|
||||
onOAuthComplete(data,OAuthSchemeKey);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
onOAuthComplete("");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.processOAuthCode = function processOAuthCode(data) {
|
||||
var OAuthSchemeKey = data.state;
|
||||
|
||||
// redirect_uri is required in auth code flow
|
||||
// see https://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1.3
|
||||
var host = window.location;
|
||||
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
||||
var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
||||
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
|
||||
|
||||
var params = {
|
||||
'client_id': clientId,
|
||||
'code': data.code,
|
||||
'grant_type': 'authorization_code',
|
||||
'redirect_uri': redirectUrl
|
||||
};
|
||||
|
||||
if (clientSecret) {
|
||||
params.client_secret = clientSecret;
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url : window.swaggerUi.tokenUrl,
|
||||
type: "POST",
|
||||
data: params,
|
||||
success:function(data, textStatus, jqXHR)
|
||||
{
|
||||
onOAuthComplete(data, OAuthSchemeKey);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
onOAuthComplete("");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
||||
if(token) {
|
||||
if(token.error) {
|
||||
var checkbox = $('input[type=checkbox],.secured')
|
||||
checkbox.each(function(pos){
|
||||
checkbox[pos].checked = false;
|
||||
});
|
||||
alert(token.error);
|
||||
}
|
||||
else {
|
||||
var b = token[window.swaggerUi.tokenName];
|
||||
if (!OAuthSchemeKey){
|
||||
OAuthSchemeKey = token.state;
|
||||
}
|
||||
if(b){
|
||||
// if all roles are satisfied
|
||||
var o = null;
|
||||
$.each($('.auth .api-ic .api_information_panel'), function(k, v) {
|
||||
var children = v;
|
||||
if(children && children.childNodes) {
|
||||
var requiredScopes = [];
|
||||
$.each((children.childNodes), function (k1, v1){
|
||||
var inner = v1.innerHTML;
|
||||
if(inner)
|
||||
requiredScopes.push(inner);
|
||||
});
|
||||
var diff = [];
|
||||
for(var i=0; i < requiredScopes.length; i++) {
|
||||
var s = requiredScopes[i];
|
||||
if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) {
|
||||
diff.push(s);
|
||||
}
|
||||
}
|
||||
if(diff.length > 0){
|
||||
o = v.parentNode.parentNode;
|
||||
$(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');
|
||||
$(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');
|
||||
|
||||
// sorry, not all scopes are satisfied
|
||||
$(o).find('.api-ic').addClass('ic-warning');
|
||||
$(o).find('.api-ic').removeClass('ic-error');
|
||||
}
|
||||
else {
|
||||
o = v.parentNode.parentNode;
|
||||
$(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');
|
||||
$(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');
|
||||
|
||||
// all scopes are satisfied
|
||||
$(o).find('.api-ic').addClass('ic-info');
|
||||
$(o).find('.api-ic').removeClass('ic-warning');
|
||||
$(o).find('.api-ic').removeClass('ic-error');
|
||||
}
|
||||
}
|
||||
});
|
||||
window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
|
||||
window.swaggerUi.load();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
20
pkg/node/api/dist/o2c.html
vendored
@ -1,20 +0,0 @@
|
||||
<script>
|
||||
var qp = null;
|
||||
if(window.location.hash) {
|
||||
qp = location.hash.substring(1);
|
||||
}
|
||||
else {
|
||||
qp = location.search.substring(1);
|
||||
}
|
||||
qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
|
||||
function(key, value) {
|
||||
return key===""?value:decodeURIComponent(value) }
|
||||
):{}
|
||||
|
||||
if (window.opener.swaggerUi.tokenUrl)
|
||||
window.opener.processOAuthCode(qp);
|
||||
else
|
||||
window.opener.onOAuthComplete(qp);
|
||||
|
||||
window.close();
|
||||
</script>
|
24723
pkg/node/api/dist/swagger-ui.js
vendored
10
pkg/node/api/dist/swagger-ui.min.js
vendored
@ -104,18 +104,31 @@ func (h *HostNode) UpdataK8sCondition(conditions []v1.NodeCondition) {
|
||||
|
||||
//UpdataCondition 更新状态
|
||||
func (h *HostNode) UpdataCondition(conditions ...NodeCondition) {
|
||||
var ready = ConditionTrue
|
||||
for _, newcon := range conditions {
|
||||
if newcon.Status != ConditionTrue {
|
||||
ready = ConditionFalse
|
||||
}
|
||||
var update bool
|
||||
for i, con := range h.Conditions {
|
||||
if con.Type.Compare(newcon.Type) {
|
||||
h.Conditions[i] = newcon
|
||||
update = true
|
||||
}
|
||||
if con.Type == NodeReady {
|
||||
con.Status = ready
|
||||
con.LastTransitionTime = time.Now()
|
||||
con.LastHeartbeatTime = time.Now()
|
||||
con.Reason = newcon.Reason
|
||||
con.Message = newcon.Message
|
||||
h.Conditions[i] = con
|
||||
}
|
||||
}
|
||||
if !update {
|
||||
h.Conditions = append(h.Conditions, newcon)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//HostRule 节点角色
|
||||
|
@ -53,10 +53,12 @@ func (t TaskTemp) String() string {
|
||||
|
||||
//Task 任务
|
||||
type Task struct {
|
||||
Name string `json:"name" validate:"name|required"`
|
||||
ID string `json:"id" validate:"id|uuid"`
|
||||
TempID string `json:"temp_id,omitempty" validate:"temp_id|uuid"`
|
||||
Temp *TaskTemp `json:"temp,omitempty"`
|
||||
Name string `json:"name" validate:"name|required"`
|
||||
ID string `json:"id" validate:"id|uuid"`
|
||||
JobID string `json:"job_id"`
|
||||
TempID string `json:"temp_id,omitempty" validate:"temp_id|uuid"`
|
||||
Temp *TaskTemp `json:"temp,omitempty"`
|
||||
GroupID string `json:"group_id,omitempty"`
|
||||
//执行的节点
|
||||
Nodes []string `json:"nodes"`
|
||||
//执行时间定义
|
||||
@ -71,6 +73,7 @@ type Task struct {
|
||||
Interval int `json:"interval"`
|
||||
//每个执行节点执行状态
|
||||
Status map[string]TaskStatus `json:"status,omitempty"`
|
||||
Scheduler Scheduler `json:"scheduler"`
|
||||
CreateTime time.Time `json:"create_time"`
|
||||
StartTime time.Time `json:"start_time"`
|
||||
CompleteTime time.Time `json:"complete_time"`
|
||||
@ -98,6 +101,13 @@ func (t Task) CanBeDelete() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
//Scheduler 调度状态
|
||||
type Scheduler struct {
|
||||
Mode string `json:"mode"` //立即调度(Intime),触发调度(Passive)
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
//TaskOutPut 任务输出
|
||||
type TaskOutPut struct {
|
||||
NodeID string `json:"node_id"`
|
||||
@ -116,9 +126,10 @@ func ParseTaskOutPut(body string) (t TaskOutPut, err error) {
|
||||
|
||||
//TaskOutPutStatus 输出数据
|
||||
type TaskOutPutStatus struct {
|
||||
Name string `json:"name"`
|
||||
ConditionType string `json:"condition_type"`
|
||||
ConditionStatus string `json:"condition_status"`
|
||||
Name string `json:"name"`
|
||||
ConditionType string `json:"condition_type"`
|
||||
ConditionStatus string `json:"condition_status"`
|
||||
NextTask []string `json:"next_tasks"`
|
||||
}
|
||||
|
||||
//TaskStatus 任务状态
|
||||
|
@ -39,7 +39,7 @@ func DisconverRoutes() chi.Router {
|
||||
func ListenersRoutes() chi.Router {
|
||||
r := chi.NewRouter()
|
||||
r.Get("/ping", controller.Ping)
|
||||
r.Get("/{tenant_name}/{service_nodes}", controller.ListenerDiscover)
|
||||
r.Get("/{tenant_id}/{service_nodes}", controller.ListenerDiscover)
|
||||
return r
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ func ListenersRoutes() chi.Router {
|
||||
func ClustersRoutes() chi.Router {
|
||||
r := chi.NewRouter()
|
||||
r.Get("/ping", controller.Ping)
|
||||
r.Get("/{tenant_name}/{service_nodes}", controller.ClusterDiscover)
|
||||
r.Get("/{tenant_id}/{service_nodes}", controller.ClusterDiscover)
|
||||
return r
|
||||
}
|
||||
|
||||
|
@ -62,11 +62,6 @@ func GetJobExecutionRecords(JobID string) ([]*ExecutionRecord, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
//WatchExecutionRecords watch ExecutionRecords
|
||||
func WatchExecutionRecords() {
|
||||
|
||||
}
|
||||
|
||||
//IsHandleRight 是否具有处理结果权限
|
||||
func (e ExecutionRecord) IsHandleRight() bool {
|
||||
if e.IsHandle {
|
||||
@ -125,8 +120,12 @@ func CreateExecutionRecord(j *Job, t time.Time, rs string, success bool) {
|
||||
}
|
||||
//单次执行job,更新job rule,将已执行节点加入到排除节点范围
|
||||
if j.IsOnce {
|
||||
for _, rule := range j.Rules {
|
||||
rule.ExcludeNodeIDs = append(rule.ExcludeNodeIDs, j.runOn)
|
||||
if j.Rules != nil {
|
||||
for _, rule := range j.Rules {
|
||||
rule.ExcludeNodeIDs = append(rule.ExcludeNodeIDs, j.runOn)
|
||||
}
|
||||
} else {
|
||||
j.Rules = append(j.Rules, &JobRule{ExcludeNodeIDs: []string{j.runOn}})
|
||||
}
|
||||
//更新job
|
||||
PutOnce(j)
|
||||
|
@ -46,22 +46,14 @@ func CreateDiscoverActionManager(conf *option.Conf) *DiscoverAction {
|
||||
//DiscoverService DiscoverService
|
||||
func (d *DiscoverAction) DiscoverService(serviceInfo string) (*node_model.SDS, *util.APIHandleError) {
|
||||
mm := strings.Split(serviceInfo, "_")
|
||||
if len(mm) != 4 {
|
||||
if len(mm) < 3 {
|
||||
return nil, util.CreateAPIHandleError(400, fmt.Errorf("service_name is not in good format"))
|
||||
}
|
||||
tenantName := mm[0]
|
||||
namespace := mm[0]
|
||||
serviceAlias := mm[1]
|
||||
dPort := mm[2]
|
||||
//deployVersion := mm[3]
|
||||
|
||||
namespace, err := d.ToolsGetTenantUUID(tenantName)
|
||||
if err != nil {
|
||||
return nil, util.CreateAPIHandleErrorFromDBError("get tenant uuid ", err)
|
||||
}
|
||||
// serviceID, err := d.ToolsGetServiceID(uuid, serviceAlias)
|
||||
// if err != nil {
|
||||
// return nil, util.CreateAPIHandleErrorFromDBError("get service id ", err)
|
||||
// }
|
||||
labelname := fmt.Sprintf("name=%sService", serviceAlias)
|
||||
endpoint, err := k8s.K8S.Core().Endpoints(namespace).List(metav1.ListOptions{LabelSelector: labelname})
|
||||
if err != nil {
|
||||
@ -100,15 +92,11 @@ func (d *DiscoverAction) DiscoverService(serviceInfo string) (*node_model.SDS, *
|
||||
}
|
||||
|
||||
//DiscoverListeners DiscoverListeners
|
||||
func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*node_model.LDS, *util.APIHandleError) {
|
||||
func (d *DiscoverAction) DiscoverListeners(namespace, serviceCluster string) (*node_model.LDS, *util.APIHandleError) {
|
||||
mm := strings.Split(serviceCluster, "_")
|
||||
if len(mm) == 0 {
|
||||
return nil, util.CreateAPIHandleError(400, fmt.Errorf("service_name is not in good format"))
|
||||
}
|
||||
namespace, err := d.ToolsGetTenantUUID(tenantName)
|
||||
if err != nil {
|
||||
return nil, util.CreateAPIHandleErrorFromDBError("get tenant uuid ", err)
|
||||
}
|
||||
var ldsL []*node_model.PieceLDS
|
||||
for _, serviceAlias := range mm {
|
||||
labelname := fmt.Sprintf("name=%sService", serviceAlias)
|
||||
@ -143,13 +131,13 @@ func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*
|
||||
switch port.Protocol {
|
||||
case "TCP":
|
||||
ptr := &node_model.PieceTCPRoute{
|
||||
Cluster: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Cluster: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
}
|
||||
lrs := &node_model.LDSTCPRoutes{
|
||||
Routes: []*node_model.PieceTCPRoute{ptr},
|
||||
}
|
||||
lcg := &node_model.LDSTCPConfig{
|
||||
StatPrefix: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
StatPrefix: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
RouteConfig: lrs,
|
||||
}
|
||||
lfs := &node_model.LDSFilters{
|
||||
@ -157,8 +145,8 @@ func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*
|
||||
Config: lcg,
|
||||
}
|
||||
plds := &node_model.PieceLDS{
|
||||
Name: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Address: fmt.Sprintf("tcp://0.0.0.0:%v", port.TargetPort),
|
||||
Name: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
Address: fmt.Sprintf("tcp://0.0.0.0:%v", port.Port),
|
||||
Filters: []*node_model.LDSFilters{lfs},
|
||||
}
|
||||
ldsL = append(ldsL, plds)
|
||||
@ -171,14 +159,14 @@ func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*
|
||||
prs := &node_model.PieceHTTPRoutes{
|
||||
TimeoutMS: 0,
|
||||
Prefix: "/",
|
||||
Cluster: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Cluster: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
}
|
||||
domain, ok := service.Labels["domain"]
|
||||
if !ok {
|
||||
domain = "*"
|
||||
}
|
||||
pvh := &node_model.PieceHTTPVirtualHost{
|
||||
Name: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Name: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
Domains: []string{domain},
|
||||
Routes: []*node_model.PieceHTTPRoutes{prs},
|
||||
}
|
||||
@ -196,7 +184,7 @@ func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*
|
||||
Config: lhc,
|
||||
}
|
||||
plds := &node_model.PieceLDS{
|
||||
Name: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Name: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
Address: fmt.Sprintf("tcp://0.0.0.0:%v", port.TargetPort),
|
||||
Filters: []*node_model.LDSFilters{lfs},
|
||||
}
|
||||
@ -213,15 +201,11 @@ func (d *DiscoverAction) DiscoverListeners(tenantName, serviceCluster string) (*
|
||||
}
|
||||
|
||||
//DiscoverClusters DiscoverClusters
|
||||
func (d *DiscoverAction) DiscoverClusters(tenantName, serviceCluster string) (*node_model.CDS, *util.APIHandleError) {
|
||||
func (d *DiscoverAction) DiscoverClusters(namespace, serviceCluster string) (*node_model.CDS, *util.APIHandleError) {
|
||||
mm := strings.Split(serviceCluster, "_")
|
||||
if len(mm) == 0 {
|
||||
return nil, util.CreateAPIHandleError(400, fmt.Errorf("service_name is not in good format"))
|
||||
}
|
||||
namespace, err := d.ToolsGetTenantUUID(tenantName)
|
||||
if err != nil {
|
||||
return nil, util.CreateAPIHandleErrorFromDBError("get tenant uuid ", err)
|
||||
}
|
||||
var cdsL []*node_model.PieceCDS
|
||||
for _, serviceAlias := range mm {
|
||||
labelname := fmt.Sprintf("name=%sService", serviceAlias)
|
||||
@ -232,11 +216,11 @@ func (d *DiscoverAction) DiscoverClusters(tenantName, serviceCluster string) (*n
|
||||
for _, service := range services.Items {
|
||||
for _, port := range service.Spec.Ports {
|
||||
pcds := &node_model.PieceCDS{
|
||||
Name: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
Name: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
Type: "sds",
|
||||
ConnectTimeoutMS: 250,
|
||||
LBType: "round_robin",
|
||||
ServiceName: fmt.Sprintf("%s_%s_%v", tenantName, serviceAlias, port.Port),
|
||||
ServiceName: fmt.Sprintf("%s_%s_%v", namespace, serviceAlias, port.Port),
|
||||
}
|
||||
cdsL = append(cdsL, pcds)
|
||||
continue
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/cmd/node/option"
|
||||
"github.com/goodrain/rainbond/pkg/node/api/model"
|
||||
"github.com/goodrain/rainbond/pkg/node/core/job"
|
||||
"github.com/goodrain/rainbond/pkg/node/core/store"
|
||||
"github.com/goodrain/rainbond/pkg/node/masterserver"
|
||||
"github.com/goodrain/rainbond/pkg/node/utils"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
@ -40,16 +40,18 @@ import (
|
||||
type TaskService struct {
|
||||
SavePath string
|
||||
conf *option.Conf
|
||||
ms *masterserver.MasterServer
|
||||
}
|
||||
|
||||
var taskService *TaskService
|
||||
|
||||
//CreateTaskService 创建Task service
|
||||
func CreateTaskService(c *option.Conf) *TaskService {
|
||||
func CreateTaskService(c *option.Conf, ms *masterserver.MasterServer) *TaskService {
|
||||
if taskService == nil {
|
||||
taskService = &TaskService{
|
||||
SavePath: "/store/tasks",
|
||||
conf: c,
|
||||
ms: ms,
|
||||
}
|
||||
}
|
||||
return taskService
|
||||
@ -168,13 +170,7 @@ func (ts *TaskService) ExecTask(taskID string) *utils.APIHandleError {
|
||||
// }
|
||||
return utils.CreateAPIHandleError(400, fmt.Errorf("Single task exec can not have depend task"))
|
||||
}
|
||||
j, er := job.CreateJobFromTask(t, nil)
|
||||
if er != nil {
|
||||
return utils.CreateAPIHandleError(500, err)
|
||||
}
|
||||
if err := job.AddJob(j); err != nil {
|
||||
return utils.CreateAPIHandleError(500, err)
|
||||
}
|
||||
ts.ms.TaskEngine.ScheduleTask(t.ID)
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -249,16 +245,18 @@ func (ts *TaskTempService) DeleteTaskTemp(tempID string) *utils.APIHandleError {
|
||||
type TaskGroupService struct {
|
||||
SavePath string
|
||||
conf *option.Conf
|
||||
ms *masterserver.MasterServer
|
||||
}
|
||||
|
||||
var taskGroupService *TaskGroupService
|
||||
|
||||
//CreateTaskGroupService 创建Task group service
|
||||
func CreateTaskGroupService(c *option.Conf) *TaskGroupService {
|
||||
func CreateTaskGroupService(c *option.Conf, ms *masterserver.MasterServer) *TaskGroupService {
|
||||
if taskGroupService == nil {
|
||||
taskGroupService = &TaskGroupService{
|
||||
SavePath: "/store/taskgroups",
|
||||
conf: c,
|
||||
ms: ms,
|
||||
}
|
||||
}
|
||||
return taskGroupService
|
||||
@ -352,8 +350,7 @@ func (ts *TaskGroupService) ExecTaskGroup(taskGroupID string) *utils.APIHandleEr
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, task := range t.Tasks {
|
||||
_ = task
|
||||
}
|
||||
//TODO:增加执行判断
|
||||
ts.ms.TaskEngine.ScheduleGroup(t.ID)
|
||||
return nil
|
||||
}
|
||||
|
@ -3,8 +3,9 @@
|
||||
* 主节点可以有多个工作点,原则上云帮管理节点的实例工作为主节点模型。
|
||||
* 主节点的工作任务基于ETCD实现唯一性。例如处理一个任务的执行记录只由一个Master实例完成。
|
||||
* Job的创建
|
||||
* 根据执行Task创建Job
|
||||
* Task开始调度执行时创建Job对象,基于ETCD通知到执行节点进行执行。
|
||||
* 处理Job执行结果
|
||||
* 安装类任务结果处理,串接组安装任务,全局配置等。
|
||||
* 检测类任务结果处理,根据策略触发下次任务的执行,或者用户报警。
|
||||
* 处理组任务执行。
|
||||
|
||||
|
@ -23,15 +23,10 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
"golang.org/x/crypto/ssh/agent"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
|
||||
@ -320,51 +315,15 @@ func (n *NodeCluster) RemoveNode(node *model.HostNode) {
|
||||
}
|
||||
}
|
||||
|
||||
//NewSSHClientByPublicKey 创建ssh客户端
|
||||
func NewSSHClientByPublicKey(hostport string, username string) (*ssh.Client, error) {
|
||||
sock, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK"))
|
||||
if err != nil {
|
||||
logrus.Errorf("error login,details: %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
agent := agent.NewClient(sock)
|
||||
signers, err := agent.Signers()
|
||||
if err != nil {
|
||||
logrus.Errorf("error login,details: %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
auths := []ssh.AuthMethod{ssh.PublicKeys(signers...)}
|
||||
cfg := &ssh.ClientConfig{
|
||||
User: username,
|
||||
Auth: auths,
|
||||
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
cfg.SetDefaults()
|
||||
client, err := ssh.Dial("tcp", hostport, cfg)
|
||||
if err != nil {
|
||||
logrus.Infof("error login,details: %s", err.Error())
|
||||
return nil, err
|
||||
}
|
||||
return client, nil
|
||||
}
|
||||
|
||||
//NewSSHClientByUserPass 创建ssh客户端
|
||||
func NewSSHClientByUserPass(hostport string, username, password string) (*ssh.Client, error) {
|
||||
config := &ssh.ClientConfig{
|
||||
User: username,
|
||||
Auth: []ssh.AuthMethod{
|
||||
ssh.Password(password),
|
||||
},
|
||||
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
|
||||
return nil
|
||||
},
|
||||
}
|
||||
client, err := ssh.Dial("tcp", hostport, config)
|
||||
if err != nil {
|
||||
logrus.Errorf("failed to connect %s use username %s ,error: %s", hostport, username, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
return client, nil
|
||||
//UpdateNodeCondition 更新节点状态
|
||||
func (n *NodeCluster) UpdateNodeCondition(nodeID, ctype, cvalue string) {
|
||||
node := n.GetNode(nodeID)
|
||||
node.UpdataCondition(model.NodeCondition{
|
||||
Type: model.NodeConditionType(ctype),
|
||||
Status: model.ConditionStatus(cvalue),
|
||||
LastHeartbeatTime: time.Now(),
|
||||
LastTransitionTime: time.Now(),
|
||||
Message: "",
|
||||
Reason: "",
|
||||
})
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ type MasterServer struct {
|
||||
*store.Client
|
||||
*model.HostNode
|
||||
Cluster *NodeCluster
|
||||
taskEngine *TaskEngine
|
||||
TaskEngine *TaskEngine
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
datacenterConfig *config.DataCenterConfig
|
||||
@ -50,7 +50,7 @@ func NewMasterServer(node *model.HostNode, k8sClient *kubernetes.Clientset) (*Ma
|
||||
}
|
||||
ms := &MasterServer{
|
||||
Client: store.DefalutClient,
|
||||
taskEngine: CreateTaskEngine(),
|
||||
TaskEngine: CreateTaskEngine(cluster),
|
||||
HostNode: node,
|
||||
Cluster: cluster,
|
||||
ctx: ctx,
|
||||
@ -63,7 +63,7 @@ func NewMasterServer(node *model.HostNode, k8sClient *kubernetes.Clientset) (*Ma
|
||||
//Start 启动
|
||||
func (m *MasterServer) Start() error {
|
||||
m.Cluster.Start()
|
||||
m.taskEngine.Start()
|
||||
m.TaskEngine.Start()
|
||||
//监控配置变化启动
|
||||
m.datacenterConfig.Start()
|
||||
return nil
|
||||
@ -72,6 +72,6 @@ func (m *MasterServer) Start() error {
|
||||
//Stop 停止
|
||||
func (m *MasterServer) Stop(i interface{}) {
|
||||
m.Cluster.Stop(i)
|
||||
m.taskEngine.Stop()
|
||||
m.TaskEngine.Stop()
|
||||
m.cancel()
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// 当前包处理任务的执行,结果处理,任务自动调度
|
||||
package masterserver
|
||||
|
||||
import (
|
||||
@ -26,7 +25,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/goodrain/rainbond/pkg/node/core/config"
|
||||
"github.com/goodrain/rainbond/pkg/node/core/store"
|
||||
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
@ -40,22 +41,33 @@ import (
|
||||
)
|
||||
|
||||
//TaskEngine 任务引擎
|
||||
// 处理任务的执行,结果处理,任务自动调度
|
||||
// TODO:执行记录清理工作
|
||||
type TaskEngine struct {
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
config *option.Conf
|
||||
statics map[string]*model.Task
|
||||
staticLock sync.Mutex
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
config *option.Conf
|
||||
statics map[string]*model.Task
|
||||
staticLock sync.Mutex
|
||||
dataCenterConfig *config.DataCenterConfig
|
||||
groups map[string]*model.TaskGroup
|
||||
groupContexts map[string]*config.GroupContext
|
||||
groupLock sync.Mutex
|
||||
nodeCluster *NodeCluster
|
||||
}
|
||||
|
||||
//CreateTaskEngine 创建task管理引擎
|
||||
func CreateTaskEngine() *TaskEngine {
|
||||
func CreateTaskEngine(nodeCluster *NodeCluster) *TaskEngine {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
return &TaskEngine{
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
statics: make(map[string]*model.Task),
|
||||
config: option.Config,
|
||||
ctx: ctx,
|
||||
cancel: cancel,
|
||||
statics: make(map[string]*model.Task),
|
||||
config: option.Config,
|
||||
dataCenterConfig: config.GetDataCenterConfig(),
|
||||
groups: make(map[string]*model.TaskGroup),
|
||||
groupContexts: make(map[string]*config.GroupContext),
|
||||
nodeCluster: nodeCluster,
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +75,7 @@ func CreateTaskEngine() *TaskEngine {
|
||||
func (t *TaskEngine) Start() {
|
||||
logrus.Info("task engine start")
|
||||
go t.LoadStaticTask()
|
||||
go t.HandleJobRecord()
|
||||
}
|
||||
|
||||
//Stop 启动
|
||||
@ -124,23 +137,8 @@ func (t *TaskEngine) loadFile(path string) {
|
||||
t.staticLock.Lock()
|
||||
defer t.staticLock.Unlock()
|
||||
t.statics[task.Name] = &task
|
||||
logrus.Infof("Load a static task %s, start run it.", task.Name)
|
||||
j, err := job.CreateJobFromTask(&task, nil)
|
||||
if err != nil {
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
if j.IsOnce {
|
||||
if err := job.PutOnce(j); err != nil {
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err := job.AddJob(j); err != nil {
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
t.AddTask(&task)
|
||||
logrus.Infof("Load a static task %s.", task.Name)
|
||||
}
|
||||
|
||||
//GetTask gettask
|
||||
@ -159,19 +157,191 @@ func (t *TaskEngine) GetTask(taskID string) *model.Task {
|
||||
return &task
|
||||
}
|
||||
|
||||
//StopTask 停止任务,即删除任务对应的JOB
|
||||
func (t *TaskEngine) StopTask(task *model.Task) {
|
||||
if task.JobID != "" {
|
||||
if task.IsOnce {
|
||||
_, err := store.DefalutClient.Delete(t.config.Once + "/" + task.JobID)
|
||||
if err != nil {
|
||||
logrus.Errorf("stop task %s error.%s", task.Name, err.Error())
|
||||
}
|
||||
} else {
|
||||
_, err := store.DefalutClient.Delete(t.config.Cmd + "/" + task.JobID)
|
||||
if err != nil {
|
||||
logrus.Errorf("stop task %s error.%s", task.Name, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//AddTask 添加task
|
||||
func (t *TaskEngine) AddTask(task *model.Task) error {
|
||||
oldTask := t.GetTask(task.ID)
|
||||
if oldTask != nil {
|
||||
if oldTask.JobID != "" {
|
||||
task.JobID = oldTask.JobID
|
||||
task.Status = oldTask.Status
|
||||
task.OutPut = oldTask.OutPut
|
||||
}
|
||||
}
|
||||
task.Status = map[string]model.TaskStatus{}
|
||||
for _, n := range task.Nodes {
|
||||
task.Status[n] = model.TaskStatus{
|
||||
Status: "create",
|
||||
}
|
||||
}
|
||||
task.CreateTime = time.Now()
|
||||
if task.Scheduler.Mode == "" {
|
||||
task.Scheduler.Mode = "Passive"
|
||||
}
|
||||
_, err := store.DefalutClient.Put("/store/tasks/"+task.ID, task.String())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if task.Scheduler.Mode == "Intime" {
|
||||
t.ScheduleTask(task.ID)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//UpdateTask 更新task
|
||||
func (t *TaskEngine) UpdateTask(task *model.Task) {
|
||||
_, err := store.DefalutClient.Put("/store/tasks/"+task.ID, task.String())
|
||||
if err != nil {
|
||||
logrus.Errorf("update task error,%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
//GetTaskGroup 获取taskgroup
|
||||
func (t *TaskEngine) GetTaskGroup(taskGroupID string) *model.TaskGroup {
|
||||
res, err := store.DefalutClient.Get("/store/taskgroups/" + taskGroupID)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
if res.Count < 1 {
|
||||
return nil
|
||||
}
|
||||
var group model.TaskGroup
|
||||
if err := ffjson.Unmarshal(res.Kvs[0].Value, &group); err != nil {
|
||||
return nil
|
||||
}
|
||||
return &group
|
||||
}
|
||||
|
||||
//handleJobRecord 处理
|
||||
func (t *TaskEngine) handleJobRecord(er *job.ExecutionRecord) {
|
||||
task := t.GetTask(er.TaskID)
|
||||
if task == nil {
|
||||
er.CompleteHandle()
|
||||
return
|
||||
}
|
||||
output, err := model.ParseTaskOutPut(er.Output)
|
||||
if err != nil {
|
||||
logrus.Error("parse task out put error,", err.Error())
|
||||
er.CompleteHandle()
|
||||
return
|
||||
}
|
||||
if output.Global != nil && len(output.Global) > 0 {
|
||||
for k, v := range output.Global {
|
||||
err := t.dataCenterConfig.PutConfig(&model.ConfigUnit{
|
||||
Name: strings.ToUpper(k),
|
||||
Value: v,
|
||||
ValueType: "string",
|
||||
IsConfigurable: false,
|
||||
})
|
||||
if err != nil {
|
||||
logrus.Errorf("save datacenter config %s=%s error.%s", k, v, err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
//groupID不为空,处理group连环操作
|
||||
if output.Inner != nil && len(output.Inner) > 0 && task.GroupID != "" {
|
||||
t.AddGroupConfig(task.GroupID, output.Inner)
|
||||
}
|
||||
for _, status := range output.Status {
|
||||
//install or check类型结果写入节点
|
||||
if output.Type == "install" || output.Type == "check" {
|
||||
t.nodeCluster.UpdateNodeCondition(er.Node, status.ConditionType, status.ConditionStatus)
|
||||
if status.NextTask != nil && len(status.NextTask) > 0 {
|
||||
t.ScheduleTask(status.NextTask...)
|
||||
}
|
||||
}
|
||||
}
|
||||
task.OutPut = append(task.OutPut, &output)
|
||||
taskStatus := model.TaskStatus{
|
||||
StartTime: er.BeginTime,
|
||||
EndTime: er.EndTime,
|
||||
CompleStatus: "",
|
||||
}
|
||||
if er.Success {
|
||||
taskStatus.CompleStatus = "Success"
|
||||
} else {
|
||||
taskStatus.CompleStatus = "Failure"
|
||||
}
|
||||
task.Status[output.NodeID] = taskStatus
|
||||
t.UpdateTask(task)
|
||||
er.CompleteHandle()
|
||||
}
|
||||
|
||||
//ScheduleTask 调度执行指定task
|
||||
func (t *TaskEngine) ScheduleTask(nextTask ...string) {
|
||||
for _, taskID := range nextTask {
|
||||
task := t.GetTask(taskID)
|
||||
if task == nil {
|
||||
continue
|
||||
}
|
||||
if task.JobID != "" {
|
||||
t.StopTask(task)
|
||||
}
|
||||
j, err := job.CreateJobFromTask(task, nil)
|
||||
if err != nil {
|
||||
task.Scheduler.Status = "Failure"
|
||||
task.Scheduler.Message = err.Error()
|
||||
t.UpdateTask(task)
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
if j.IsOnce {
|
||||
if err := job.PutOnce(j); err != nil {
|
||||
task.Scheduler.Status = "Failure"
|
||||
task.Scheduler.Message = err.Error()
|
||||
t.UpdateTask(task)
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if err := job.AddJob(j); err != nil {
|
||||
task.Scheduler.Status = "Failure"
|
||||
task.Scheduler.Message = err.Error()
|
||||
t.UpdateTask(task)
|
||||
logrus.Errorf("run task %s error.%s", task.Name, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
task.JobID = j.ID
|
||||
t.UpdateTask(task)
|
||||
}
|
||||
}
|
||||
|
||||
//ScheduleGroup 调度执行指定task
|
||||
func (t *TaskEngine) ScheduleGroup(nextGroups ...string) {
|
||||
for _, groupID := range nextGroups {
|
||||
_ = t.GetTaskGroup(groupID)
|
||||
}
|
||||
}
|
||||
|
||||
//AddGroupConfig 添加组会话配置
|
||||
func (t *TaskEngine) AddGroupConfig(groupID string, configs map[string]string) {
|
||||
t.groupLock.Lock()
|
||||
defer t.groupLock.Unlock()
|
||||
if ctx, ok := t.groupContexts[groupID]; ok {
|
||||
for k, v := range configs {
|
||||
ctx.Add(k, v)
|
||||
}
|
||||
} else {
|
||||
ctx := config.NewGroupContext()
|
||||
for k, v := range configs {
|
||||
ctx.Add(k, v)
|
||||
}
|
||||
t.groupContexts[groupID] = ctx
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "echo",
|
||||
"id": "ehco",
|
||||
"temp": {
|
||||
"name": "echo-temp",
|
||||
"shell": {
|
||||
|
15
test/tasks/echo_task_once.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "echo-once",
|
||||
"id": "echo-once",
|
||||
"temp": {
|
||||
"name": "echo-once-temp",
|
||||
"shell": {
|
||||
"cmd": ["echo", "\"mysql host is:${MYSQL_HOST}\""]
|
||||
}
|
||||
},
|
||||
"event_id": "xyxyxyxyxy",
|
||||
"is_once": true,
|
||||
"scheduler": {
|
||||
"mode": "Intime"
|
||||
}
|
||||
}
|