diff --git a/console-config-migrator/README.md b/console-config-migrator/README.md new file mode 100644 index 00000000..29e0d3f9 --- /dev/null +++ b/console-config-migrator/README.md @@ -0,0 +1,11 @@ +# Configuration Migrator + +This directory hosts the source code for the Wasm module that converts Redpanda Console configurations from v2 to v3. The module implements the transformation rules required for migrating authentication settings, Kafka configurations (including schema registry and Admin API credentials), role bindings, and other properties. The Wasm module is integrated into the Redpanda documentation, allowing users to migrate their YAML configurations directly in their browser. + +## Building the Wasm Module + +To build the Wasm module manually: + +```shell +GOOS=js GOARCH=wasm go build -o ../src/static/console-config-migrator.wasm main.go +``` \ No newline at end of file diff --git a/console-config-migrator/go.mod b/console-config-migrator/go.mod new file mode 100644 index 00000000..42a309e0 --- /dev/null +++ b/console-config-migrator/go.mod @@ -0,0 +1,5 @@ +module console-config-converter + +go 1.22.3 + +require sigs.k8s.io/yaml v1.4.0 diff --git a/console-config-migrator/go.sum b/console-config-migrator/go.sum new file mode 100644 index 00000000..ea2896b4 --- /dev/null +++ b/console-config-migrator/go.sum @@ -0,0 +1,6 @@ +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/console-config-migrator/main.go b/console-config-migrator/main.go new file mode 100644 index 00000000..8da9d28e --- /dev/null +++ b/console-config-migrator/main.go @@ -0,0 +1,366 @@ +// +build js,wasm + +package main + +import ( + "fmt" + "log" + "syscall/js" + + "sigs.k8s.io/yaml" +) + +func main() { + // Recover from unexpected panics to avoid crashing the WASM module. + defer func() { + if r := recover(); r != nil { + log.Printf("Recovered from panic: %v", r) + } + }() + js.Global().Set("convertYAML", js.FuncOf(convertYAML)) + select {} +} + +// Convert transforms a Console v2 configuration into a v3 configuration. +func Convert(v2 map[string]interface{}) (map[string]interface{}, string, error) { + v3 := make(map[string]interface{}) + var warnings []string + + // Migrate authentication. + auth, warnAuth, err := migrateAuthentication(v2) + if err != nil { + return nil, "", fmt.Errorf("authentication migration: %w", err) + } + warnings = append(warnings, warnAuth...) + if auth != nil { + v3["authentication"] = auth + } else if authAlt, ok := v2["authentication"].(map[string]interface{}); ok { + v3["authentication"] = authAlt + } + + // Migrate Kafka settings (including schemaRegistry and serde). + kafka, warnKafka, err := migrateKafka(v2) + if err != nil { + return nil, "", fmt.Errorf("kafka migration: %w", err) + } + warnings = append(warnings, warnKafka...) + v3["kafka"] = kafka + + // Rename connect to kafkaConnect. + if connect, ok := v2["connect"]; ok { + v3["kafkaConnect"] = connect + } + + // Migrate console settings into serde. + serde, err := migrateConsole(v2) + if err != nil { + return nil, "", fmt.Errorf("console migration: %w", err) + } + v3["serde"] = serde + + // Migrate roleBindings. + roleBindings, warnRB, err := migrateRoleBindings(v2) + if err != nil { + return nil, "", fmt.Errorf("roleBindings migration: %w", err) + } + warnings = append(warnings, warnRB...) + if roleBindings != nil { + v3["authorization"] = map[string]interface{}{ + "roleBindings": roleBindings, + } + } + + // Migrate redpanda.adminApi credentials. + redpanda, err := migrateAdminAPI(v2) + if err != nil { + return nil, "", fmt.Errorf("adminApi migration: %w", err) + } + if redpanda != nil { + v3["redpanda"] = redpanda + } + + // Copy any remaining top-level fields. + copyRemainingFields(v2, v3) + + // Build warnings string as YAML comments. + var warningComments string + if len(warnings) > 0 { + warningComments = "# Conversion Warnings:\n" + for _, warn := range warnings { + warningComments += "# " + warn + "\n" + } + } + + return v3, warningComments, nil +} + +// migrateAuthentication handles the conversion of the login stanza. +func migrateAuthentication(v2 map[string]interface{}) (map[string]interface{}, []string, error) { + var warnings []string + var oidcCandidate map[string]interface{} + + if login, ok := v2["login"].(map[string]interface{}); ok { + auth := make(map[string]interface{}) + if jwt, ok := login["jwtSecret"]; ok { + auth["jwtSigningSecret"] = jwt + } + if sc, ok := login["useSecureCookies"]; ok { + auth["useSecureCookies"] = sc + } + if plain, ok := login["plain"].(map[string]interface{}); ok { + if enabled, ok := plain["enabled"].(bool); ok && enabled { + auth["basic"] = map[string]interface{}{"enabled": true} + } + } + // Check various OIDC provider blocks in priority order. + if oidc, ok := login["oidc"].(map[string]interface{}); ok { + if enabled, ok := oidc["enabled"].(bool); ok && enabled { + oidcCandidate = oidc + } + } else if google, ok := login["google"].(map[string]interface{}); ok { + if enabled, ok := google["enabled"].(bool); ok && enabled { + oidcCandidate = google + } + } else if okta, ok := login["okta"].(map[string]interface{}); ok { + if enabled, ok := okta["enabled"].(bool); ok && enabled { + oidcCandidate = okta + } + } else if azuread, ok := login["azureAd"].(map[string]interface{}); ok { + if enabled, ok := azuread["enabled"].(bool); ok && enabled { + oidcCandidate = azuread + } + } else if github, ok := login["github"].(map[string]interface{}); ok { + if enabled, ok := github["enabled"].(bool); ok && enabled { + oidcCandidate = github + } + } else if keycloak, ok := login["keycloak"].(map[string]interface{}); ok { + if enabled, ok := keycloak["enabled"].(bool); ok && enabled { + oidcCandidate = keycloak + } + } + if oidcCandidate != nil { + // Remove unsupported keys. + if _, exists := oidcCandidate["realm"]; exists { + delete(oidcCandidate, "realm") + warnings = append(warnings, "Removed the 'realm' option. OIDC groups are not supported in v3. Create roles in Redpanda instead.") + } + if _, exists := oidcCandidate["directory"]; exists { + delete(oidcCandidate, "directory") + warnings = append(warnings, "Removed the 'directory' option. OIDC groups are not supported in v3. Create roles in Redpanda instead.") + } + auth["oidc"] = oidcCandidate + } + return auth, warnings, nil + } + // If login is not defined, return nil. + return nil, warnings, nil +} + +// migrateKafka handles the migration of Kafka settings and schemaRegistry. +func migrateKafka(v2 map[string]interface{}) (map[string]interface{}, []string, error) { + var warnings []string + kafka := make(map[string]interface{}) + kafka["sasl"] = map[string]interface{}{ + "enabled": true, + "impersonateUser": true, + } + if oldKafka, ok := v2["kafka"].(map[string]interface{}); ok { + // Process schemaRegistry. + if srRaw, ok := oldKafka["schemaRegistry"].(map[string]interface{}); ok { + newSR := make(map[string]interface{}) + authBlock := make(map[string]interface{}) + if username, ok := srRaw["username"]; ok { + if password, ok := srRaw["password"]; ok { + authBlock["basic"] = map[string]interface{}{ + "username": username, + "password": password, + } + } + } + if token, ok := srRaw["bearerToken"]; ok { + authBlock["bearerToken"] = token + } + if _, ok := srRaw["username"]; ok { + authBlock["impersonateUser"] = false + } else { + authBlock["impersonateUser"] = true + } + delete(srRaw, "username") + delete(srRaw, "password") + delete(srRaw, "bearerToken") + if len(authBlock) > 0 { + newSR["authentication"] = authBlock + } + for k, v := range srRaw { + newSR[k] = v + } + kafka["schemaRegistry"] = newSR + } + + // Migrate serde settings. + serde := make(map[string]interface{}) + if proto, ok := oldKafka["protobuf"]; ok { + serde["protobuf"] = proto + } + if cbor, ok := oldKafka["cbor"]; ok { + serde["cbor"] = cbor + } + if mp, ok := oldKafka["messagePack"]; ok { + serde["messagePack"] = mp + } + // Copy remaining kafka fields. + for key, val := range oldKafka { + if key == "schemaRegistry" || key == "protobuf" || key == "cbor" || key == "messagePack" { + continue + } + kafka[key] = val + } + } + return kafka, warnings, nil +} + +// migrateConsole moves console.maxDeserializationPayloadSize into a serde.console block. +func migrateConsole(v2 map[string]interface{}) (map[string]interface{}, error) { + serde := make(map[string]interface{}) + if console, ok := v2["console"].(map[string]interface{}); ok { + if maxPayload, ok := console["maxDeserializationPayloadSize"]; ok { + serde["console"] = map[string]interface{}{ + "maxDeserializationPayloadSize": maxPayload, + } + } + } + return serde, nil +} + +// migrateRoleBindings converts v2 roleBindings into v3 authorization.roleBindings. +func migrateRoleBindings(v2 map[string]interface{}) ([]interface{}, []string, error) { + var warnings []string + var newRBs []interface{} + if rbs, ok := v2["roleBindings"].([]interface{}); ok { + for _, rb := range rbs { + if rbMap, ok := rb.(map[string]interface{}); ok { + newRB := make(map[string]interface{}) + if roleName, ok := rbMap["roleName"]; ok { + newRB["roleName"] = roleName + } + if subjects, ok := rbMap["subjects"].([]interface{}); ok { + var newUsers []interface{} + for _, subj := range subjects { + if subjMap, ok := subj.(map[string]interface{}); ok { + // Only include subjects of kind "user". + if kindVal, ok := subjMap["kind"].(string); !ok || kindVal != "user" { + if roleName, ok := rbMap["roleName"].(string); ok { + warnings = append(warnings, fmt.Sprintf("Removed group subject from role binding '%s'. Groups are not supported in v3.", roleName)) + } else { + warnings = append(warnings, "Removed a group subject from a role binding. Groups are not supported in v3.") + } + continue + } + user := make(map[string]interface{}) + // Map provider: "Plain" becomes "basic", all others default to "oidc". + if prov, ok := subjMap["provider"].(string); ok { + if prov == "Plain" { + user["loginType"] = "basic" + } else { + user["loginType"] = "oidc" + } + } else { + user["loginType"] = "oidc" + } + if name, ok := subjMap["name"]; ok { + user["name"] = name + } + newUsers = append(newUsers, user) + } + } + if len(newUsers) > 0 { + newRB["users"] = newUsers + } + } + newRBs = append(newRBs, newRB) + } + } + } + return newRBs, warnings, nil +} + +// migrateAdminAPI migrates redpanda.adminApi credentials. +func migrateAdminAPI(v2 map[string]interface{}) (map[string]interface{}, error) { + if redpandaRaw, ok := v2["redpanda"].(map[string]interface{}); ok { + if adminApiRaw, ok := redpandaRaw["adminApi"].(map[string]interface{}); ok { + newAdminApi := make(map[string]interface{}) + authBlock := make(map[string]interface{}) + if username, ok := adminApiRaw["username"]; ok { + if password, ok := adminApiRaw["password"]; ok { + authBlock["basic"] = map[string]interface{}{ + "username": username, + "password": password, + } + } + } + if _, ok := adminApiRaw["username"]; ok { + authBlock["impersonateUser"] = false + } else { + authBlock["impersonateUser"] = true + } + delete(adminApiRaw, "username") + delete(adminApiRaw, "password") + if len(authBlock) > 0 { + newAdminApi["authentication"] = authBlock + } + for k, v := range adminApiRaw { + newAdminApi[k] = v + } + return redpandaRaw, nil + } + } + return nil, nil +} + +// copyRemainingFields copies any top-level fields from v2 to v3 that weren't already migrated. +func copyRemainingFields(v2, v3 map[string]interface{}) { + skip := map[string]bool{ + "login": true, + "authentication": true, + "kafka": true, + "connect": true, + "roleBindings": true, + "enterprise": true, + "console": true, + } + for key, val := range v2 { + if skip[key] { + continue + } + if _, exists := v3[key]; !exists { + v3[key] = val + } + } +} + +func convertYAML(this js.Value, args []js.Value) interface{} { + if len(args) < 1 { + return js.ValueOf("Error: no input provided") + } + input := args[0].String() + var v2 map[string]interface{} + if err := yaml.Unmarshal([]byte(input), &v2); err != nil { + return js.ValueOf(fmt.Sprintf("Error unmarshaling input: %v", err)) + } + + converted, warnings, err := Convert(v2) + if err != nil { + return js.ValueOf(fmt.Sprintf("Error converting: %v", err)) + } + + out, err := yaml.Marshal(converted) + if err != nil { + return js.ValueOf(fmt.Sprintf("Error marshaling output: %v", err)) + } + + finalOutput := string(out) + if warnings != "" { + finalOutput = warnings + "\n" + finalOutput + } + return js.ValueOf(finalOutput) +} diff --git a/preview-src/cloud-api.adoc b/preview-src/cloud-api.adoc index ec368dc2..04c8174b 100644 --- a/preview-src/cloud-api.adoc +++ b/preview-src/cloud-api.adoc @@ -1,4 +1,4 @@ = API :page-layout: swagger :page-try-it: true -:page-api-spec-url: https://docs.redpanda.com/api/_attachments/cloud-api.yaml \ No newline at end of file +:page-api-spec-url: https://docs.redpanda.com/api/_attachments/cloud-dataplane-api.yaml \ No newline at end of file diff --git a/preview-src/console-migrator.adoc b/preview-src/console-migrator.adoc new file mode 100644 index 00000000..03bf6799 --- /dev/null +++ b/preview-src/console-migrator.adoc @@ -0,0 +1,27 @@ += Redpanda Console Migration Tool +:page-console-config-migrator: true +:page-role: enable-ace-editor + +The Redpanda Console migration tool attempts to convert your Redpanda Console configuration from v2 to v3 format. + +:caution-caption: Disclaimer + +CAUTION: This tool is provided as a convenience and may not cover all migration scenarios. Always review the output to ensure that your configuration is correct. + +Paste your v2 YAML configuration into the text box and click *Migrate* to generate the updated configuration. + +++++ +
+ +
+
+++++ + +Review the output and make any necessary adjustments before deploying the new configuration. + +++++ +
+ +
+
+++++ \ No newline at end of file diff --git a/preview-src/index.adoc b/preview-src/index.adoc index 4bbbfcd6..1afc11e8 100644 --- a/preview-src/index.adoc +++ b/preview-src/index.adoc @@ -38,6 +38,10 @@ link:./playground.html[Playground] link:./search.html[Search] +== Console migration tool + +link:./console-migrator.html[Console Migration Tool] + == Tables |=== diff --git a/src/css/ace-editor.css b/src/css/ace-editor.css new file mode 100644 index 00000000..190aa530 --- /dev/null +++ b/src/css/ace-editor.css @@ -0,0 +1,57 @@ +.ace-github .ace_gutter { + background: var(--pre-background); + color: var(--code-font-color); + z-index: 1; +} + +.ace_gutter-layer { + border-right: 1px solid !important; +} + +.ace_active-line, +.ace-github .ace_gutter-active-line { + background: rgba(255, 255, 255, 0.4) !important; +} + +.ace_gutter-cell.ace_error { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==) !important; + background-repeat: no-repeat !important; + background-position: 2px center !important; +} + +.ace_cursor { + color: var(--pre-font-color) !important; +} + +.doc .ace_editor { + font-family: var(--monospace-font-family); + font-size: var(--body-font-size); + background-color: var(--pre-background) !important; + color: var(--code-font-color) !important; + min-height: 250px; + padding: 10px; + overflow-y: auto; + border-radius: 5px; + position: relative; + border: 1px solid rgb(204, 204, 204); + resize: both; + min-width: 200px; +} + +.ace_selection { + background: rgba(135, 206, 250, 0.9) !important; +} + +.ace_dark > .ace_mobile-menu { + background: var(--pre-background); + color: var(--code-font-color); +} + +.ace_dark > .ace_mobile-menu > span { + display: flex; + gap: 5px; +} + +.ace-github .ace_comment { + color: var(--body-font-color); +} diff --git a/src/css/bloblang-playground.css b/src/css/bloblang-playground.css index f247cfc6..d0fbcc65 100644 --- a/src/css/bloblang-playground.css +++ b/src/css/bloblang-playground.css @@ -226,49 +226,6 @@ html[data-theme=dark] .bloblang-playground .button:hover { padding: 0; } -.ace-github .ace_gutter { - background: var(--pre-background); - color: var(--code-font-color); - z-index: 1; -} - -.ace_gutter-layer { - border-right: 1px solid !important; -} - -.ace_active-line, -.ace-github .ace_gutter-active-line { - background: rgba(255, 255, 255, 0.4) !important; -} - -.ace_gutter-cell.ace_error { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==) !important; - background-repeat: no-repeat !important; - background-position: 2px center !important; -} - -.ace_cursor { - color: var(--pre-font-color) !important; -} - -.ace_editor { - font-family: var(--monospace-font-family); -} - -.ace_selection { - background: rgba(135, 206, 250, 0.9) !important; -} - -.ace_dark > .ace_mobile-menu { - background: var(--pre-background); - color: var(--code-font-color); -} - -.ace_dark > .ace_mobile-menu > span { - display: flex; - gap: 5px; -} - .bloblang-snippet { display: flex; flex-direction: column; diff --git a/src/css/doc.css b/src/css/doc.css index 0b15ca3b..966098bc 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -1147,6 +1147,36 @@ details[open] > summary { margin-top: 150px; } +.doc .button-bar { + display: flex; + gap: 10px; + margin-top: 10px; + margin-bottom: 10px; + flex-wrap: wrap; +} + +.doc .doc-button { + border: 1px solid rgba(128, 152, 249, 1); + padding: 6px 8px; + background: rgba(68, 76, 231, 0); + border-radius: 6px; + color: var(--body-font-color); + margin-top: 0; + cursor: pointer; + font-size: 14px; + transition: 'background 0.3s'; +} + +.doc .doc-button:hover { + background: rgba(68, 76, 231, 0.06); + color: var(--body-font-color); +} + +html[data-theme=dark] .doc .doc-button:hover { + background: rgba(68, 76, 231); + color: var(--body-font-color); +} + .button-arrow-up:hover::after { background-image: url(../img/arrow-cta-hover.svg); top: -6px; diff --git a/src/css/expandable-images.css b/src/css/expandable-images.css index b64f65a3..068a676d 100644 --- a/src/css/expandable-images.css +++ b/src/css/expandable-images.css @@ -43,6 +43,7 @@ svg .node.clickable span { .modal-overlay.active { display: flex; + flex-direction: column; } .modal-scroll-container { @@ -65,7 +66,7 @@ svg .node.clickable span { font-size: smaller !important; } -.modal-close { +.modal-overlay .modal-close { position: absolute; top: 1rem; right: 1rem; diff --git a/src/css/modal.css b/src/css/modal.css new file mode 100644 index 00000000..15f41be7 --- /dev/null +++ b/src/css/modal.css @@ -0,0 +1,95 @@ +.modal { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.8); + display: none; + align-items: center; + justify-content: center; + overflow: auto; + padding: 1rem; + z-index: 9999; +} + +.modal.active { + display: flex; + flex-direction: column; +} + +.modal-content { + background: var(--body-background); + color: var(--body-font-color); + padding: 20px; + border-radius: 5px; + max-width: 90vw; + max-height: 90vh; + overflow-y: auto; + position: relative; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); +} + +.modal-content h2 { + margin-top: 0 !important; +} + +.modal-content .button-bar { + display: flex; + gap: 10px; + margin-top: 10px; + margin-bottom: 10px; + flex-wrap: wrap; +} + +.modal-content button, +.modal-content button[type=submit]:not(.aa-SubmitButton) { + padding: 6px 8px; + background: rgba(68, 76, 231, 0); + border: none; + border-radius: 6px; + color: var(--body-font-color); + margin-top: 0; + cursor: pointer; + font-size: 14px; + transition: 'background 0.3s'; +} + +.modal-content button[type=submit]:not(.aa-SubmitButton) { + background-color: #4474e7; + color: #ffffff; +} + +.modal-content button[type=submit]:not(.aa-SubmitButton):hover { + background-color: #365bd6; + transform: translateY(-2px); + color: #ffffff; +} + +.modal-content button { + border: 1px solid rgba(128, 152, 249, 1); + border-radius: 6px; +} + +.modal-content button:hover { + background: rgba(68, 76, 231, 0.06); + color: var(--body-font-color); +} + +html[data-theme=dark] .modal-content button:hover { + background: rgba(68, 76, 231); + color: var(--body-font-color); +} + +.close, +.close-modal { + position: sticky; + top: 1rem; + left: 100%; + background: transparent; + border: none; + font-size: 2rem; + color: var(--body-font-color); + cursor: pointer; + z-index: 10000; +} diff --git a/src/css/site.css b/src/css/site.css index 8ecd77e1..7c1a6bec 100644 --- a/src/css/site.css +++ b/src/css/site.css @@ -5,6 +5,8 @@ @import "base.css"; @import "bloblang-playground.css"; @import "body.css"; +@import "ace-editor.css"; +@import "modal.css"; @import "home.css"; @import "mermaid.css"; @import "component-home.css"; diff --git a/src/js/vendor/ace/mode-yaml.js b/src/js/vendor/ace/mode-yaml.js new file mode 100644 index 00000000..7254a129 --- /dev/null +++ b/src/js/vendor/ace/mode-yaml.js @@ -0,0 +1,7 @@ +define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,"");var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,"").length,s=parseInt(/\d+[\s+-]*$/.exec(r));return s?(i+=s-1,this.next="mlString"):this.next="mlStringPre",n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&uc){var m=e.getLine(h).length;return new s(c,f,h,m)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/),f=r[i]==="-";if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u=0&&t.row=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/lib/event_emitter",[],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?tthis.end.column?1:0:ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.rown)var i={row:n+1,column:0};else if(this.start.rowthis.row)return;var t=u(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)},e.prototype.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();s.prototype.$insertRight=!1,r.implement(s.prototype,i),t.Anchor=s}),define("ace/document",[],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(){function e(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new u(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n65535?2:1}}),define("ace/worker/mirror",[],function(e,t,n){"use strict";var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){var r=e.data;if(r[0].start)t.applyDeltas(r);else for(var i=0;i=t.$lines.length)throw u=new Error("Invalid delta"),u.data={path:s.$path,linesLength:t.$lines.length,start:o.start,end:o.end},u;t.applyDelta(o,!0)}if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),define("ace/mode/yaml/yaml-lint",[],function(e,t,n){function i(t,n,i){typeof t=="function"&&(i=t,n=["require","exports","module"],t=r.module.id),typeof t!="string"&&(i=n,n=t,t=r.module.id),i||(i=n,n=[]);var s=typeof i=="function"?i.apply(r.module,n.map(function(t){return r[t]||e(t)})):i;s!=undefined&&(r.module.exports=s)}var r={require:e,exports:t,module:n};t=undefined,n=undefined,i.amd=!0,function(e){if(typeof t=="object"&&typeof n!="undefined")n.exports=e();else if(typeof i=="function"&&i.amd)i([],e);else{var r;typeof window!="undefined"?r=window:typeof global!="undefined"?r=global:typeof self!="undefined"?r=self:r=this,r.lint=e()}}(function(){var t,n,r;return function(){function t(n,r,i){function s(u,a){if(!r[u]){if(!n[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[u]={exports:{}};n[u][0].call(c.exports,function(e){var t=n[u][1][e];return s(t||e)},c,c.exports,t,n,r,i)}return r[u].exports}for(var o=typeof e=="function"&&e,u=0;u=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==65279||e>=65536&&e<=1114111}function R(e){return q(e)&&e!==65279&&e!==b&&e!==N&&e!==C&&e!==L&&e!==O&&e!==E&&e!==d}function U(e){return q(e)&&e!==65279&&!I(e)&&e!==w&&e!==x&&e!==E&&e!==b&&e!==N&&e!==C&&e!==L&&e!==O&&e!==d&&e!==m&&e!==y&&e!==h&&e!==A&&e!==S&&e!==g&&e!==p&&e!==v&&e!==T&&e!==k}function z(e){var t=/^\n* /;return t.test(e)}function K(e,t,n,r,i){var s,o,u=!1,a=!1,f=r!==-1,c=-1,h=U(e.charCodeAt(0))&&!I(e.charCodeAt(e.length-1));if(t)for(s=0;sr&&e[c+1]!==" ",c=s);else if(!q(o))return J;h=h&&R(o)}a=a||f&&s-c-1>r&&e[c+1]!==" "}return!u&&!a?h&&!i(e)?W:X:n>9&&z(e)?J:a?$:V}function Q(e,t,n,r){e.dump=function(){function a(t){return F(e,t)}if(t.length===0)return"''";if(!e.noCompatMode&&_.indexOf(t)!==-1)return"'"+t+"'";var s=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),u=r||e.flowLevel>-1&&n>=e.flowLevel;switch(K(t,u,e.indent,o,a)){case W:return t;case X:return"'"+t.replace(/'/g,"''")+"'";case V:return"|"+G(t,e.indent)+Y(B(t,s));case $:return">"+G(t,e.indent)+Y(B(Z(t,o),s));case J:return'"'+tt(t,o)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function G(e,t){var n=z(e)?String(t):"",r=e[e.length-1]==="\n",i=r&&(e[e.length-2]==="\n"||e==="\n"),s=i?"+":r?"":"-";return n+s+"\n"}function Y(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function Z(e,t){var n=/(\n+)([^\n]*)/g,r=function(){var r=e.indexOf("\n");return r=r!==-1?r:e.length,n.lastIndex=r,et(e.slice(0,r),t)}(),i=e[0]==="\n"||e[0]===" ",s,o;while(o=n.exec(e)){var u=o[1],a=o[2];s=a[0]===" ",r+=u+(!i&&!s&&a!==""?"\n":"")+et(a,t),i=s}return r}function et(e,t){if(e===""||e[0]===" ")return e;var n=/ [^ ]/g,r,i=0,s,o=0,u=0,a="";while(r=n.exec(e))u=r.index,u-i>t&&(s=o>i?o:u,a+="\n"+e.slice(i,s),i=s+1),o=u;return a+="\n",e.length-i>t&&o>i?a+=e.slice(i,o)+"\n"+e.slice(o+1):a+=e.slice(i),a.slice(1)}function tt(e){var t="",n,r,i;for(var s=0;s=55296&&n<=56319){r=e.charCodeAt(s+1);if(r>=56320&&r<=57343){t+=P((n-55296)*1024+r-56320+65536),s++;continue}}i=M[n],t+=!i&&q(n)?e[s]:i||P(n)}return t}function nt(e,t,n){var r="",i=e.tag,s,o;for(s=0,o=n.length;s1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!ut(e,t,f,!1,!1))continue;l+=e.dump,r+=l}e.tag=i,e.dump="{"+r+"}"}function st(e,t,n,r){var s="",o=e.tag,u=Object.keys(n),a,f,c,h,p,d;if(e.sortKeys===!0)u.sort();else if(typeof e.sortKeys=="function")u.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(a=0,f=u.length;a1024,p&&(e.dump&&l===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=j(e,t));if(!ut(e,t+1,h,!0,p))continue;e.dump&&l===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,s+=d}e.tag=o,e.dump=s||"{}"}function ot(e,t,n){var r,s,o,f,l,c;s=n?e.explicitTypes:e.implicitTypes;for(o=0,f=s.length;o tag resolver accepts not "'+c+'" style');r=l.represent[c](t,c)}e.dump=r}return!0}}return!1}function ut(e,t,n,r,s,o){e.tag=null,e.dump=n,ot(e,n,!1)||ot(e,n,!0);var a=u.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var f=a==="[object Object]"||a==="[object Array]",l,c;f&&(l=e.duplicates.indexOf(n),c=l!==-1);if(e.tag!==null&&e.tag!=="?"||c||e.indent!==2&&t>0)s=!1;if(c&&e.usedDuplicates[l])e.dump="*ref_"+l;else{f&&c&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0);if(a==="[object Object]")r&&Object.keys(e.dump).length!==0?(st(e,t,e.dump,s),c&&(e.dump="&ref_"+l+e.dump)):(it(e,t,e.dump),c&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]"){var h=e.noArrayIndent&&t>0?t-1:t;r&&e.dump.length!==0?(rt(e,h,e.dump,s),c&&(e.dump="&ref_"+l+e.dump)):(nt(e,h,e.dump),c&&(e.dump="&ref_"+l+" "+e.dump))}else{if(a!=="[object String]"){if(e.skipInvalid)return!1;throw new i("unacceptable kind of an object to dump "+a)}e.tag!=="?"&&Q(e,e.dump,t,o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function at(e,t){var n=[],r=[],i,s;ft(e,n,r);for(i=0,s=r.length;i=48&&e<=57?e-48:(t=e|32,t>=97&&t<=102?t-97+10:-1)}function C(e){return e===120?2:e===117?4:e===85?8:0}function k(e){return e>=48&&e<=57?e-48:-1}function L(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116?" ":e===9?" ":e===110?"\n":e===118?"\x0b":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\u0085":e===95?"\u00a0":e===76?"\u2028":e===80?"\u2029":""}function A(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function D(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||u,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function P(e,t){return new i(t,new s(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function H(e,t){throw P(e,t)}function B(e,t){e.onWarning&&e.onWarning.call(null,P(e,t))}function F(e,t,n,r){var i,s,o,u;if(t=32&&o<=1114111||H(e,"expected valid JSON character");else m.test(u)&&H(e,"the stream contains non-printable characters");e.result+=u}}function I(e,t,n,i){var s,o,u,f;r.isObject(n)||H(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(n);for(u=0,f=s.length;u1&&(e.result+=r.repeat("\n",t-1))}function X(e,t,n){var r,i,s,o,u,a,f,l,c=e.kind,h=e.result,p;p=e.input.charCodeAt(e.position);if(x(p)||T(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96)return!1;if(p===63||p===45){i=e.input.charCodeAt(e.position+1);if(x(i)||n&&T(i))return!1}e.kind="scalar",e.result="",s=o=e.position,u=!1;while(p!==0){if(p===58){i=e.input.charCodeAt(e.position+1);if(x(i)||n&&T(i))break}else if(p===35){r=e.input.charCodeAt(e.position-1);if(x(r))break}else{if(e.position===e.lineStart&&z(e)||n&&T(p))break;if(E(p)){a=e.line,f=e.lineStart,l=e.lineIndent,U(e,!1,-1);if(e.lineIndent>=t){u=!0,p=e.input.charCodeAt(e.position);continue}e.position=o,e.line=a,e.lineStart=f,e.lineIndent=l;break}}u&&(F(e,s,o,!1),W(e,e.line-a),s=o=e.position,u=!1),S(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return F(e,s,o,!1),e.result?!0:(e.kind=c,e.result=h,!1)}function V(e,t){var n,r,i;n=e.input.charCodeAt(e.position);if(n!==39)return!1;e.kind="scalar",e.result="",e.position++,r=i=e.position;while((n=e.input.charCodeAt(e.position))!==0)if(n===39){F(e,r,e.position,!0),n=e.input.charCodeAt(++e.position);if(n!==39)return!0;r=e.position,e.position++,i=e.position}else E(n)?(F(e,r,i,!0),W(e,U(e,!1,t)),r=i=e.position):e.position===e.lineStart&&z(e)?H(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);H(e,"unexpected end of the stream within a single quoted scalar")}function $(e,t){var n,r,i,s,o,u;u=e.input.charCodeAt(e.position);if(u!==34)return!1;e.kind="scalar",e.result="",e.position++,n=r=e.position;while((u=e.input.charCodeAt(e.position))!==0){if(u===34)return F(e,n,e.position,!0),e.position++,!0;if(u===92){F(e,n,e.position,!0),u=e.input.charCodeAt(++e.position);if(E(u))U(e,!1,t);else if(u<256&&O[u])e.result+=M[u],e.position++;else if((o=C(u))>0){i=o,s=0;for(;i>0;i--)u=e.input.charCodeAt(++e.position),(o=N(u))>=0?s=(s<<4)+o:H(e,"expected hexadecimal character");e.result+=A(s),e.position++}else H(e,"unknown escape sequence");n=r=e.position}else E(u)?(F(e,n,r,!0),W(e,U(e,!1,t)),n=r=e.position):e.position===e.lineStart&&z(e)?H(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}H(e,"unexpected end of the stream within a double quoted scalar")}function J(e,t){var n=!0,r,i=e.tag,s,o=e.anchor,u,a,l,c,h,p={},d,v,m,g;g=e.input.charCodeAt(e.position);if(g===91)a=93,h=!1,s=[];else{if(g!==123)return!1;a=125,h=!0,s={}}e.anchor!==null&&(e.anchorMap[e.anchor]=s),g=e.input.charCodeAt(++e.position);while(g!==0){U(e,!0,t),g=e.input.charCodeAt(e.position);if(g===a)return e.position++,e.tag=i,e.anchor=o,e.kind=h?"mapping":"sequence",e.result=s,!0;n||H(e,"missed comma between flow collection entries"),v=d=m=null,l=c=!1,g===63&&(u=e.input.charCodeAt(e.position+1),x(u)&&(l=c=!0,e.position++,U(e,!0,t))),r=e.line,tt(e,t,f,!1,!0),v=e.tag,d=e.result,U(e,!0,t),g=e.input.charCodeAt(e.position),(c||e.line===r)&&g===58&&(l=!0,g=e.input.charCodeAt(++e.position),U(e,!0,t),tt(e,t,f,!1,!0),m=e.result),h?q(e,s,p,v,d,m):l?s.push(q(e,null,p,v,d,m)):s.push(d),U(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(n=!0,g=e.input.charCodeAt(++e.position)):n=!1}H(e,"unexpected end of the stream within a flow collection")}function K(e,t){var n,i,s=p,o=!1,u=!1,a=t,f=0,l=!1,c,h;h=e.input.charCodeAt(e.position);if(h===124)i=!1;else{if(h!==62)return!1;i=!0}e.kind="scalar",e.result="";while(h!==0){h=e.input.charCodeAt(++e.position);if(h===43||h===45)p===s?s=h===43?v:d:H(e,"repeat of a chomping mode identifier");else{if(!((c=k(h))>=0))break;c===0?H(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?H(e,"repeat of an indentation width identifier"):(a=t+c-1,u=!0)}}if(S(h)){do h=e.input.charCodeAt(++e.position);while(S(h));if(h===35)do h=e.input.charCodeAt(++e.position);while(!E(h)&&h!==0)}while(h!==0){R(e),e.lineIndent=0,h=e.input.charCodeAt(e.position);while((!u||e.lineIndenta&&(a=e.lineIndent);if(E(h)){f++;continue}if(e.lineIndentt)&&a!==0)H(e,"bad indentation of a sequence entry");else if(e.lineIndentt)tt(e,t,h,!0,i)&&(m?d=e.result:v=e.result),m||(q(e,f,c,p,d,v,s,o),p=d=v=null),U(e,!0,-1),y=e.input.charCodeAt(e.position);if(e.lineIndent>t&&y!==0)H(e,"bad indentation of a mapping entry");else if(e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndentt?p=1:e.lineIndent===t?p=0:e.lineIndent tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result)?(e.result=y.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):H(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):H(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||v}function nt(e){var t=e.position,n,r,i,s=!1,o;e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){U(e,!0,-1),o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37)break;s=!0,o=e.input.charCodeAt(++e.position),n=e.position;while(o!==0&&!x(o))o=e.input.charCodeAt(++e.position);r=e.input.slice(n,e.position),i=[],r.length<1&&H(e,"directive name must not be less than one character in length");while(o!==0){while(S(o))o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!E(o));break}if(E(o))break;n=e.position;while(o!==0&&!x(o))o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&R(e),a.call(j,r)?j[r](e,r,i):B(e,'unknown document directive "'+r+'"')}U(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,U(e,!0,-1)):s&&H(e,"directives end mark is expected"),tt(e,e.lineIndent-1,h,!1,!0),U(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(t,e.position))&&B(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result);if(e.position===e.lineStart&&z(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,U(e,!0,-1));return}if(!(e.position0&&"\0\r\n\u0085\u2028\u2029".indexOf(this.buffer.charAt(s-1))===-1){s-=1;if(this.position-s>n/2-1){i=" ... ",s+=5;break}}o="",u=this.position;while(un/2-1){o=" ... ",u-=5;break}}return a=this.buffer.slice(s,u),r.repeat(" ",t)+i+a+o+"\n"+r.repeat(" ",t+this.position-s+i.length)+"^"},i.prototype.toString=function s(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=i},{"./common":5}],10:[function(e,t,n){"use strict";function o(e,t,n){var r=[];return e.include.forEach(function(e){n=o(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return r.indexOf(t)===-1})}function u(){function r(t){e[t.kind][t.tag]=e.fallback[t.tag]=t}var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,n;for(t=0,n=arguments.length;t64)continue;if(t<0)return!1;r+=6}return r%8===0}function f(e){var t,n,i=e.replace(/[\r\n=]/g,""),s=i.length,o=u,a=0,f=[];for(t=0;t>16&255),f.push(a>>8&255),f.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return n=s%4*6,n===0?(f.push(a>>16&255),f.push(a>>8&255),f.push(a&255)):n===18?(f.push(a>>10&255),f.push(a>>2&255)):n===12&&f.push(a>>4&255),r?r.from?r.from(f):new r(f):f}function l(e){var t="",n=0,r,i,s=e.length,o=u;for(r=0;r>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}function c(e){return r&&r.isBuffer(e)}var r;try{var i=e;r=i("buffer").Buffer}catch(s){}var o=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:a,construct:f,predicate:c,represent:l})},{"../type":16}],18:[function(e,t,n){"use strict";function i(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function s(e){return e==="true"||e==="True"||e==="TRUE"}function o(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var r=e("../type");t.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:s,predicate:o,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":16}],19:[function(e,t,n){"use strict";function o(e){return e===null?!1:!s.test(e)||e[e.length-1]==="_"?!1:!0}function u(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function f(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n}function l(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||r.isNegativeZero(e))}var r=e("../common"),i=e("../type"),s=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;t.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:u,predicate:l,represent:f,defaultStyle:"lowercase"})},{"../common":5,"../type":16}],20:[function(e,t,n){"use strict";function s(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function o(e){return e>=48&&e<=55}function u(e){return e>=48&&e<=57}function a(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;i=e[n];if(i==="-"||i==="+")i=e[++n];if(i==="0"){if(n+1===t)return!0;i=e[++n];if(i==="b"){n++;for(;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":5,"../type":16}],21:[function(e,t,n){"use strict";function u(e){if(e===null)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return n.type!=="Program"||n.body.length!==1||n.body[0].type!=="ExpressionStatement"||n.body[0].expression.type!=="ArrowFunctionExpression"&&n.body[0].expression.type!=="FunctionExpression"?!1:!0}catch(i){return!1}}function a(e){return function(){}}function f(e){return e.toString()}function l(e){return Object.prototype.toString.call(e)==="[object Function]"}var r;try{var i=e;r=i("esprima")}catch(s){typeof window!="undefined"&&(r=window.esprima)}var o=e("../../type");t.exports=new o("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:u,construct:a,predicate:l,represent:f})},{"../../type":16}],22:[function(e,t,n){"use strict";function i(e){if(e===null)return!1;if(e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if(t[0]==="/"){n&&(r=n[1]);if(r.length>3)return!1;if(t[t.length-r.length-1]!=="/")return!1}return!0}function s(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function u(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var r=e("../../type");t.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:s,predicate:u,represent:o})},{"../../type":16}],23:[function(e,t,n){"use strict";function i(){return!0}function s(){return undefined}function o(){return""}function u(e){return typeof e=="undefined"}var r=e("../../type");t.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:s,predicate:u,represent:o})},{"../../type":16}],24:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})},{"../type":16}],25:[function(e,t,n){"use strict";function i(e){return e==="<<"||e===null}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":16}],26:[function(e,t,n){"use strict";function i(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function s(){return null}function o(e){return e===null}var r=e("../type");t.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:s,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":16}],27:[function(e,t,n){"use strict";function o(e){if(e===null)return!0;var t=[],n,r,o,u,a,f=e;for(n=0,r=f.length;n-1}function It(e,t){var n=this.__data__,r=tn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qt(e){var t=-1,n=e==null?0:e.length;this.clear();while(++t1?n[i-1]:undefined,o=i>2?n[2]:undefined;s=e.length>3&&typeof s=="function"?(i--,s):undefined,o&&Cn(n[0],n[1],o)&&(s=i<3?undefined:s,i=1),t=Object(t);while(++r-1&&e%1==0&&e0){if(++t>=s)return arguments[0]}else t=0;return e.apply(undefined,arguments)}}function Hn(e){if(e!=null){try{return ot.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Bn(e,t){return e===t||e!==e&&t!==t}function In(e){return e!=null&&zn(e.length)&&!Un(e)}function qn(e){return Xn(e)&&In(e)}function Un(e){if(!Wn(e))return!1;var t=sn(e);return t==d||t==v||t==l||t==w}function zn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u}function Wn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Xn(e){return e!=null&&typeof e=="object"}function Vn(e){if(!Xn(e)||sn(e)!=b)return!1;var t=mt(e);if(t===null)return!0;var n=ut.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ot.call(n)==lt}function Jn(e){return yn(e,Kn(e))}function Kn(e){return In(e)?Yt(e,!0):fn(e)}function Gn(e){return function(){return e}}function Yn(e){return e}function Zn(){return!1}var r=200,i="__lodash_hash_undefined__",s=800,o=16,u=9007199254740991,a="[object Arguments]",f="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Function]",v="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Null]",b="[object Object]",w="[object Proxy]",E="[object RegExp]",S="[object Set]",x="[object String]",T="[object Undefined]",N="[object WeakMap]",C="[object ArrayBuffer]",k="[object DataView]",L="[object Float32Array]",A="[object Float64Array]",O="[object Int8Array]",M="[object Int16Array]",_="[object Int32Array]",D="[object Uint8Array]",P="[object Uint8ClampedArray]",H="[object Uint16Array]",B="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,q={};q[L]=q[A]=q[O]=q[M]=q[_]=q[D]=q[P]=q[H]=q[B]=!0,q[a]=q[f]=q[C]=q[c]=q[k]=q[h]=q[p]=q[d]=q[m]=q[g]=q[b]=q[E]=q[S]=q[x]=q[N]=!1;var R=typeof e=="object"&&e&&e.Object===Object&&e,U=typeof self=="object"&&self&&self.Object===Object&&self,z=R||U||Function("return this")(),W=typeof n=="object"&&n&&!n.nodeType&&n,X=W&&typeof t=="object"&&t&&!t.nodeType&&t,V=X&&X.exports===W,$=V&&R.process,J=function(){try{return $&&$.binding&&$.binding("util")}catch(e){}}(),K=J&&J.isTypedArray,nt=Array.prototype,rt=Function.prototype,it=Object.prototype,st=z["__core-js_shared__"],ot=rt.toString,ut=it.hasOwnProperty,at=function(){var e=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ft=it.toString,lt=ot.call(Object),ct=RegExp("^"+ot.call(ut).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=V?z.Buffer:undefined,pt=z.Symbol,dt=z.Uint8Array,vt=ht?ht.allocUnsafe:undefined,mt=et(Object.getPrototypeOf,Object),gt=Object.create,yt=it.propertyIsEnumerable,bt=nt.splice,wt=pt?pt.toStringTag:undefined,Et=function(){try{var e=Sn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),St=ht?ht.isBuffer:undefined,xt=Math.max,Tt=Date.now,Nt=Sn(z,"Map"),Ct=Sn(Object,"create"),kt=function(){function e(){}return function(t){if(!Wn(t))return{};if(gt)return gt(t);e.prototype=t;var n=new e;return e.prototype=undefined,n}}();Lt.prototype.clear=At,Lt.prototype["delete"]=Ot,Lt.prototype.get=Mt,Lt.prototype.has=_t,Lt.prototype.set=Dt,Pt.prototype.clear=Ht,Pt.prototype["delete"]=Bt,Pt.prototype.get=jt,Pt.prototype.has=Ft,Pt.prototype.set=It,qt.prototype.clear=Rt,qt.prototype["delete"]=Ut,qt.prototype.get=zt,qt.prototype.has=Wt,qt.prototype.set=Xt,Vt.prototype.clear=$t,Vt.prototype["delete"]=Jt,Vt.prototype.get=Kt,Vt.prototype.has=Qt,Vt.prototype.set=Gt;var rn=wn(),pn=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:Gn(t),writable:!0})}:Yn,Dn=Pn(pn),jn=on(function(){return arguments}())?on:function(e){return Xn(e)&&ut.call(e,"callee")&&!yt.call(e,"callee")},Fn=Array.isArray,Rn=St||Zn,$n=K?Y(K):an,Qn=bn(function(e,t,n){ln(e,t,n)});t.exports=Qn}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}]},{},[2])(2)})}),define("ace/mode/yaml_worker",[],function(e,t){"use strict";var n=e("../lib/oop"),r=e("../worker/mirror").Mirror,i=e("./yaml/yaml-lint").lint,s=t.YamlWorker=function(e){r.call(this,e),this.setTimeout(500),this.setOptions()};n.inherits(s,r),function(){this.setOptions=function(){this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){n.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.onUpdate=function(){var e=this,t=this.doc.getValue(),n=[];i(t,{},function(t){if(!t){e.sender.emit("annotate",n);return}var r=!!t.mark;n.push({row:r?t.mark.line:0,column:r?t.mark.column:0,text:t.reason,type:"error",raw:t}),e.sender.emit("annotate",n)})}}.call(s.prototype)}) \ No newline at end of file diff --git a/src/partials/article.hbs b/src/partials/article.hbs index 903e3b6c..ae80d87c 100644 --- a/src/partials/article.hbs +++ b/src/partials/article.hbs @@ -43,6 +43,9 @@ }); {{/if}} +{{#if page.attributes.console-config-migrator}} +{{> console-config-migrator}} +{{/if}} {{#if (eq page.attributes.role 'home')}} {{> home}} {{{page.contents}}} diff --git a/src/partials/console-config-migrator.hbs b/src/partials/console-config-migrator.hbs new file mode 100644 index 00000000..468efc59 --- /dev/null +++ b/src/partials/console-config-migrator.hbs @@ -0,0 +1,59 @@ +{{! Usage: Include this partial in any article or page where you want to provide a migration tool for Redpanda Console configuration. }} +{{! }} +{{! --> }} + diff --git a/src/partials/head-scripts.hbs b/src/partials/head-scripts.hbs index 7e179063..3f3042f3 100644 --- a/src/partials/head-scripts.hbs +++ b/src/partials/head-scripts.hbs @@ -30,12 +30,13 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= -{{#if (or (eq page.attributes.role 'bloblang-playground')(eq page.attributes.role 'bloblang-snippets'))}} +{{#if (or (eq page.attributes.role 'bloblang-playground')(eq page.attributes.role 'bloblang-snippets') (eq page.attributes.role 'enable-ace-editor'))}} + {{/if}}