diff --git a/src/api/glide.lock b/src/api/glide.lock index c143b4b81..a4ca9a778 100644 --- a/src/api/glide.lock +++ b/src/api/glide.lock @@ -1,5 +1,5 @@ -hash: cc82fc68bf55f0dba003b52864f41329d40bf2243aadd651fb83c91deb1dccc8 -updated: 2017-08-03T14:20:28.305697876Z +hash: 2108ae1782273e29383d5e89a8b6cdbfde783a5fb86cfd8893d17d4165cdee55 +updated: 2017-09-20T09:09:12.686523429Z imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -103,11 +103,12 @@ imports: - name: github.com/garyburd/redigo version: 9e66b83d15a259978be267d0b61838c42c3904e3 subpackages: + - internal - redis - name: github.com/ghodss/yaml version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee - name: github.com/go-openapi/analysis - version: d5a75b7d751ca3f11ad5d93cfe97405f2c3f6a47 + version: b44dc874b601d9e4e2f6e19140e794ba24bead3b - name: github.com/go-openapi/errors version: d24ebc2075bad502fac3a8ae27aa6dd58e1952dc - name: github.com/go-openapi/jsonpointer @@ -115,9 +116,7 @@ imports: - name: github.com/go-openapi/jsonreference version: 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272 - name: github.com/go-openapi/loads - version: 6bb6486231e079ea125c0f39994ed3d0c53399ed - subpackages: - - fmts + version: 18441dfa706d924a39a030ee2c3b1d8d81917b38 - name: github.com/go-openapi/runtime version: 11e322eeecc1032d5a0a96c566ed53f2b5c26e22 subpackages: @@ -127,11 +126,11 @@ imports: - middleware/untyped - security - name: github.com/go-openapi/spec - version: 02fb9cd3430ed0581e0ceb4804d5d4b3cc702694 + version: 6aced65f8501fe1217321abf0749d354824ba2ff - name: github.com/go-openapi/strfmt version: d65c7fdb29eca313476e529628176fe17e58c488 - name: github.com/go-openapi/swag - version: d5f8ebc3b1c55a4cf6489eeae7354f338cfe299e + version: 1d0bd113de87027671077d3c71eb3ac5d7dbba72 - name: github.com/go-openapi/validate version: deaf2c9013bc1a7f4c774662259a506ba874d80f - name: github.com/go-swagger/go-swagger @@ -146,6 +145,8 @@ imports: - syntax/lexer - util/runes - util/strings +- name: github.com/gocraft/work + version: 2a383f87e013a086dac00a8d4a8138c909d2bd17 - name: github.com/gogo/protobuf version: e18d7aa8f8c624c915db340349aad4c49b10d173 subpackages: @@ -224,6 +225,8 @@ imports: version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 - name: github.com/PuerkitoBio/urlesc version: 5bd2802263f21d8788851d5305584c82a5c75d7e +- name: github.com/robfig/cron + version: 736158dc09e10f1911ca3a1e1b01f11b566ce5db - name: github.com/rs/cors version: a62a804a8a009876ca59105f7899938a1349f4b3 - name: github.com/rs/xhandler @@ -243,6 +246,10 @@ imports: subpackages: - codec - codec/codecgen +- name: github.com/unrolled/render + version: a0ec58421ddf111bd7efd3b7087399ca7d5da2f1 +- name: github.com/urfave/negroni + version: ccc4a14984828dcb944e6f17fa4a967b18624f2b - name: golang.org/x/crypto version: 1f22c0103821b9390939b6776727195525381532 subpackages: diff --git a/src/api/glide.yaml b/src/api/glide.yaml index 4333fd22e..cc6e83b42 100644 --- a/src/api/glide.yaml +++ b/src/api/glide.yaml @@ -61,4 +61,6 @@ import: version: ~0.18.0 - package: github.com/dchest/uniuri - package: github.com/garyburd/redigo/redis -- package: github.com/tv42/base58 \ No newline at end of file +- package: github.com/tv42/base58 +- package: github.com/urfave/negroni +- package: github.com/unrolled/render diff --git a/src/api/handlers/charts/charts.go b/src/api/handlers/charts/charts.go index 9ccd1ccf3..d0dcfa258 100644 --- a/src/api/handlers/charts/charts.go +++ b/src/api/handlers/charts/charts.go @@ -6,12 +6,12 @@ import ( "net/http" "sort" - middleware "github.com/go-openapi/runtime/middleware" "github.com/kubernetes-helm/monocular/src/api/chartpackagesort" "github.com/kubernetes-helm/monocular/src/api/data" "github.com/kubernetes-helm/monocular/src/api/data/helpers" "github.com/kubernetes-helm/monocular/src/api/data/pointerto" "github.com/kubernetes-helm/monocular/src/api/handlers" + "github.com/kubernetes-helm/monocular/src/api/handlers/renderer" "github.com/kubernetes-helm/monocular/src/api/swagger/models" chartsapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/charts" ) @@ -23,37 +23,50 @@ const ( ChartVersionResourceName = "chartVersion" ) +// ChartHandlers defines handlers that serve chart data +type ChartHandlers struct { + chartsImplementation data.Charts +} + +// NewChartHandlers takes a data.Charts implementation and returns a ChartHandlers struct +func NewChartHandlers(ch data.Charts) *ChartHandlers { + return &ChartHandlers{ch} +} + // GetChart is the handler for the /charts/{repo}/{name} endpoint -func GetChart(params chartsapi.GetChartParams, c data.Charts) middleware.Responder { - chartPackage, err := c.ChartFromRepo(params.Repo, params.ChartName) +func (c *ChartHandlers) GetChart(w http.ResponseWriter, req *http.Request, params handlers.Params) { + chartPackage, err := c.chartsImplementation.ChartFromRepo(params["repo"], params["chartName"]) if err != nil { - log.Printf("data.chartsapi.ChartFromRepo(%s, %s) error (%s)", params.Repo, params.ChartName, err) - return notFound(ChartResourceName) + log.Printf("data.chartsapi.ChartFromRepo(%s, %s) error (%s)", params["repo"], params["chartName"], err) + notFound(w, ChartResourceName) + return } chartResource := helpers.MakeChartResource(chartPackage) payload := handlers.DataResourceBody(chartResource) - return chartsapi.NewGetChartOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetChartVersion is the handler for the /charts/{repo}/{name}/versions/{version} endpoint -func GetChartVersion(params chartsapi.GetChartVersionParams, c data.Charts) middleware.Responder { - chartPackage, err := c.ChartVersionFromRepo(params.Repo, params.ChartName, params.Version) +func (c *ChartHandlers) GetChartVersion(w http.ResponseWriter, req *http.Request, params handlers.Params) { + chartPackage, err := c.chartsImplementation.ChartVersionFromRepo(params["repo"], params["chartName"], params["version"]) if err != nil { - log.Printf("data.chartsapi.ChartVersionFromRepo(%s, %s, %s) error (%s)", params.Repo, params.ChartName, params.Version, err) - return notFound(ChartVersionResourceName) + log.Printf("data.chartsapi.ChartVersionFromRepo(%s, %s, %s) error (%s)", params["repo"], params["chartName"], params["version"], err) + notFound(w, ChartVersionResourceName) + return } chartVersionResource := helpers.MakeChartVersionResource(chartPackage) payload := handlers.DataResourceBody(chartVersionResource) - return chartsapi.NewGetChartOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetChartVersions is the handler for the /charts/{repo}/{name}/versions endpoint -func GetChartVersions(params chartsapi.GetChartVersionsParams, c data.Charts) middleware.Responder { - chartPackages, err := c.ChartVersionsFromRepo(params.Repo, params.ChartName) +func (c *ChartHandlers) GetChartVersions(w http.ResponseWriter, req *http.Request, params handlers.Params) { + chartPackages, err := c.chartsImplementation.ChartVersionsFromRepo(params["repo"], params["chartName"]) if err != nil { - log.Printf("data.chartsapi.ChartVersionsFromRepo(%s, %s) error (%s)", params.Repo, params.ChartName, err) - return notFound(ChartVersionResourceName) + log.Printf("data.chartsapi.ChartVersionsFromRepo(%s, %s) error (%s)", params["repo"], params["chartName"], err) + notFound(w, ChartVersionResourceName) + return } // Sort by semver reverse order @@ -61,57 +74,57 @@ func GetChartVersions(params chartsapi.GetChartVersionsParams, c data.Charts) mi chartVersionResources := helpers.MakeChartVersionResources(chartPackages) payload := handlers.DataResourcesBody(chartVersionResources) - return chartsapi.NewGetAllChartsOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetAllCharts is the handler for the /charts endpoint -func GetAllCharts(params chartsapi.GetAllChartsParams, c data.Charts) middleware.Responder { - charts, err := c.All() +func (c *ChartHandlers) GetAllCharts(w http.ResponseWriter, req *http.Request) { + charts, err := c.chartsImplementation.All() if err != nil { log.Printf("data.Charts All() error (%s)", err) - return notFound(ChartResourceName + "s") + notFound(w, ChartResourceName+"s") + return } // For now we only sort by name sort.Sort(chartpackagesort.ByName(charts)) resources := helpers.MakeChartResources(charts) payload := handlers.DataResourcesBody(resources) - return chartsapi.NewGetAllChartsOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetChartsInRepo is the handler for the /charts/{repo} endpoint -func GetChartsInRepo(params chartsapi.GetChartsInRepoParams, c data.Charts) middleware.Responder { - charts, err := c.AllFromRepo(params.Repo) +func (c *ChartHandlers) GetChartsInRepo(w http.ResponseWriter, req *http.Request, params handlers.Params) { + charts, err := c.chartsImplementation.AllFromRepo(params["repo"]) if err != nil { - log.Printf("data.Charts AllFromRepo(%s) error (%s)", params.Repo, err) - return notFound(ChartResourceName + "s") + log.Printf("data.Charts AllFromRepo(%s) error (%s)", params["repo"], err) + notFound(w, ChartResourceName+"s") + return } // For now we only sort by name sort.Sort(chartpackagesort.ByName(charts)) chartsResource := helpers.MakeChartResources(charts) payload := handlers.DataResourcesBody(chartsResource) - return chartsapi.NewGetAllChartsOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // SearchCharts is the handler for the /charts/search endpoint -func SearchCharts(params chartsapi.SearchChartsParams, c data.Charts) middleware.Responder { - charts, err := c.Search(params) +func (c *ChartHandlers) SearchCharts(w http.ResponseWriter, req *http.Request) { + fmt.Println("query", req.URL) + fmt.Println(req.URL.Query().Get("name")) + charts, err := c.chartsImplementation.Search(chartsapi.SearchChartsParams{Name: req.URL.Query().Get("name")}) if err != nil { message := fmt.Sprintf("data.Charts Search() error (%s)", err) log.Printf(message) - return chartsapi.NewSearchChartsDefault(http.StatusBadRequest).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusBadRequest), Message: &message}, - ) + renderer.Render.JSON(w, http.StatusBadRequest, models.Error{Code: pointerto.Int64(http.StatusBadRequest), Message: &message}) + return } resources := helpers.MakeChartResources(charts) payload := handlers.DataResourcesBody(resources) - return chartsapi.NewGetAllChartsOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } -// notFound is a convenience that contains a swagger-friendly 404 given a resource string -func notFound(resource string) middleware.Responder { +func notFound(w http.ResponseWriter, resource string) { message := fmt.Sprintf("404 %s not found", resource) - return chartsapi.NewGetChartDefault(http.StatusNotFound).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusNotFound), Message: &message}, - ) + renderer.Render.JSON(w, http.StatusNotFound, &models.Error{Code: pointerto.Int64(http.StatusNotFound), Message: &message}) } diff --git a/src/api/handlers/charts/charts_test.go b/src/api/handlers/charts/charts_test.go index 8095760fc..9082c7a07 100644 --- a/src/api/handlers/charts/charts_test.go +++ b/src/api/handlers/charts/charts_test.go @@ -20,174 +20,169 @@ import ( ) var chartsImplementation = mocks.NewMockCharts(mocks.MockedMethods{}) +var chartHandlers = NewChartHandlers(chartsImplementation) func TestGetChart200(t *testing.T) { chart, err := chartsImplementation.ChartFromRepo(testutil.RepoName, testutil.ChartName) assert.NoErr(t, err) - w := httptest.NewRecorder() - params := chartsapi.GetChartParams{ - Repo: testutil.RepoName, - ChartName: testutil.ChartName, + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.RepoName+"/"+testutil.ChartName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{ + "repo": testutil.RepoName, + "chartName": testutil.ChartName, } - resp := GetChart(params, chartsImplementation) - assert.NotNil(t, resp, "GetChart response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + chartHandlers.GetChart(res, req, params) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") httpBody := new(models.ResourceData) - assert.NoErr(t, testutil.ResourceDataFromJSON(w.Body, httpBody)) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, httpBody)) chartResource := helpers.MakeChartResource(chart) testutil.AssertChartResourceBodyData(t, chartResource, httpBody) } func TestGetChart404(t *testing.T) { - w := httptest.NewRecorder() - bogonParams := chartsapi.GetChartParams{ - Repo: testutil.BogusRepo, - ChartName: testutil.ChartName, + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.BogusRepo+"/"+testutil.ChartName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + bogonParams := handlers.Params{ + "repo": testutil.BogusRepo, + "chartName": testutil.ChartName, } - errResp := GetChart(bogonParams, chartsImplementation) - errResp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + chartHandlers.GetChart(res, req, bogonParams) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, ChartResourceName, httpBody) } func TestGetChartVersion200(t *testing.T) { chart, err := chartsImplementation.ChartVersionFromRepo(testutil.RepoName, testutil.ChartName, testutil.ChartVersionString) assert.NoErr(t, err) - w := httptest.NewRecorder() - params := chartsapi.GetChartVersionParams{ - Repo: testutil.RepoName, - ChartName: testutil.ChartName, - Version: testutil.ChartVersionString, + req, err := http.NewRequest("GET", "v1/charts/"+testutil.RepoName+"/"+testutil.ChartName+"/versions/"+testutil.ChartVersionString, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{ + "repo": testutil.RepoName, + "chartName": testutil.ChartName, + "version": testutil.ChartVersionString, } - resp := GetChartVersion(params, chartsImplementation) - assert.NotNil(t, resp, "GetChartVersion response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + chartHandlers.GetChartVersion(res, req, params) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") httpBody := new(models.ResourceData) - assert.NoErr(t, testutil.ResourceDataFromJSON(w.Body, httpBody)) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, httpBody)) chartResource := helpers.MakeChartVersionResource(chart) testutil.AssertChartVersionResourceBodyData(t, chartResource, httpBody) } func TestGetChartVersion404(t *testing.T) { - w := httptest.NewRecorder() - bogonParams := chartsapi.GetChartVersionParams{ - Repo: testutil.RepoName, - ChartName: testutil.ChartName, - Version: "99.99.99", + req, err := http.NewRequest("GET", "v1/charts/"+testutil.RepoName+"/"+testutil.ChartName+"/versions/"+testutil.ChartVersionString, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + bogonParams := handlers.Params{ + "repo": testutil.RepoName, + "chartName": testutil.ChartName, + "version": "99.99.99", } - errResp := GetChartVersion(bogonParams, chartsImplementation) - errResp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + chartHandlers.GetChartVersion(res, req, bogonParams) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, ChartVersionResourceName, httpBody) } func TestGetChartVersions200(t *testing.T) { charts, err := chartsImplementation.ChartVersionsFromRepo(testutil.RepoName, testutil.ChartName) assert.NoErr(t, err) - w := httptest.NewRecorder() - params := chartsapi.GetChartVersionsParams{ - Repo: testutil.RepoName, - ChartName: testutil.ChartName, + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.RepoName+"/"+testutil.ChartName+"/versions", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{ + "repo": testutil.RepoName, + "chartName": testutil.ChartName, } - resp := GetChartVersions(params, chartsImplementation) - assert.NotNil(t, resp, "GetChartVersions response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + chartHandlers.GetChartVersions(res, req, params) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) assert.Equal(t, len(charts), len(httpBody.Data), "number of charts returned") } func TestGetChartVersions404(t *testing.T) { - w := httptest.NewRecorder() - params := chartsapi.GetChartVersionsParams{ - Repo: testutil.BogusRepo, - ChartName: testutil.ChartName, + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.BogusRepo+"/"+testutil.ChartName+"/versions", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{ + "repo": testutil.BogusRepo, + "chartName": testutil.ChartName, } - resp := GetChartVersions(params, chartsImplementation) - assert.NotNil(t, resp, "GetChartVersions response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + chartHandlers.GetChartVersions(res, req, params) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, ChartVersionResourceName, httpBody) } func TestGetAllCharts200(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := chartsapi.GetAllChartsParams{} - resp := GetAllCharts(params, chartsImplementation) - assert.NotNil(t, resp, "GetAllCharts response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/charts", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + chartHandlers.GetAllCharts(res, req) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) charts, err := chartsImplementation.All() assert.NoErr(t, err) assert.Equal(t, len(helpers.MakeChartResources(charts)), len(httpBody.Data), "number of charts returned") } func TestGetAllCharts404(t *testing.T) { - w := httptest.NewRecorder() + req, err := http.NewRequest("GET", "/v1/charts", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() chImplementation := mocks.NewMockCharts(mocks.MockedMethods{ All: func() ([]*models.ChartPackage, error) { var ret []*models.ChartPackage return ret, errors.New("error getting all charts") }, }) - params := chartsapi.GetAllChartsParams{} - resp := GetAllCharts(params, chImplementation) - assert.NotNil(t, resp, "GetAllCharts response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + NewChartHandlers(chImplementation).GetAllCharts(res, req) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, ChartResourceName+"s", httpBody) } func TestSearchCharts200(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := chartsapi.SearchChartsParams{ - Name: "drupal", - } - resp := SearchCharts(params, chartsImplementation) - assert.NotNil(t, resp, "SearchCharts response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/charts/search?name=drupal", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + chartHandlers.SearchCharts(res, req) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(w.Body, &httpBody)) - charts, err := chartsImplementation.Search(params) + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) + charts, err := chartsImplementation.Search(chartsapi.SearchChartsParams{Name: "drupal"}) assert.NoErr(t, err) assert.Equal(t, len(helpers.MakeChartResources(charts)), len(httpBody.Data), "number of charts returned") } func TestSearchCharts404(t *testing.T) { - w := httptest.NewRecorder() - params := chartsapi.SearchChartsParams{ - Name: "drupal", - } + req, err := http.NewRequest("GET", "/v1/charts/search?name=drupal", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() chImplementation := mocks.NewMockCharts(mocks.MockedMethods{ Search: func(params chartsapi.SearchChartsParams) ([]*models.ChartPackage, error) { var ret []*models.ChartPackage return ret, errors.New("error searching charts") }, }) - resp := SearchCharts(params, chImplementation) - assert.NotNil(t, resp, "SearchCharts response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") + NewChartHandlers(chImplementation).SearchCharts(res, req) + assert.Equal(t, res.Code, http.StatusBadRequest, "expect a 400 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) assert.Equal(t, *httpBody.Code, int64(400), "response code in HTTP body data") assert.Equal(t, *httpBody.Message, "data.Charts Search() error (error searching charts)", "error message in HTTP body data") } @@ -198,30 +193,24 @@ func TestGetChartsInRepo200(t *testing.T) { charts, err := chartsImplementation.AllFromRepo(testutil.RepoName) numCharts := len(helpers.MakeChartResources(charts)) assert.NoErr(t, err) - w := httptest.NewRecorder() - params := chartsapi.GetChartsInRepoParams{ - Repo: testutil.RepoName, - } - resp := GetChartsInRepo(params, chartsImplementation) - assert.NotNil(t, resp, "GetChartsInRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.RepoName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + chartHandlers.GetChartsInRepo(res, req, handlers.Params{"repo": testutil.RepoName}) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) assert.Equal(t, numCharts, len(httpBody.Data), "number of charts returned") } func TestGetChartsInRepo404(t *testing.T) { - w := httptest.NewRecorder() - params := chartsapi.GetChartsInRepoParams{ - Repo: testutil.BogusRepo, - } - resp := GetChartsInRepo(params, chartsImplementation) - assert.NotNil(t, resp, "GetChartsInRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + req, err := http.NewRequest("GET", "/v1/charts/"+testutil.BogusRepo, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + chartHandlers.GetChartsInRepo(res, req, handlers.Params{"repo": testutil.BogusRepo}) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, ChartResourceName+"s", httpBody) } @@ -261,21 +250,17 @@ func TestChartsHTTPBody(t *testing.T) { func TestNotFound(t *testing.T) { const resource1 = "chart" const resource2 = "repo" - w := httptest.NewRecorder() - resp := notFound(resource1) - assert.NotNil(t, resp, "notFound response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + res := httptest.NewRecorder() + notFound(res, resource1) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody1 models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody1)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody1)) testutil.AssertErrBodyData(t, http.StatusNotFound, resource1, httpBody1) - w = httptest.NewRecorder() + res2 := httptest.NewRecorder() var httpBody2 models.Error - resp2 := notFound(resource2) - assert.NotNil(t, resp2, "notFound response") - resp2.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody2)) + notFound(res2, resource2) + assert.Equal(t, res2.Code, http.StatusNotFound, "expect a 404 response code") + assert.NoErr(t, testutil.ErrorModelFromJSON(res2.Body, &httpBody2)) testutil.AssertErrBodyData(t, http.StatusNotFound, resource2, httpBody2) } diff --git a/src/api/handlers/handlers.go b/src/api/handlers/handlers.go index f37458ee0..be2117a3f 100644 --- a/src/api/handlers/handlers.go +++ b/src/api/handlers/handlers.go @@ -1,9 +1,23 @@ package handlers import ( + "net/http" + + "github.com/gorilla/mux" "github.com/kubernetes-helm/monocular/src/api/swagger/models" ) +// Params a key-value map of path params +type Params map[string]string + +// WithParams can be used to wrap handlers to take an extra arg for path params +type WithParams func(http.ResponseWriter, *http.Request, Params) + +func (h WithParams) ServeHTTP(w http.ResponseWriter, req *http.Request) { + vars := mux.Vars(req) + h(w, req, vars) +} + // DataResourceBody returns an data encapsulated version of a resource func DataResourceBody(resource *models.Resource) *models.ResourceData { return &models.ResourceData{ diff --git a/src/api/handlers/healthz.go b/src/api/handlers/healthz.go index 836dfc53a..2639eb2d0 100644 --- a/src/api/handlers/healthz.go +++ b/src/api/handlers/healthz.go @@ -1,12 +1,10 @@ package handlers import ( - middleware "github.com/go-openapi/runtime/middleware" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" + "net/http" ) -// Healthz is the handler for the /healthz endpoint -func Healthz(params operations.HealthzParams) middleware.Responder { - //TODO implement actual health check business logic - return operations.NewHealthzOK() +// Healthz returns 200 +func Healthz(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(http.StatusOK) } diff --git a/src/api/handlers/healthz_test.go b/src/api/handlers/healthz_test.go index 2ac0f917d..188b0fa08 100644 --- a/src/api/handlers/healthz_test.go +++ b/src/api/handlers/healthz_test.go @@ -6,15 +6,12 @@ import ( "testing" "github.com/arschles/assert" - "github.com/go-openapi/runtime" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" ) func TestHealthz(t *testing.T) { - w := httptest.NewRecorder() - params := operations.HealthzParams{} - resp := Healthz(params) - assert.NotNil(t, resp, "Healthz response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/healthz", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + Healthz(res, req) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") } diff --git a/src/api/handlers/releases/releases.go b/src/api/handlers/releases/releases.go index 8eeb675e1..443670220 100644 --- a/src/api/handlers/releases/releases.go +++ b/src/api/handlers/releases/releases.go @@ -1,16 +1,16 @@ package releases import ( - "fmt" + "encoding/json" "net/http" "strings" - middleware "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/kubernetes-helm/monocular/src/api/data" "github.com/kubernetes-helm/monocular/src/api/data/cache/charthelper" "github.com/kubernetes-helm/monocular/src/api/data/pointerto" "github.com/kubernetes-helm/monocular/src/api/handlers" + "github.com/kubernetes-helm/monocular/src/api/handlers/renderer" "github.com/kubernetes-helm/monocular/src/api/swagger/models" releasesapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/releases" hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" @@ -18,92 +18,101 @@ import ( "k8s.io/helm/pkg/timeconv" ) -// GetReleases returns all the existing releases in your cluster -func GetReleases(helmclient data.Client, params releasesapi.GetAllReleasesParams, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } +// ReleaseHandlers defines handlers that serve Helm release data +type ReleaseHandlers struct { + chartsImplementation data.Charts + helmClient data.Client +} - releases, err := helmclient.ListReleases(params) +// NewReleaseHandlers takes a data.Client implementation and returns a ReleaseHandlers struct +func NewReleaseHandlers(ch data.Charts, hc data.Client) *ReleaseHandlers { + return &ReleaseHandlers{helmClient: hc, chartsImplementation: ch} +} + +// GetReleases returns all the existing releases in your cluster +func (r *ReleaseHandlers) GetReleases(w http.ResponseWriter, req *http.Request) { + releases, err := r.helmClient.ListReleases(releasesapi.GetAllReleasesParams{}) if err != nil { - return errorResponse(err.Error(), http.StatusInternalServerError) + errorResponse(w, http.StatusInternalServerError, err.Error()) + return } resources := makeReleaseResources(releases) payload := handlers.DataResourcesBody(resources) - return releasesapi.NewGetAllReleasesOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetRelease returns the extended version of a release -func GetRelease(helmclient data.Client, params releasesapi.GetReleaseParams, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } - - release, err := helmclient.GetRelease(params.ReleaseName) +func (r *ReleaseHandlers) GetRelease(w http.ResponseWriter, req *http.Request, params handlers.Params) { + release, err := r.helmClient.GetRelease(params["releaseName"]) if err != nil { - return errorResponse(err.Error(), http.StatusInternalServerError) + errorResponse(w, http.StatusInternalServerError, err.Error()) + return } resource := makeReleaseExtendedResource(release.Release) payload := handlers.DataResourceBody(resource) - return releasesapi.NewGetReleaseOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // CreateRelease installs a chart version -func CreateRelease(helmclient data.Client, params releasesapi.CreateReleaseParams, c data.Charts, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } - +func (r *ReleaseHandlers) CreateRelease(w http.ResponseWriter, req *http.Request) { // Params validation format := strfmt.NewFormats() - err := params.Data.Validate(format) + var params releasesapi.CreateReleaseBody + decoder := json.NewDecoder(req.Body) + err := decoder.Decode(¶ms) if err != nil { - return errorResponse(err.Error(), http.StatusBadRequest) + errorResponse(w, http.StatusBadRequest, "unable to parse request body") + return + } + err = params.Validate(format) + if err != nil { + errorResponse(w, http.StatusBadRequest, err.Error()) + return } - idSplit := strings.Split(*params.Data.ChartID, "/") + idSplit := strings.Split(*params.ChartID, "/") if len(idSplit) != 2 || idSplit[0] == "" || idSplit[1] == "" { - return errorResponse("chartId must include the repository name. i.e: stable/wordpress", http.StatusBadRequest) + errorResponse(w, http.StatusBadRequest, "chartId must include the repository name. i.e: stable/wordpress") + return } // Search chart package and get local path repo, chartName := idSplit[0], idSplit[1] - chartPackage, err := c.ChartVersionFromRepo(repo, chartName, *params.Data.ChartVersion) + chartPackage, err := r.chartsImplementation.ChartVersionFromRepo(repo, chartName, *params.ChartVersion) if err != nil { - return errorResponse("chart not found", http.StatusBadRequest) + errorResponse(w, http.StatusNotFound, "404 chart not found") + return } chartPath := charthelper.TarballPath(chartPackage) - release, err := helmclient.InstallRelease(chartPath, params) + release, err := r.helmClient.InstallRelease(chartPath, releasesapi.CreateReleaseParams{Data: params}) if err != nil { - return errorResponse(fmt.Sprintf("Can't create the release: %s", err), http.StatusInternalServerError) + errorResponse(w, http.StatusInternalServerError, "Can't create the release: "+err.Error()) + return } resource := makeReleaseResource(release.Release) payload := handlers.DataResourceBody(resource) - return releasesapi.NewCreateReleaseCreated().WithPayload(payload) + renderer.Render.JSON(w, http.StatusCreated, payload) } // DeleteRelease deletes an existing release -func DeleteRelease(helmclient data.Client, params releasesapi.DeleteReleaseParams, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } - release, err := helmclient.DeleteRelease(params.ReleaseName) +func (r *ReleaseHandlers) DeleteRelease(w http.ResponseWriter, req *http.Request, params handlers.Params) { + release, err := r.helmClient.DeleteRelease(params["releaseName"]) if err != nil { - return errorResponse(fmt.Sprintf("Can't delete the release: %s", err), http.StatusBadRequest) + errorResponse(w, http.StatusBadRequest, "Can't delete the release: "+err.Error()) + return } resource := makeReleaseResource(release.Release) payload := handlers.DataResourceBody(resource) - return releasesapi.NewDeleteReleaseOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } -func errorResponse(message string, errorCode int64) middleware.Responder { - return releasesapi.NewGetAllReleasesDefault(int(errorCode)).WithPayload( - &models.Error{Code: pointerto.Int64(errorCode), Message: &message}, - ) +func errorResponse(w http.ResponseWriter, errorCode int64, message string) { + renderer.Render.JSON(w, int(errorCode), + models.Error{Code: pointerto.Int64(errorCode), Message: &message}) } func makeReleaseResources(releases *rls.ListReleasesResponse) []*models.Resource { diff --git a/src/api/handlers/releases/releases_test.go b/src/api/handlers/releases/releases_test.go index eae73b290..3c31389a4 100644 --- a/src/api/handlers/releases/releases_test.go +++ b/src/api/handlers/releases/releases_test.go @@ -1,14 +1,16 @@ package releases import ( + "bytes" + "encoding/json" "fmt" "net/http" "net/http/httptest" "testing" "github.com/arschles/assert" - "github.com/go-openapi/runtime" "github.com/kubernetes-helm/monocular/src/api/data/pointerto" + "github.com/kubernetes-helm/monocular/src/api/handlers" "github.com/kubernetes-helm/monocular/src/api/mocks" "github.com/kubernetes-helm/monocular/src/api/swagger/models" releasesapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/releases" @@ -18,170 +20,113 @@ import ( var helmClient = mocks.NewMockedClient() var helmClientBroken = mocks.NewMockedBrokenClient() var chartsImplementation = mocks.NewMockCharts(mocks.MockedMethods{}) +var releaseHandlers = NewReleaseHandlers(chartsImplementation, helmClient) +var brokenReleaseHandlers = NewReleaseHandlers(chartsImplementation, helmClientBroken) -func validParams() releasesapi.CreateReleaseParams { +func validParams() releasesapi.CreateReleaseBody { charts, _ := chartsImplementation.All() firstChart := charts[0] chartID := fmt.Sprintf("%s/%s", firstChart.Repo, *firstChart.Name) - return releasesapi.CreateReleaseParams{ - Data: releasesapi.CreateReleaseBody{ - ChartID: pointerto.String(chartID), - ChartVersion: firstChart.Version, - }, + return releasesapi.CreateReleaseBody{ + ChartID: pointerto.String(chartID), + ChartVersion: firstChart.Version, } } -func TestGetReleasesNotEnabled(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetAllReleasesParams{} - resp := GetReleases(helmClient, params, false) - assert.NotNil(t, resp, "GetReleases response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") -} - func TestGetReleases200(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetAllReleasesParams{} - resp := GetReleases(helmClient, params, true) - assert.NotNil(t, resp, "GetReleases response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/releases", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + releaseHandlers.GetReleases(res, req) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") } func TestGetReleases500(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetAllReleasesParams{} - resp := GetReleases(helmClientBroken, params, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusInternalServerError, "expect a 500 response code") -} - -func TestCreateReleaseNotEnabled(t *testing.T) { - w := httptest.NewRecorder() - resp := CreateRelease(helmClient, validParams(), chartsImplementation, false) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") + req, err := http.NewRequest("GET", "/v1/releases", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + brokenReleaseHandlers.GetReleases(res, req) + assert.Equal(t, res.Code, http.StatusInternalServerError, "expect a 500 response code") } func TestCreateRelease201(t *testing.T) { - w := httptest.NewRecorder() - resp := CreateRelease(helmClient, validParams(), chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusCreated, "expect a 201 response code") -} - -func TestCreateRelease400(t *testing.T) { - w := httptest.NewRecorder() - // No ChartVersion - params := releasesapi.CreateReleaseParams{ - Data: releasesapi.CreateReleaseBody{ - ChartID: pointerto.String("waps"), - }, - } - resp := CreateRelease(helmClient, params, chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") - - // No ChartId - params = releasesapi.CreateReleaseParams{ - Data: releasesapi.CreateReleaseBody{ - ChartVersion: pointerto.String("waps"), - }, + jsonParams, err := json.Marshal(validParams()) + assert.NoErr(t, err) + req, err := http.NewRequest("POST", "/v1/releases", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + res := httptest.NewRecorder() + releaseHandlers.CreateRelease(res, req) + assert.Equal(t, res.Code, http.StatusCreated, "expect a 201 response code") +} + +func TestCreateReleaseErrors(t *testing.T) { + tests := []struct { + name string + params releasesapi.CreateReleaseBody + expectedStatus int + }{ + {"no chartVersion", releasesapi.CreateReleaseBody{ChartID: pointerto.String("waps")}, http.StatusBadRequest}, + {"no chartId", releasesapi.CreateReleaseBody{ChartVersion: pointerto.String("waps")}, http.StatusBadRequest}, + {"invalid chartId", releasesapi.CreateReleaseBody{ChartID: pointerto.String("foo"), ChartVersion: pointerto.String("0.1.0")}, http.StatusBadRequest}, + {"non existant chart", releasesapi.CreateReleaseBody{ChartID: pointerto.String("stable/foo"), ChartVersion: pointerto.String("does not exist")}, http.StatusNotFound}, } - resp = CreateRelease(helmClient, params, chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") - // Invalid ChartId - params = releasesapi.CreateReleaseParams{ - Data: releasesapi.CreateReleaseBody{ - ChartID: pointerto.String("foo"), - ChartVersion: pointerto.String("waps"), - }, - } - resp = CreateRelease(helmClient, params, chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") - - // Chart not found - params = releasesapi.CreateReleaseParams{ - Data: releasesapi.CreateReleaseBody{ - ChartID: pointerto.String("stable/foo"), - ChartVersion: pointerto.String("does not exist"), - }, + + for _, tt := range tests { + jsonParams, err := json.Marshal(tt.params) + assert.NoErr(t, err) + req, err := http.NewRequest("POST", "/v1/releases", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + res := httptest.NewRecorder() + releaseHandlers.CreateRelease(res, req) + assert.Equal(t, res.Code, tt.expectedStatus, + fmt.Sprintf("got %d, expected %d for request with %s", res.Code, tt.expectedStatus, tt.name)) } - resp = CreateRelease(helmClient, params, chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 401 response code") } func TestCreateRelease500(t *testing.T) { - w := httptest.NewRecorder() - resp := CreateRelease(helmClientBroken, validParams(), chartsImplementation, true) - assert.NotNil(t, resp, "Create response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusInternalServerError, "expect a 500 response code") -} - -func TestDeleteReleaseNotEnabled(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.DeleteReleaseParams{ReleaseName: "foo"} - resp := DeleteRelease(helmClient, params, false) - assert.NotNil(t, resp, "Delete response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") + jsonParams, err := json.Marshal(validParams()) + assert.NoErr(t, err) + req, err := http.NewRequest("POST", "/v1/releases", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + res := httptest.NewRecorder() + brokenReleaseHandlers.CreateRelease(res, req) + assert.Equal(t, res.Code, http.StatusInternalServerError, "expect a 500 response code") } func TestDeleteRelease200(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.DeleteReleaseParams{ReleaseName: "foo"} - resp := DeleteRelease(helmClient, params, true) - assert.NotNil(t, resp, "Delete response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + releaseName := "foo" + req, err := http.NewRequest("DELETE", "/v1/releases/"+releaseName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + releaseHandlers.DeleteRelease(res, req, handlers.Params{"releaseName": releaseName}) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") } func TestDeleteRelease400(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.DeleteReleaseParams{} - resp := DeleteRelease(helmClientBroken, params, true) - assert.NotNil(t, resp, "Delete response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") + releaseName := "foo" + req, err := http.NewRequest("DELETE", "/v1/releases/"+releaseName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + brokenReleaseHandlers.DeleteRelease(res, req, handlers.Params{"releaseName": releaseName}) + assert.Equal(t, res.Code, http.StatusBadRequest, "expect a 400 response code") } func TestGetRelease200(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetReleaseParams{ReleaseName: "foo"} - resp := GetRelease(helmClient, params, true) - assert.NotNil(t, resp, "Get response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + releaseName := "foo" + req, err := http.NewRequest("GET", "/v1/releases/"+releaseName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + releaseHandlers.GetRelease(res, req, handlers.Params{"releaseName": releaseName}) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") } func TestGetRelease500(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetReleaseParams{ReleaseName: "foo"} - resp := GetRelease(helmClientBroken, params, true) - assert.NotNil(t, resp, "Get response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusInternalServerError, "expect a 500 response code") -} - -func TestGetRelease403(t *testing.T) { - w := httptest.NewRecorder() - params := releasesapi.GetReleaseParams{ReleaseName: "foo"} - resp := GetRelease(helmClient, params, false) - assert.NotNil(t, resp, "Get response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") + releaseName := "foo" + req, err := http.NewRequest("GET", "/v1/releases/"+releaseName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + brokenReleaseHandlers.GetRelease(res, req, handlers.Params{"releaseName": releaseName}) + assert.Equal(t, res.Code, http.StatusInternalServerError, "expect a 500 response code") } func TestMakeReleaseResource(t *testing.T) { @@ -220,11 +165,9 @@ func TestMakeReleaseExtendedResource(t *testing.T) { func TestErrorResponse(t *testing.T) { const resource1 = "release" - w := httptest.NewRecorder() - resp := errorResponse(resource1, http.StatusBadRequest) - assert.NotNil(t, resp, "error response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") + res := httptest.NewRecorder() + errorResponse(res, http.StatusBadRequest, resource1) + assert.Equal(t, res.Code, http.StatusBadRequest, "expect a 400 response code") var httpBody1 models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody1)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody1)) } diff --git a/src/api/handlers/renderer/renderer.go b/src/api/handlers/renderer/renderer.go new file mode 100644 index 000000000..c6a92daa9 --- /dev/null +++ b/src/api/handlers/renderer/renderer.go @@ -0,0 +1,12 @@ +package renderer + +import "github.com/unrolled/render" + +// Render is the global renderer for all handlers (the render library is threadsafe) +var Render *render.Render + +func init() { + Render = render.New(render.Options{ + IndentJSON: true, + }) +} diff --git a/src/api/handlers/repos/repos.go b/src/api/handlers/repos/repos.go index ae1ffb373..ee1f8e0ce 100644 --- a/src/api/handlers/repos/repos.go +++ b/src/api/handlers/repos/repos.go @@ -1,116 +1,120 @@ package repos import ( + "encoding/json" "net/http" "net/url" log "github.com/Sirupsen/logrus" - middleware "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/kubernetes-helm/monocular/src/api/data" "github.com/kubernetes-helm/monocular/src/api/data/helpers" "github.com/kubernetes-helm/monocular/src/api/data/pointerto" "github.com/kubernetes-helm/monocular/src/api/handlers" + "github.com/kubernetes-helm/monocular/src/api/handlers/renderer" "github.com/kubernetes-helm/monocular/src/api/swagger/models" - reposapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/repositories" ) // GetRepos returns all the enabled repositories -func GetRepos(params reposapi.GetAllReposParams) middleware.Responder { +func GetRepos(w http.ResponseWriter, req *http.Request) { reposCollection, err := data.GetRepos() if err != nil { - log.Error("unable to get Repos collection: ", err) - return reposapi.NewGetAllReposDefault(http.StatusInternalServerError).WithPayload(internalServerErrorPayload()) + log.WithError(err).Error("unable to get Repos collection") + renderer.Render.JSON(w, http.StatusInternalServerError, internalServerErrorPayload()) + return } var repos []*data.Repo reposCollection.FindAll(&repos) resources := helpers.MakeRepoResources(repos) payload := handlers.DataResourcesBody(resources) - return reposapi.NewGetAllReposOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // GetRepo returns an enabled repo -func GetRepo(params reposapi.GetRepoParams) middleware.Responder { - repo := data.Repo{} +func GetRepo(w http.ResponseWriter, req *http.Request, params handlers.Params) { + var repo data.Repo reposCollection, err := data.GetRepos() if err != nil { - log.Error("unable to get Repos collection: ", err) - return reposapi.NewGetRepoDefault(http.StatusInternalServerError).WithPayload(internalServerErrorPayload()) + log.WithError(err).Error("unable to get Repos collection") + renderer.Render.JSON(w, http.StatusInternalServerError, internalServerErrorPayload()) + return } - err = reposCollection.Find(params.RepoName, &repo) + err = reposCollection.Find(params["repo"], &repo) if err != nil { - log.Error("unable to find Repo: ", err) - return reposapi.NewGetRepoDefault(http.StatusNotFound).WithPayload(notFoundPayload()) + log.WithError(err).Error("unable to find Repo") + renderer.Render.JSON(w, http.StatusNotFound, notFoundPayload()) + return } resource := helpers.MakeRepoResource(models.Repo(repo)) payload := handlers.DataResourceBody(resource) - return reposapi.NewGetRepoOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } // CreateRepo adds a repo to the list of enabled repositories to index -func CreateRepo(params reposapi.CreateRepoParams, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } - +func CreateRepo(w http.ResponseWriter, req *http.Request) { reposCollection, err := data.GetRepos() if err != nil { - log.Error("unable to get Repos collection: ", err) - return reposapi.NewGetRepoDefault(http.StatusInternalServerError).WithPayload(internalServerErrorPayload()) + log.WithError(err).Error("unable to get Repos collection") + renderer.Render.JSON(w, http.StatusInternalServerError, internalServerErrorPayload()) + return } // Params validation format := strfmt.NewFormats() - if err := params.Data.Validate(format); err != nil { - return reposapi.NewCreateRepoDefault(http.StatusBadRequest).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusBadRequest), Message: pointerto.String(err.Error())}) + var params models.Repo + decoder := json.NewDecoder(req.Body) + err = decoder.Decode(¶ms) + if err != nil { + errorResponse(w, http.StatusBadRequest, "unable to parse request body") + return } - if _, err := url.ParseRequestURI(*params.Data.URL); err != nil { - return reposapi.NewCreateRepoDefault(http.StatusBadRequest).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusBadRequest), Message: pointerto.String("URL is invalid")}) + if err := params.Validate(format); err != nil { + errorResponse(w, http.StatusBadRequest, err.Error()) + return + } + if _, err := url.ParseRequestURI(*params.URL); err != nil { + errorResponse(w, http.StatusBadRequest, "URL is invalid") + return } - repo := data.Repo(*params.Data) + repo := data.Repo(params) if err := reposCollection.Save(&repo); err != nil { - log.Error("unable to save Repo: ", err) - return reposapi.NewCreateRepoDefault(http.StatusInternalServerError).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusInternalServerError), Message: pointerto.String(err.Error())}) + log.WithError(err).Error("unable to save Repo") + errorResponse(w, http.StatusInternalServerError, err.Error()) } resource := helpers.MakeRepoResource(models.Repo(repo)) payload := handlers.DataResourceBody(resource) - return reposapi.NewCreateRepoCreated().WithPayload(payload) + renderer.Render.JSON(w, http.StatusCreated, payload) } // DeleteRepo deletes a repo from the list of enabled repositories to index -func DeleteRepo(params reposapi.DeleteRepoParams, releasesEnabled bool) middleware.Responder { - if !releasesEnabled { - return errorResponse("Feature not enabled", http.StatusForbidden) - } - +func DeleteRepo(w http.ResponseWriter, req *http.Request, params handlers.Params) { reposCollection, err := data.GetRepos() if err != nil { - log.Error("unable to get Repos collection: ", err) - return reposapi.NewGetRepoDefault(http.StatusInternalServerError).WithPayload(internalServerErrorPayload()) + log.WithError(err).Error("unable to get Repos collection") + renderer.Render.JSON(w, http.StatusInternalServerError, internalServerErrorPayload()) + return } repo := data.Repo{} - found, err := reposCollection.Delete(params.RepoName) + found, err := reposCollection.Delete(params["repo"]) if err != nil { - log.Error("unable to delete Repo: ", err) - return reposapi.NewCreateRepoDefault(http.StatusInternalServerError).WithPayload( - &models.Error{Code: pointerto.Int64(http.StatusInternalServerError), Message: pointerto.String(err.Error())}) + log.WithError(err).Error("unable to delete Repo") + errorResponse(w, http.StatusInternalServerError, err.Error()) + return } if !found { - return reposapi.NewGetRepoDefault(http.StatusNotFound).WithPayload(notFoundPayload()) + renderer.Render.JSON(w, http.StatusNotFound, notFoundPayload()) + return } resource := helpers.MakeRepoResource(models.Repo(repo)) payload := handlers.DataResourceBody(resource) - return reposapi.NewGetRepoOK().WithPayload(payload) + renderer.Render.JSON(w, http.StatusOK, payload) } func notFoundPayload() *models.Error { @@ -121,8 +125,6 @@ func internalServerErrorPayload() *models.Error { return &models.Error{Code: pointerto.Int64(http.StatusInternalServerError), Message: pointerto.String("Internal server error")} } -func errorResponse(message string, errorCode int64) middleware.Responder { - return reposapi.NewGetAllReposDefault(int(errorCode)).WithPayload( - &models.Error{Code: pointerto.Int64(errorCode), Message: &message}, - ) +func errorResponse(w http.ResponseWriter, errorCode int64, message string) { + renderer.Render.JSON(w, int(errorCode), models.Error{Code: pointerto.Int64(errorCode), Message: &message}) } diff --git a/src/api/handlers/repos/repos_test.go b/src/api/handlers/repos/repos_test.go index ba0383878..c192b08de 100644 --- a/src/api/handlers/repos/repos_test.go +++ b/src/api/handlers/repos/repos_test.go @@ -1,6 +1,8 @@ package repos import ( + "bytes" + "encoding/json" "net/http" "net/http/httptest" "strings" @@ -8,26 +10,24 @@ import ( log "github.com/Sirupsen/logrus" "github.com/arschles/assert" - "github.com/go-openapi/runtime" "github.com/kubernetes-helm/monocular/src/api/config" "github.com/kubernetes-helm/monocular/src/api/data" "github.com/kubernetes-helm/monocular/src/api/data/pointerto" + "github.com/kubernetes-helm/monocular/src/api/handlers" "github.com/kubernetes-helm/monocular/src/api/swagger/models" - reposapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/repositories" "github.com/kubernetes-helm/monocular/src/api/testutil" ) func TestGetAllRepos200(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.GetAllReposParams{} - resp := GetRepos(params) - assert.NotNil(t, resp, "GetRepos response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/repos", nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + GetRepos(res, req) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) config, err := config.GetConfig() assert.NoErr(t, err) assert.Equal(t, len(httpBody.Data), len(config.Repos), "Returns the enabled repos") @@ -36,47 +36,48 @@ func TestGetAllRepos200(t *testing.T) { func TestGetRepo200(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.GetRepoParams{RepoName: "stable"} - resp := GetRepo(params) - assert.NotNil(t, resp, "GetRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("GET", "/v1/repos/"+testutil.RepoName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{"repo": testutil.RepoName} + GetRepo(res, req, params) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceData - assert.NoErr(t, testutil.ResourceDataFromJSON(w.Body, &httpBody)) - assert.Equal(t, *httpBody.Data.ID, params.RepoName, "returns the stable repo") + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Data.ID, testutil.RepoName, "returns the stable repo") } func TestGetRepo404(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.GetRepoParams{RepoName: "inexistant"} - errResp := GetRepo(params) - assert.NotNil(t, errResp, "GetRepo response") - errResp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + req, err := http.NewRequest("GET", "/v1/repos/"+testutil.BogusRepo, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{"repo": testutil.BogusRepo} + GetRepo(res, req, params) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, "repository", httpBody) } func TestCreateRepo201(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() testRepo := models.Repo{ Name: pointerto.String("repoName"), URL: pointerto.String("http://myrepobucket"), Source: "http://github.com/my-repo", } - params := reposapi.CreateRepoParams{Data: &testRepo} - resp := CreateRepo(params, true) - assert.NotNil(t, resp, "CreateRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusCreated, "expect a 201 response code") + jsonParams, err := json.Marshal(testRepo) + assert.NoErr(t, err) + req, err := http.NewRequest("POST", "/v1/repos", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + res := httptest.NewRecorder() + CreateRepo(res, req) + assert.Equal(t, res.Code, http.StatusCreated, "expect a 201 response code") var httpBody models.ResourceData - assert.NoErr(t, testutil.ResourceDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) assert.Equal(t, *httpBody.Data.ID, *testRepo.Name, "returns the stable repo") reposCollection, _ := data.GetRepos() assert.NoErr(t, reposCollection.Find(*testRepo.Name, &data.Repo{})) @@ -85,7 +86,6 @@ func TestCreateRepo201(t *testing.T) { func TestCreateRepo400(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() testRepo := models.Repo{ Name: pointerto.String("repoName"), Source: "http://github.com/my-repo", @@ -105,13 +105,17 @@ func TestCreateRepo400(t *testing.T) { } for _, tt := range tests { - params := reposapi.CreateRepoParams{Data: &tt.repo} - resp := CreateRepo(params, true) - assert.NotNil(t, resp, "CreateRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusBadRequest, "expect a 400 response code") + jsonParams, err := json.Marshal(tt.repo) + assert.NoErr(t, err) + + req, err := http.NewRequest("POST", "/v1/repos", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + res := httptest.NewRecorder() + CreateRepo(res, req) + + assert.Equal(t, res.Code, http.StatusBadRequest, "expect a 400 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) assert.NotNil(t, httpBody.Message, tt.name+" error response") assert.Equal(t, *httpBody.Code, int64(http.StatusBadRequest), "response code in HTTP body data") assert.True(t, strings.Contains(*httpBody.Message, tt.errorMsg), "error message in HTTP body data") @@ -120,72 +124,33 @@ func TestCreateRepo400(t *testing.T) { } } -func TestCreateRepo403(t *testing.T) { - setupTestRepoCache() - defer teardownTestRepoCache() - w := httptest.NewRecorder() - testRepo := models.Repo{ - Name: pointerto.String("repoName"), - URL: pointerto.String("http://myrepobucket"), - Source: "http://github.com/my-repo", - } - params := reposapi.CreateRepoParams{Data: &testRepo} - resp := CreateRepo(params, false) - assert.NotNil(t, resp, "CreateRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) - assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") - assert.True(t, strings.Contains(*httpBody.Message, "Feature not enabled"), "error message in HTTP body data") - reposCollection, _ := data.GetRepos() - assert.ExistsErr(t, reposCollection.Find(*testRepo.Name, &data.Repo{}), "invalid repo") -} - func TestDeleteRepo200(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.DeleteRepoParams{RepoName: "stable"} - resp := DeleteRepo(params, true) - assert.NotNil(t, resp, "DeleteRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusOK, "expect a 200 response code") + req, err := http.NewRequest("DELETE", "/v1/repos/"+testutil.RepoName, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{"repo": testutil.RepoName} + DeleteRepo(res, req, params) + assert.Equal(t, res.Code, http.StatusOK, "expect a 200 response code") var httpBody models.ResourceData - assert.NoErr(t, testutil.ResourceDataFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) assert.Nil(t, httpBody.Data.ID, "deleted repo") reposCollection, _ := data.GetRepos() - assert.ExistsErr(t, reposCollection.Find("stable", &data.Repo{}), "deleted repo") -} - -func TestDeleteRepo403(t *testing.T) { - setupTestRepoCache() - defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.DeleteRepoParams{RepoName: "stable"} - resp := DeleteRepo(params, false) - assert.NotNil(t, resp, "CreateRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusForbidden, "expect a 403 response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) - assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") - assert.True(t, strings.Contains(*httpBody.Message, "Feature not enabled"), "error message in HTTP body data") - reposCollection, _ := data.GetRepos() - assert.NoErr(t, reposCollection.Find("stable", &data.Repo{})) + assert.ExistsErr(t, reposCollection.Find(testutil.RepoName, &data.Repo{}), "deleted repo") } func TestDeleteRepo404(t *testing.T) { setupTestRepoCache() defer teardownTestRepoCache() - w := httptest.NewRecorder() - params := reposapi.DeleteRepoParams{RepoName: "inexistant"} - resp := DeleteRepo(params, true) - assert.NotNil(t, resp, "DeleteRepo response") - resp.WriteResponse(w, runtime.JSONProducer()) - assert.Equal(t, w.Code, http.StatusNotFound, "expect a 404 response code") + req, err := http.NewRequest("DELETE", "/v1/repos/"+testutil.BogusRepo, nil) + assert.NoErr(t, err) + res := httptest.NewRecorder() + params := handlers.Params{"repo": testutil.BogusRepo} + DeleteRepo(res, req, params) + assert.Equal(t, res.Code, http.StatusNotFound, "expect a 404 response code") var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(w.Body, &httpBody)) + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) testutil.AssertErrBodyData(t, http.StatusNotFound, "repository", httpBody) } diff --git a/src/api/main.go b/src/api/main.go index ea4e675fe..78e804579 100644 --- a/src/api/main.go +++ b/src/api/main.go @@ -1,54 +1,142 @@ package main import ( - "log" + "net/http" "os" + "time" - loads "github.com/go-openapi/loads" - flags "github.com/jessevdk/go-flags" + "github.com/kubernetes-helm/monocular/src/api/data/cache/charthelper" + "github.com/rs/cors" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" + log "github.com/Sirupsen/logrus" + "github.com/gorilla/mux" + "github.com/kubernetes-helm/monocular/src/api/config" + "github.com/kubernetes-helm/monocular/src/api/config/repos" + "github.com/kubernetes-helm/monocular/src/api/data" + "github.com/kubernetes-helm/monocular/src/api/data/cache" + "github.com/kubernetes-helm/monocular/src/api/data/helm/client" + "github.com/kubernetes-helm/monocular/src/api/handlers" + "github.com/kubernetes-helm/monocular/src/api/handlers/charts" + "github.com/kubernetes-helm/monocular/src/api/handlers/releases" + repoHandlers "github.com/kubernetes-helm/monocular/src/api/handlers/repos" + "github.com/kubernetes-helm/monocular/src/api/jobs" + "github.com/kubernetes-helm/monocular/src/api/middleware" + "github.com/urfave/negroni" ) -// This file was generated by the swagger tool. -// Make sure not to overwrite this file after you generated it because all your edits would be lost! +func setupRepoCache(repos repos.Repos) { + // setup initial chart repositories + if err := data.UpdateCache(repos); err != nil { + log.WithError(err).Fatalf("Can not configure repository cache") + } +} -func main() { - swaggerSpec, err := loads.Analyzed(restapi.SwaggerJSON, "") - if err != nil { - log.Fatalln(err) +func setupChartsImplementation(conf config.Configuration) data.Charts { + setupRepoCache(conf.Repos) + + chartsImplementation := cache.NewCachedCharts() + // Run foreground repository refresh + chartsImplementation.Refresh() + // Setup background index refreshes + cacheRefreshInterval := conf.CacheRefreshInterval + if cacheRefreshInterval <= 0 { + cacheRefreshInterval = 3600 } + freshness := time.Duration(cacheRefreshInterval) * time.Second + periodicRefresh := cache.NewRefreshChartsData(chartsImplementation, freshness, "refresh-charts", false) + toDo := []jobs.Periodic{periodicRefresh} + jobs.DoPeriodic(toDo) - api := operations.NewMonocularAPI(swaggerSpec) - server := restapi.NewServer(api) - defer server.Shutdown() + return chartsImplementation +} - parser := flags.NewParser(server, flags.Default) - parser.ShortDescription = `Monocular` - parser.LongDescription = swaggerSpec.Spec().Info.Description +func setupCors(conf config.Configuration) *cors.Cors { + return cors.New(cors.Options{ + AllowedOrigins: conf.Cors.AllowedOrigins, + // They need to be the same than the Access-Control-Request-Headers so it works + // on pre-flight requests + AllowedHeaders: conf.Cors.AllowedHeaders, + AllowCredentials: true, + AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, + }) +} - server.ConfigureFlags() - for _, optsGroup := range api.CommandLineOptionsGroups { - _, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options) - if err != nil { - log.Fatalln(err) - } - } +func setupRoutes(conf config.Configuration, chartsImplementation data.Charts, helmClient data.Client) http.Handler { + r := mux.NewRouter() + + // Middleware + InClusterGate := middleware.InClusterGate(conf.ReleasesEnabled) + + // Healthcheck + r.Methods("GET").Path("/healthz").HandlerFunc(handlers.Healthz) - if _, err := parser.Parse(); err != nil { - code := 1 - if fe, ok := err.(*flags.Error); ok { - if fe.Type == flags.ErrHelp { - code = 0 - } - } - os.Exit(code) + // API v1 + apiv1 := r.PathPrefix("/v1").Subrouter() + + // Chart routes + chartHandlers := charts.NewChartHandlers(chartsImplementation) + apiv1.Methods("GET").Path("/charts").HandlerFunc(chartHandlers.GetAllCharts) + apiv1.Methods("GET").Path("/charts/search").HandlerFunc(chartHandlers.SearchCharts) + apiv1.Methods("GET").Path("/charts/{repo}").Handler(handlers.WithParams(chartHandlers.GetChartsInRepo)) + apiv1.Methods("GET").Path("/charts/{repo}/{chartName}").Handler(handlers.WithParams(chartHandlers.GetChart)) + + // Chart Version routes + apiv1.Methods("GET").Path("/charts/{repo}/{chartName}/versions").Handler(handlers.WithParams(chartHandlers.GetChartVersions)) + apiv1.Methods("GET").Path("/charts/{repo}/{chartName}/versions/{version}").Handler(handlers.WithParams(chartHandlers.GetChartVersion)) + + // Repo routes + apiv1.Methods("GET").Path("/repos").HandlerFunc(repoHandlers.GetRepos) + apiv1.Methods("POST").Path("/repos").Handler(negroni.New( + InClusterGate, + negroni.WrapFunc(repoHandlers.CreateRepo), + )) + apiv1.Methods("GET").Path("/repos/{repo}").Handler(handlers.WithParams(repoHandlers.GetRepo)) + apiv1.Methods("DELETE").Path("/repos/{repo}").Handler(negroni.New( + InClusterGate, + negroni.Wrap(handlers.WithParams(repoHandlers.DeleteRepo)), + )) + + // Releases routes + releaseHandlers := releases.NewReleaseHandlers(chartsImplementation, helmClient) + releasesRouter := mux.NewRouter() + apiv1.PathPrefix("/releases").Handler(negroni.New(InClusterGate, negroni.Wrap(releasesRouter))) + releasesv1 := releasesRouter.PathPrefix("/v1").Subrouter() + releasesv1.Methods("GET").Path("/releases").HandlerFunc(releaseHandlers.GetReleases) + releasesv1.Methods("POST").Path("/releases").HandlerFunc(releaseHandlers.CreateRelease) + releasesv1.Methods("GET").Path("/releases/{releaseName}").Handler(handlers.WithParams(releaseHandlers.GetRelease)) + releasesv1.Methods("DELETE").Path("/releases/{releaseName}").Handler(handlers.WithParams(releaseHandlers.DeleteRelease)) + + // Serve chart assets + fs := http.FileServer(http.Dir(charthelper.DataDirBase())) + fs = http.StripPrefix("/assets/", fs) + r.PathPrefix("/assets").Handler(negroni.New( + negroni.WrapFunc(func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Cache-Control", "public, max-age=7776000") + }), + negroni.Wrap(fs), + )) + + n := negroni.Classic() // Includes some default middlewares + n.Use(setupCors(conf)) + n.UseHandler(r) + return n +} + +func main() { + conf, err := config.GetConfig() + if err != nil { + log.WithError(err).Fatal("unable to load configuration") } - server.ConfigureAPI() + chartsImplementation := setupChartsImplementation(conf) + helmClient := client.NewHelmClient() + router := setupRoutes(conf, chartsImplementation, helmClient) - if err := server.Serve(); err != nil { - log.Fatalln(err) + port := os.Getenv("PORT") + if port == "" { + port = "8080" } + addr := ":" + port + log.WithFields(log.Fields{"addr": addr}).Info("Started Monocular API server") + http.ListenAndServe(addr, router) } diff --git a/src/api/main_test.go b/src/api/main_test.go new file mode 100755 index 000000000..c1b9de8e6 --- /dev/null +++ b/src/api/main_test.go @@ -0,0 +1,490 @@ +package main + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "strings" + "testing" + + log "github.com/Sirupsen/logrus" + "github.com/arschles/assert" + "github.com/kubernetes-helm/monocular/src/api/config" + "github.com/kubernetes-helm/monocular/src/api/config/repos" + "github.com/kubernetes-helm/monocular/src/api/data" + "github.com/kubernetes-helm/monocular/src/api/data/cache" + "github.com/kubernetes-helm/monocular/src/api/data/helpers" + "github.com/kubernetes-helm/monocular/src/api/data/pointerto" + handlerscharts "github.com/kubernetes-helm/monocular/src/api/handlers/charts" + "github.com/kubernetes-helm/monocular/src/api/mocks" + "github.com/kubernetes-helm/monocular/src/api/swagger/models" + releasesapi "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/releases" + "github.com/kubernetes-helm/monocular/src/api/testutil" +) + +const versionsRouteString = "versions" + +var helmClient = mocks.NewMockedClient() +var helmClientBroken = mocks.NewMockedBrokenClient() +var chartsImplementation = getChartsImplementation() +var conf, _ = config.GetConfig() + +// tests the GET /healthz endpoint +func TestGetHealthz(t *testing.T) { + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + + res, err := http.Get(ts.URL + "/healthz") + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") +} + +// tests the GET /{:apiVersion}/charts endpoint +func TestGetCharts(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + charts, err := chartsImplementation.All() + assert.NoErr(t, err) + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s")) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceArrayData + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, len(helpers.MakeChartResources(charts)), len(httpBody.Data), "number of charts returned") +} + +// // tests the GET /{:apiVersion}/charts/{:repo} endpoint 200 response +func TestGetChartsInRepo200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + charts, err := chartsImplementation.AllFromRepo(testutil.RepoName) + numCharts := len(helpers.MakeChartResources(charts)) + assert.NoErr(t, err) + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.RepoName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceArrayData + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, numCharts, len(httpBody.Data), "number of charts returned") +} + +// tests the GET /{:apiVersion}/charts/{:repo} endpoint 404 response +func TestGetChartsInRepo404(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusNotFound, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartResourceName+"s", httpBody) +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart} endpoint 200 response +func TestGetChartInRepo200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + chart, err := chartsImplementation.ChartFromRepo(testutil.RepoName, testutil.ChartName) + assert.NoErr(t, err) + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + httpBody := new(models.ResourceData) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, httpBody)) + chartResource := helpers.MakeChartResource(chart) + testutil.AssertChartResourceBodyData(t, chartResource, httpBody) +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart} endpoint 404 response +func TestGetChartInRepo404(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo, testutil.ChartName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusNotFound, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartResourceName, httpBody) +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version/{:version} endpoint 200 response +func TestGetChartVersion200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + chart, err := chartsImplementation.ChartVersionFromRepo(testutil.RepoName, testutil.ChartName, testutil.ChartVersionString) + assert.NoErr(t, err) + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString, testutil.ChartVersionString)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + httpBody := new(models.ResourceData) + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, httpBody)) + chartResource := helpers.MakeChartVersionResource(chart) + testutil.AssertChartVersionResourceBodyData(t, chartResource, httpBody) +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version/{:version} endpoint 404 response +func TestGetChartVersion404(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString, "99.99.99")) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusNotFound, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartVersionResourceName, httpBody) +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/versions endpoint 200 response +func TestGetChartVersions200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + charts, err := chartsImplementation.ChartVersionsFromRepo(testutil.RepoName, testutil.ChartName) + assert.NoErr(t, err) + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceArrayData + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, len(charts), len(httpBody.Data), "number of charts returned") +} + +// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/versions endpoint 404 response +func TestGetChartVersions404(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo, testutil.ChartName, versionsRouteString)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusNotFound, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartVersionResourceName, httpBody) +} + +// tests the GET /{:apiVersion}/repos endpoint 200 response +func TestGetRepos200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "repos")) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceArrayData + assert.NoErr(t, testutil.ResourceArrayDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, len(httpBody.Data), 1, "number of repos returned") + assert.Equal(t, *httpBody.Data[0].ID, testutil.RepoName, "repo name is correct") +} + +// tests the POST /{:apiVersion}/repos endpoint 201 response +func TestCreateRepo201(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + repoName := "repoName" + testRepo := models.Repo{ + Name: &repoName, + URL: pointerto.String("http://myrepobucket"), + Source: "http://github.com/my-repo", + } + jsonParams, err := json.Marshal(testRepo) + assert.NoErr(t, err) + res, err := http.Post(urlPath(ts.URL, "v1", "repos"), "application/json", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusCreated, "response code") + var httpBody models.ResourceData + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Data.ID, repoName, "returns the correct repo name") + reposCollection, _ := data.GetRepos() + assert.NoErr(t, reposCollection.Find(repoName, &data.Repo{})) +} + +// tests the POST /{:apiVersion}/repos endpoint 403 response +func TestCreateRepo403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + repoName := "repoName" + testRepo := models.Repo{ + Name: &repoName, + URL: pointerto.String("http://myrepobucket"), + Source: "http://github.com/my-repo", + } + jsonParams, err := json.Marshal(testRepo) + assert.NoErr(t, err) + res, err := http.Post(urlPath(ts.URL, "v1", "repos"), "application/json", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") +} + +// tests the GET /{:apiVersion}/repos/{:repo} endpoint 200 response +func TestGetRepo200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "repos", testutil.RepoName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceData + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Data.ID, testutil.RepoName, "repo name is correct") +} + +// tests the DELETE /{:apiVersion}/repos/{:repo} endpoint 200 response +func TestDeleteRepo200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + req, err := http.NewRequest("DELETE", urlPath(ts.URL, "v1", "repos", testutil.RepoName), nil) + assert.NoErr(t, err) + client := &http.Client{} + res, err := client.Do(req) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") + var httpBody models.ResourceData + assert.NoErr(t, testutil.ResourceDataFromJSON(res.Body, &httpBody)) + assert.Nil(t, httpBody.Data.ID, "deleted repo") + reposCollection, _ := data.GetRepos() + assert.ExistsErr(t, reposCollection.Find(testutil.RepoName, &data.Repo{}), "deleted repo") +} + +// tests the DELETE /{:apiVersion}/repos/{:repo} endpoint 403 response +func TestDeleteRepo403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + req, err := http.NewRequest("DELETE", urlPath(ts.URL, "v1", "repos", testutil.RepoName), nil) + assert.NoErr(t, err) + client := &http.Client{} + res, err := client.Do(req) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") + reposCollection, _ := data.GetRepos() + assert.NoErr(t, reposCollection.Find(testutil.RepoName, &data.Repo{})) +} + +// tests the GET /{:apiVersion}/releases endpoint 200 response +func TestGetReleases200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "releases")) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") +} + +// tests the GET /{:apiVersion}/releases endpoint 403 response +func TestGetReleases403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "releases")) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") +} + +// tests the POST /{:apiVersion}/releases endpoint 201 response +func TestCreateRelease201(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + chartID := fmt.Sprintf("%s/%s", testutil.RepoName, testutil.ChartName) + params := releasesapi.CreateReleaseBody{ + ChartID: pointerto.String(chartID), + ChartVersion: pointerto.String(testutil.ChartVersionString), + } + jsonParams, err := json.Marshal(params) + assert.NoErr(t, err) + res, err := http.Post(urlPath(ts.URL, "v1", "releases"), "application/json", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusCreated, "response code") +} + +// tests the POST /{:apiVersion}/releases endpoint 403 response +func TestCreateRelease403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + chartID := fmt.Sprintf("%s/%s", testutil.RepoName, testutil.ChartName) + params := releasesapi.CreateReleaseBody{ + ChartID: pointerto.String(chartID), + ChartVersion: pointerto.String(testutil.ChartVersionString), + } + jsonParams, err := json.Marshal(params) + assert.NoErr(t, err) + res, err := http.Post(urlPath(ts.URL, "v1", "releases"), "application/json", bytes.NewBuffer(jsonParams)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") +} + +// tests the GET /{:apiVersion}/releases/{:releaseName} endpoint 200 response +func TestGetRelease200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + releaseName := "foo" + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "releases", releaseName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") +} + +// tests the GET /{:apiVersion}/releases/{:releaseName} endpoint 403 response +func TestGetRelease403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + releaseName := "foo" + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + res, err := http.Get(urlPath(ts.URL, "v1", "releases", releaseName)) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") +} + +// tests the DELETE /{:apiVersion}/releases/{:releaseName} endpoint 200 response +func TestDeleteRelease200(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + conf.ReleasesEnabled = true + defer func() { conf.ReleasesEnabled = false }() + releaseName := "foo" + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + req, err := http.NewRequest("DELETE", urlPath(ts.URL, "v1", "releases", releaseName), nil) + assert.NoErr(t, err) + client := http.Client{} + res, err := client.Do(req) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusOK, "response code") +} + +// tests the DELETE /{:apiVersion}/releases/{:releaseName} endpoint 403 response +func TestDeleteRelease403(t *testing.T) { + setupTestRepoCache() + defer teardownTestRepoCache() + releaseName := "foo" + ts := httptest.NewServer(setupRoutes(conf, chartsImplementation, helmClient)) + defer ts.Close() + req, err := http.NewRequest("DELETE", urlPath(ts.URL, "v1", "releases", releaseName), nil) + assert.NoErr(t, err) + client := http.Client{} + res, err := client.Do(req) + assert.NoErr(t, err) + defer res.Body.Close() + assert.Equal(t, res.StatusCode, http.StatusForbidden, "response code") + var httpBody models.Error + assert.NoErr(t, testutil.ErrorModelFromJSON(res.Body, &httpBody)) + assert.Equal(t, *httpBody.Code, int64(http.StatusForbidden), "response code in HTTP body data") + assert.Equal(t, *httpBody.Message, "feature not enabled", "error message") +} + +func urlPath(ver string, remainder ...string) string { + return fmt.Sprintf("%s/%s", ver, strings.Join(remainder, "/")) +} + +func getChartsImplementation() data.Charts { + chartsImplementation := cache.NewCachedCharts() + return chartsImplementation +} + +func setupTestRepoCache() { + setupRepoCache(repos.Repos{ + { + Name: pointerto.String("stable"), + URL: pointerto.String("http://storage.googleapis.com/kubernetes-charts"), + }, + }) + chartsImplementation.Refresh() +} + +func teardownTestRepoCache() { + reposCollection, err := data.GetRepos() + if err != nil { + log.Fatal("could not get Repos collection ", err) + } + _, err = reposCollection.DeleteAll() + if err != nil { + log.Fatal("could not clear cache ", err) + } +} diff --git a/src/api/middleware/incluster.go b/src/api/middleware/incluster.go new file mode 100644 index 000000000..85a459b1a --- /dev/null +++ b/src/api/middleware/incluster.go @@ -0,0 +1,23 @@ +package middleware + +import ( + "net/http" + + "github.com/kubernetes-helm/monocular/src/api/data/pointerto" + "github.com/urfave/negroni" + + "github.com/kubernetes-helm/monocular/src/api/handlers/renderer" + "github.com/kubernetes-helm/monocular/src/api/swagger/models" +) + +// InClusterGate implements middleware to check if in cluster features are enabled before continuing +func InClusterGate(inCluster bool) negroni.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request, next http.HandlerFunc) { + if !inCluster { + renderer.Render.JSON(w, http.StatusForbidden, + models.Error{Code: pointerto.Int64(http.StatusForbidden), Message: pointerto.String("feature not enabled")}) + } else { + next(w, req) + } + } +} diff --git a/src/api/middleware/incluster_test.go b/src/api/middleware/incluster_test.go new file mode 100644 index 000000000..ea283106e --- /dev/null +++ b/src/api/middleware/incluster_test.go @@ -0,0 +1,30 @@ +package middleware + +import ( + "net/http" + "net/http/httptest" + "testing" + + "github.com/arschles/assert" +) + +func TestInClusterGate(t *testing.T) { + handler := func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(http.StatusOK) + } + req, err := http.NewRequest("GET", "/in-cluster", nil) + assert.NoErr(t, err) + tests := []struct { + name string + enabled bool + want int + }{ + {"200 status", true, http.StatusOK}, + {"403 status", false, http.StatusForbidden}, + } + for _, tt := range tests { + res := httptest.NewRecorder() + InClusterGate(tt.enabled)(res, req, handler) + assert.Equal(t, res.Code, tt.want, tt.name) + } +} diff --git a/src/api/swagger/restapi/configure_monocular.go b/src/api/swagger/restapi/configure_monocular.go deleted file mode 100755 index 3c94003f8..000000000 --- a/src/api/swagger/restapi/configure_monocular.go +++ /dev/null @@ -1,199 +0,0 @@ -package restapi - -import ( - "crypto/tls" - "log" - "net/http" - "strings" - "time" - - "github.com/NYTimes/gziphandler" - errors "github.com/go-openapi/errors" - runtime "github.com/go-openapi/runtime" - middleware "github.com/go-openapi/runtime/middleware" - "github.com/kubernetes-helm/monocular/src/api/data" - helmclient "github.com/kubernetes-helm/monocular/src/api/data/helm/client" - - "github.com/kubernetes-helm/monocular/src/api/config" - "github.com/kubernetes-helm/monocular/src/api/data/cache" - "github.com/kubernetes-helm/monocular/src/api/data/cache/charthelper" - "github.com/kubernetes-helm/monocular/src/api/handlers" - hcharts "github.com/kubernetes-helm/monocular/src/api/handlers/charts" - hreleases "github.com/kubernetes-helm/monocular/src/api/handlers/releases" - hrepos "github.com/kubernetes-helm/monocular/src/api/handlers/repos" - "github.com/kubernetes-helm/monocular/src/api/jobs" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/charts" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/releases" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations/repositories" - "github.com/rs/cors" -) - -// This file is safe to edit. Once it exists it will not be overwritten - -//go:generate swagger generate server --target ../pkg/swagger --name monocular --spec ../swagger-spec/swagger.yml - -func configureFlags(api *operations.MonocularAPI) { - // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } -} - -func configureAPI(api *operations.MonocularAPI) http.Handler { - conf, err := config.GetConfig() - if err != nil { - log.Fatalf("Can not load configuration %v\n", err) - } - - // configure the api here - if err := data.UpdateCache(conf.Repos); err != nil { - log.Fatalf("Can not configure repository cache %v\n", err) - } - - chartsImplementation := cache.NewCachedCharts() - // Run foreground repository refresh - chartsImplementation.Refresh() - // Setup background index refreshes - cacheRefreshInterval := conf.CacheRefreshInterval - if cacheRefreshInterval <= 0 { - cacheRefreshInterval = 3600 - } - freshness := time.Duration(cacheRefreshInterval) * time.Second - periodicRefresh := cache.NewRefreshChartsData(chartsImplementation, freshness, "refresh-charts", false) - toDo := []jobs.Periodic{periodicRefresh} - jobs.DoPeriodic(toDo) - - api.ServeError = errors.ServeError - helmClient := helmclient.NewHelmClient() - - // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) - // - // Example: - // s.api.Logger = log.Printf - - api.JSONConsumer = runtime.JSONConsumer() - api.JSONProducer = runtime.JSONProducer() - - // Releases - api.ReleasesGetAllReleasesHandler = releases.GetAllReleasesHandlerFunc(func(params releases.GetAllReleasesParams) middleware.Responder { - return hreleases.GetReleases(helmClient, params, conf.ReleasesEnabled) - }) - - api.ReleasesGetReleaseHandler = releases.GetReleaseHandlerFunc(func(params releases.GetReleaseParams) middleware.Responder { - return hreleases.GetRelease(helmClient, params, conf.ReleasesEnabled) - }) - - api.ReleasesCreateReleaseHandler = releases.CreateReleaseHandlerFunc(func(params releases.CreateReleaseParams) middleware.Responder { - return hreleases.CreateRelease(helmClient, params, chartsImplementation, conf.ReleasesEnabled) - }) - - api.ReleasesDeleteReleaseHandler = releases.DeleteReleaseHandlerFunc(func(params releases.DeleteReleaseParams) middleware.Responder { - return hreleases.DeleteRelease(helmClient, params, conf.ReleasesEnabled) - }) - - // Repos - api.RepositoriesGetAllReposHandler = repositories.GetAllReposHandlerFunc(func(params repositories.GetAllReposParams) middleware.Responder { - return hrepos.GetRepos(params) - }) - - api.RepositoriesGetRepoHandler = repositories.GetRepoHandlerFunc(func(params repositories.GetRepoParams) middleware.Responder { - return hrepos.GetRepo(params) - }) - - api.RepositoriesCreateRepoHandler = repositories.CreateRepoHandlerFunc(func(params repositories.CreateRepoParams) middleware.Responder { - return hrepos.CreateRepo(params, conf.ReleasesEnabled) - }) - - api.RepositoriesDeleteRepoHandler = repositories.DeleteRepoHandlerFunc(func(params repositories.DeleteRepoParams) middleware.Responder { - return hrepos.DeleteRepo(params, conf.ReleasesEnabled) - }) - - // Charts - api.ChartsSearchChartsHandler = charts.SearchChartsHandlerFunc(func(params charts.SearchChartsParams) middleware.Responder { - return hcharts.SearchCharts(params, chartsImplementation) - }) - - api.ChartsGetChartHandler = charts.GetChartHandlerFunc(func(params charts.GetChartParams) middleware.Responder { - return hcharts.GetChart(params, chartsImplementation) - }) - - api.ChartsGetChartVersionHandler = charts.GetChartVersionHandlerFunc(func(params charts.GetChartVersionParams) middleware.Responder { - return hcharts.GetChartVersion(params, chartsImplementation) - }) - - api.ChartsGetChartVersionsHandler = charts.GetChartVersionsHandlerFunc(func(params charts.GetChartVersionsParams) middleware.Responder { - return hcharts.GetChartVersions(params, chartsImplementation) - }) - - api.ChartsGetAllChartsHandler = charts.GetAllChartsHandlerFunc(func(params charts.GetAllChartsParams) middleware.Responder { - return hcharts.GetAllCharts(params, chartsImplementation) - }) - - api.ChartsGetChartsInRepoHandler = charts.GetChartsInRepoHandlerFunc(func(params charts.GetChartsInRepoParams) middleware.Responder { - return hcharts.GetChartsInRepo(params, chartsImplementation) - }) - - api.HealthzHandler = operations.HealthzHandlerFunc(func(params operations.HealthzParams) middleware.Responder { - return handlers.Healthz(params) - }) - - api.ServerShutdown = func() {} - - return setupGlobalMiddleware(api.Serve(setupMiddlewares)) -} - -// The TLS configuration before HTTPS server starts. -func configureTLS(tlsConfig *tls.Config) { - // Make all necessary changes to the TLS configuration here. -} - -// The middleware configuration is for the handler executors. These do not apply to the swagger.json document. -// The middleware executes after routing but before authentication, binding and validation -func setupMiddlewares(handler http.Handler) http.Handler { - return handler -} - -// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document. -// So this is a good place to plug in a panic handling middleware, logging and metrics -func setupGlobalMiddleware(handler http.Handler) http.Handler { - handler = setupStaticFilesMiddleware(handler) - handler = setupCorsMiddleware(handler) - handler = gziphandler.GzipHandler(handler) - return handler -} - -// This middleware serves the files existing under cache.DataDirBase -func setupStaticFilesMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Returns static files under /static - if strings.Index(r.URL.Path, "/assets/") == 0 { - w.Header().Set("Cache-Control", "public, max-age=7776000") - fs := http.FileServer(http.Dir(charthelper.DataDirBase())) - fs = http.StripPrefix("/assets/", fs) - fs.ServeHTTP(w, r) - } else { - // Fallbacks to chained hander - next.ServeHTTP(w, r) - } - }) -} - -func setupCorsMiddleware(handler http.Handler) http.Handler { - config, err := config.GetConfig() - - if err != nil { - log.Fatalf("Can not load configuration %v\n", err) - } - - c := cors.New(cors.Options{ - AllowedOrigins: config.Cors.AllowedOrigins, - // They need to be the same than the Access-Control-Request-Headers so it works - // on pre-flight requests - AllowedHeaders: config.Cors.AllowedHeaders, - AllowCredentials: true, - AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, - }) - - // Insert the middleware - handler = c.Handler(handler) - return handler -} diff --git a/src/api/swagger/restapi/doc.go b/src/api/swagger/restapi/doc.go deleted file mode 100755 index 4ea75b18a..000000000 --- a/src/api/swagger/restapi/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/*Package restapi Monocular - - Schemes: - http - Host: localhost - BasePath: / - Version: 0.0.1 - - Consumes: - - application/json - - - Produces: - - application/json - - -swagger:meta -*/ -package restapi diff --git a/src/api/swagger/restapi/embedded_spec.go b/src/api/swagger/restapi/embedded_spec.go deleted file mode 100755 index 5024754ed..000000000 --- a/src/api/swagger/restapi/embedded_spec.go +++ /dev/null @@ -1,13 +0,0 @@ -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import "encoding/json" - -// SwaggerJSON embedded version of the swagger document used at generation time -var SwaggerJSON json.RawMessage - -func init() { - SwaggerJSON = json.RawMessage([]byte{0x7b, 0xa, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x22, 0xa, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x2e, 0x30, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x6f, 0x6e, 0x6f, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x22, 0xa, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x7d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x62, 0x79, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x48, 0x65, 0x6c, 0x6d, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x20, 0x48, 0x65, 0x6c, 0x6d, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x31, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x64, 0x64, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x31, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x67, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x67, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x61, 0x67, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x32, 0x30, 0x30, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x75, 0x6e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x55, 0x52, 0x4c, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x41, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, 0x6c, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, 0x6c, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x41, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, 0x6c, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x72, 0x6c, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x61, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x63, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x55, 0x52, 0x4c, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x55, 0x52, 0x4c, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x65, 0x6c, 0x66, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x65, 0x6c, 0x66, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x3a, 0x20, 0x31, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x48, 0x65, 0x6c, 0x6d, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x5b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x64, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x49, 0x64, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x43, 0x68, 0x61, 0x72, 0x74, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x2e, 0x65, 0x3a, 0x20, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x64, 0x70, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x43, 0x68, 0x61, 0x72, 0x74, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x68, 0x61, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2c, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3a, 0x20, 0x7b, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x24, 0x72, 0x65, 0x66, 0x22, 0x3a, 0x20, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x22, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x20, 0x20, 0x7d, 0xa, 0x20, 0x20, 0x7d, 0xa, 0x7d}) -} diff --git a/src/api/swagger/restapi/server.go b/src/api/swagger/restapi/server.go deleted file mode 100755 index 63bfd6030..000000000 --- a/src/api/swagger/restapi/server.go +++ /dev/null @@ -1,272 +0,0 @@ -package restapi - -import ( - "crypto/tls" - "fmt" - "log" - "net" - "net/http" - "os" - "sync" - "time" - - "github.com/go-openapi/swag" - flags "github.com/jessevdk/go-flags" - graceful "github.com/tylerb/graceful" - - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" -) - -const ( - schemeHTTP = "http" - schemeHTTPS = "https" - schemeUnix = "unix" -) - -var defaultSchemes []string - -func init() { - defaultSchemes = []string{ - schemeHTTP, - } -} - -// NewServer creates a new api monocular server but does not configure it -func NewServer(api *operations.MonocularAPI) *Server { - s := new(Server) - s.api = api - return s -} - -// ConfigureAPI configures the API and handlers. Needs to be called before Serve -func (s *Server) ConfigureAPI() { - if s.api != nil { - s.handler = configureAPI(s.api) - } -} - -// ConfigureFlags configures the additional flags defined by the handlers. Needs to be called before the parser.Parse -func (s *Server) ConfigureFlags() { - if s.api != nil { - configureFlags(s.api) - } -} - -// Server for the monocular API -type Server struct { - EnabledListeners []string `long:"scheme" description:"the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec"` - - SocketPath flags.Filename `long:"socket-path" description:"the unix socket to listen on" default:"/var/run/monocular.sock"` - domainSocketL net.Listener - - Host string `long:"host" description:"the IP to listen on" default:"localhost" env:"HOST"` - Port int `long:"port" description:"the port to listen on for insecure connections, defaults to a random value" env:"PORT"` - httpServerL net.Listener - - TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"` - TLSPort int `long:"tls-port" description:"the port to listen on for secure connections, defaults to a random value" env:"TLS_PORT"` - TLSCertificate flags.Filename `long:"tls-certificate" description:"the certificate to use for secure connections" env:"TLS_CERTIFICATE"` - TLSCertificateKey flags.Filename `long:"tls-key" description:"the private key to use for secure conections" env:"TLS_PRIVATE_KEY"` - httpsServerL net.Listener - - api *operations.MonocularAPI - handler http.Handler - hasListeners bool -} - -// Logf logs message either via defined user logger or via system one if no user logger is defined. -func (s *Server) Logf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - } else { - log.Printf(f, args...) - } -} - -// Fatalf logs message either via defined user logger or via system one if no user logger is defined. -// Exits with non-zero status after printing -func (s *Server) Fatalf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - os.Exit(1) - } else { - log.Fatalf(f, args...) - } -} - -// SetAPI configures the server with the specified API. Needs to be called before Serve -func (s *Server) SetAPI(api *operations.MonocularAPI) { - if api == nil { - s.api = nil - s.handler = nil - return - } - - s.api = api - s.api.Logger = log.Printf - s.handler = configureAPI(api) -} - -func (s *Server) hasScheme(scheme string) bool { - schemes := s.EnabledListeners - if len(schemes) == 0 { - schemes = defaultSchemes - } - - for _, v := range schemes { - if v == scheme { - return true - } - } - return false -} - -// Serve the api -func (s *Server) Serve() (err error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return err - } - } - - var wg sync.WaitGroup - - if s.hasScheme(schemeUnix) { - domainSocket := &graceful.Server{Server: new(http.Server)} - domainSocket.Handler = s.handler - - wg.Add(1) - s.Logf("Serving monocular at unix://%s", s.SocketPath) - go func(l net.Listener) { - defer wg.Done() - if err := domainSocket.Serve(l); err != nil { - s.Fatalf("%v", err) - } - s.Logf("stopped serving monocular at unix://%s", s.SocketPath) - }(s.domainSocketL) - } - - if s.hasScheme(schemeHTTP) { - httpServer := &graceful.Server{Server: new(http.Server)} - httpServer.SetKeepAlivesEnabled(true) - httpServer.TCPKeepAlive = 3 * time.Minute - httpServer.Handler = s.handler - - wg.Add(1) - s.Logf("Serving monocular at http://%s", s.httpServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpServer.Serve(l); err != nil { - s.Fatalf("%v", err) - } - s.Logf("stopped serving monocular at http://%s", l.Addr()) - }(s.httpServerL) - } - - if s.hasScheme(schemeHTTPS) { - httpsServer := &graceful.Server{Server: new(http.Server)} - httpsServer.SetKeepAlivesEnabled(true) - httpsServer.TCPKeepAlive = 3 * time.Minute - httpsServer.Handler = s.handler - - httpsServer.TLSConfig = new(tls.Config) - httpsServer.TLSConfig.NextProtos = []string{"http/1.1"} - // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols - httpsServer.TLSConfig.MinVersion = tls.VersionTLS12 - httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1) - httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(string(s.TLSCertificate), string(s.TLSCertificateKey)) - - configureTLS(httpsServer.TLSConfig) - - if err != nil { - return err - } - - wg.Add(1) - s.Logf("Serving monocular at https://%s", s.httpsServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpsServer.Serve(l); err != nil { - s.Fatalf("%v", err) - } - s.Logf("stopped serving monocular at https://%s", l.Addr()) - }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig)) - } - - wg.Wait() - return nil -} - -// Listen creates the listeners for the server -func (s *Server) Listen() error { - if s.hasListeners { // already done this - return nil - } - - if s.hasScheme(schemeHTTPS) { // exit early on missing params - if s.TLSCertificate == "" { - if s.TLSCertificateKey == "" { - s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified") - } - s.Fatalf("the required flag `--tls-certificate` was not specified") - } - if s.TLSCertificateKey == "" { - s.Fatalf("the required flag `--tls-key` was not specified") - } - } - - if s.hasScheme(schemeUnix) { - domSockListener, err := net.Listen("unix", string(s.SocketPath)) - if err != nil { - return err - } - s.domainSocketL = domSockListener - } - - if s.hasScheme(schemeHTTP) { - listener, err := net.Listen("tcp", fmt.Sprintf("%s:%d", s.Host, s.Port)) - if err != nil { - return err - } - - h, p, err := swag.SplitHostPort(listener.Addr().String()) - if err != nil { - return err - } - s.Host = h - s.Port = p - s.httpServerL = listener - } - - if s.hasScheme(schemeHTTPS) { - if s.TLSHost == "" { - s.TLSHost = s.Host - } - tlsListener, err := net.Listen("tcp", fmt.Sprintf("%s:%d", s.TLSHost, s.TLSPort)) - if err != nil { - return err - } - - sh, sp, err := swag.SplitHostPort(tlsListener.Addr().String()) - if err != nil { - return err - } - s.TLSHost = sh - s.TLSPort = sp - s.httpsServerL = tlsListener - } - - s.hasListeners = true - return nil -} - -// Shutdown server and clean up resources -func (s *Server) Shutdown() error { - s.api.ServerShutdown() - return nil -} - -// GetHandler returns a handler useful for testing -func (s *Server) GetHandler() http.Handler { - return s.handler -} diff --git a/src/api/swagger/restapi/server_test.go b/src/api/swagger/restapi/server_test.go deleted file mode 100755 index 302fc7016..000000000 --- a/src/api/swagger/restapi/server_test.go +++ /dev/null @@ -1,222 +0,0 @@ -package restapi - -import ( - "fmt" - "log" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/arschles/assert" - "github.com/go-openapi/loads" - "github.com/kubernetes-helm/monocular/src/api/data" - "github.com/kubernetes-helm/monocular/src/api/data/cache" - "github.com/kubernetes-helm/monocular/src/api/data/helpers" - handlerscharts "github.com/kubernetes-helm/monocular/src/api/handlers/charts" - "github.com/kubernetes-helm/monocular/src/api/swagger/models" - "github.com/kubernetes-helm/monocular/src/api/swagger/restapi/operations" - "github.com/kubernetes-helm/monocular/src/api/testutil" -) - -const versionsRouteString = "versions" - -var chartsImplementation = getChartsImplementation() - -// tests the GET /healthz endpoint -func TestGetHealthz(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - resp, err := httpGet(srv, "healthz") - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") -} - -// tests the GET /{:apiVersion}/charts endpoint -func TestGetCharts(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - chartsImplementation.Refresh() - charts, err := chartsImplementation.All() - assert.NoErr(t, err) - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s")) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") - var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(resp.Body, &httpBody)) - assert.Equal(t, len(helpers.MakeChartResources(charts)), len(httpBody.Data), "number of charts returned") -} - -// tests the GET /{:apiVersion}/charts/{:repo} endpoint 200 response -func TestGetChartsInRepo200(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - chartsImplementation.Refresh() - charts, err := chartsImplementation.AllFromRepo(testutil.RepoName) - numCharts := len(helpers.MakeChartResources(charts)) - assert.NoErr(t, err) - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.RepoName)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") - var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(resp.Body, &httpBody)) - assert.Equal(t, numCharts, len(httpBody.Data), "number of charts returned") -} - -// tests the GET /{:apiVersion}/charts/{:repo} endpoint 404 response -func TestGetChartsInRepo404(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusNotFound, "response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(resp.Body, &httpBody)) - testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartResourceName+"s", httpBody) -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart} endpoint 200 response -func TestGetChartInRepo200(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - chartsImplementation.Refresh() - chart, err := chartsImplementation.ChartFromRepo(testutil.RepoName, testutil.ChartName) - assert.NoErr(t, err) - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") - httpBody := new(models.ResourceData) - assert.NoErr(t, testutil.ResourceDataFromJSON(resp.Body, httpBody)) - chartResource := helpers.MakeChartResource(chart) - testutil.AssertChartResourceBodyData(t, chartResource, httpBody) -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart} endpoint 404 response -func TestGetChartInRepo404(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo, testutil.ChartName)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusNotFound, "response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(resp.Body, &httpBody)) - testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartResourceName, httpBody) -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version endpoint 200 response -func TestGetChartVersion200(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - chartsImplementation.Refresh() - chart, err := chartsImplementation.ChartVersionFromRepo(testutil.RepoName, testutil.ChartName, testutil.ChartVersionString) - assert.NoErr(t, err) - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString, testutil.ChartVersionString)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") - httpBody := new(models.ResourceData) - assert.NoErr(t, testutil.ResourceDataFromJSON(resp.Body, httpBody)) - chartResource := helpers.MakeChartVersionResource(chart) - testutil.AssertChartVersionResourceBodyData(t, chartResource, httpBody) -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version endpoint 404 response -func TestGetChartVersion404(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString, "99.99.99")) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusNotFound, "response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(resp.Body, &httpBody)) - testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartVersionResourceName, httpBody) -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version endpoint 200 response -func TestGetChartVersions200(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - chartsImplementation.Refresh() - charts, err := chartsImplementation.ChartVersionsFromRepo(testutil.RepoName, testutil.ChartName) - assert.NoErr(t, err) - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.RepoName, testutil.ChartName, versionsRouteString)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusOK, "response code") - var httpBody models.ResourceArrayData - assert.NoErr(t, testutil.ResourceArrayDataFromJSON(resp.Body, &httpBody)) - assert.Equal(t, len(charts), len(httpBody.Data), "number of charts returned") -} - -// tests the GET /{:apiVersion}/charts/{:repo}/{:chart}/version endpoint 404 response -func TestGetChartVersions404(t *testing.T) { - defer teardownTestRepoCache() - srv, err := newServer() - assert.NoErr(t, err) - defer srv.Close() - resp, err := httpGet(srv, urlPath("v1", handlerscharts.ChartResourceName+"s", testutil.BogusRepo, testutil.ChartName, versionsRouteString)) - assert.NoErr(t, err) - defer resp.Body.Close() - assert.Equal(t, resp.StatusCode, http.StatusNotFound, "response code") - var httpBody models.Error - assert.NoErr(t, testutil.ErrorModelFromJSON(resp.Body, &httpBody)) - testutil.AssertErrBodyData(t, http.StatusNotFound, handlerscharts.ChartVersionResourceName, httpBody) -} - -func newServer() (*httptest.Server, error) { - swaggerSpec, err := loads.Analyzed(SwaggerJSON, "") - if err != nil { - return nil, err - } - api := operations.NewMonocularAPI(swaggerSpec) - return httptest.NewServer(configureAPI(api)), nil -} - -func urlPath(ver string, remainder ...string) string { - return fmt.Sprintf("%s/%s", ver, strings.Join(remainder, "/")) -} - -func httpGet(s *httptest.Server, route string) (*http.Response, error) { - return http.Get(s.URL + "/" + route) -} - -func getChartsImplementation() data.Charts { - chartsImplementation := cache.NewCachedCharts() - return chartsImplementation -} - -func teardownTestRepoCache() { - reposCollection, err := data.GetRepos() - if err != nil { - log.Fatal("could not get Repos collection ", err) - } - _, err = reposCollection.DeleteAll() - if err != nil { - log.Fatal("could not clear cache ", err) - } -}