├── .babelrc
├── min-markdown.jpg
├── .gitmodules
├── .gitignore
├── ext.json
├── dist
├── sn-codemirror-search
│ ├── package.json
│ ├── dialog
│ │ ├── dialog.css
│ │ └── dialog.js
│ ├── search.js
│ └── searchcursor.js
└── dist.css
├── index.html
├── README.md
├── package.json
├── Gruntfile.js
├── src
├── main.js
└── main.scss
├── vendor
├── addon
│ └── modes
│ │ └── overlay.js
├── mark-selection.js
└── modes
│ ├── gfm
│ └── gfm.js
│ └── markdown
│ └── markdown.js
└── LICENSE
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [ "@babel/preset-env"],
3 | }
4 |
--------------------------------------------------------------------------------
/min-markdown.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/standardnotes/minimal-markdown-editor/HEAD/min-markdown.jpg
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "vendor/CodeMirror-search"]
2 | path = vendor/CodeMirror-search
3 | url = git@github.com:mobitar/CodeMirror-search.git
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | dist/lib.js
4 | dist/app.js
5 | dist/app.js.map
6 | dist/dist.css.map
7 | dist/dist.js.map
8 | dist/app.css
9 | dist/app.css.map
10 |
11 | .DS_Store
12 |
13 | .sass-cache
14 |
--------------------------------------------------------------------------------
/ext.json:
--------------------------------------------------------------------------------
1 | {
2 | "identifier": "org.yourdomain.my-extension",
3 | "name": "Minimal Markdown Editor",
4 | "content_type": "SN|Component",
5 | "area": "editor-editor",
6 | "version": "1.0.0",
7 | "url": "http://localhost:8005/"
8 | }
--------------------------------------------------------------------------------
/dist/sn-codemirror-search/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sn-codemirror-search",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "search.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/mobitar/CodeMirror-search.git"
12 | },
13 | "author": "",
14 | "bugs": {
15 | "url": "https://github.com/mobitar/CodeMirror-search/issues"
16 | },
17 | "homepage": "https://github.com/mobitar/CodeMirror-search#readme"
18 | }
19 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Minimal Markdown Editor
2 |
3 | A minimal Markdown editor with inline style support. Derived from [CodeMirror](https://github.com/codemirror/codemirror).
4 |
5 | 
6 |
7 | ## Setup
8 |
9 | *Note for Windows and Linux users: remove `fsevents` from `package.json`*
10 |
11 | 1. `npm i`
12 |
13 | 1. `grunt`
14 |
15 | 1. https://docs.standardnotes.org/extensions/local-setup/
16 |
17 | ## Support
18 |
19 | Please open a new issue and the Standard Notes team will take a look as soon as we can. For more information on editors, refer to the following link:
20 |
21 | - Standard Notes Help: [What are editors?](https://standardnotes.org/help/77/what-are-editors)
22 |
23 | ## License
24 |
25 | [GNU AGPL v3.0](https://choosealicense.com/licenses/agpl-3.0/)
26 |
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sn-minimal-markdown-editor",
3 | "version": "1.3.9",
4 | "description": "A minimal Markdown editor for Standard Notes.",
5 | "main": "dist/dist.js",
6 | "author": "Standard Notes ",
7 | "scripts": {
8 | "prepublish": "npm run build",
9 | "build": "grunt"
10 | },
11 | "dependencies": {
12 | "sn-codemirror-search": "1.0.0"
13 | },
14 | "resolutions": {
15 | "**/**/node-gyp": "5.0.0"
16 | },
17 | "devDependencies": {
18 | "@babel/core": "^7.11.1",
19 | "@babel/preset-env": "^7.11.0",
20 | "@standardnotes/component-relay": "2.2.0",
21 | "babel-cli": "^6.26.0",
22 | "codemirror": "^5.56.0",
23 | "grunt": "^1.2.1",
24 | "grunt-babel": "^8.0.0",
25 | "grunt-browserify": "^5.3.0",
26 | "grunt-contrib-concat": "^1.0.1",
27 | "grunt-contrib-copy": "^1.0.0",
28 | "grunt-contrib-sass": "^1.0.0",
29 | "grunt-contrib-watch": "^1.1.0",
30 | "grunt-newer": "^1.3.0",
31 | "sn-stylekit": "2.1.0"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/dist/sn-codemirror-search/dialog/dialog.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-dialog {
2 | position: absolute;
3 | left: 0; right: 0;
4 | background: var(--sn-stylekit-contrast-background-color);
5 | z-index: 15;
6 | padding: .3em .8em;
7 | overflow: hidden;
8 | color: inherit;
9 | }
10 |
11 | .CodeMirror-dialog-top {
12 | border-bottom: 1px solid var(--sn-stylekit-border-color);
13 | top: 0;
14 | }
15 |
16 | .CodeMirror-dialog-bottom {
17 | border-top: 1px solid var(--sn-stylekit-border-color);
18 | bottom: 0;
19 | }
20 |
21 | .CodeMirror-search-label {
22 | font-size: var(--sn-stylekit-base-font-size);
23 | font-weight: bold;
24 | }
25 |
26 | .CodeMirror-search-hint {
27 | font-size: var(--sn-stylekit-base-font-size);
28 | display: none;
29 | }
30 |
31 | .CodeMirror-search-field {
32 | width: 65% !important;
33 | }
34 |
35 | .CodeMirror-dialog input {
36 | border: none;
37 | outline: none;
38 | background: transparent;
39 | color: var(--sn-stylekit-contrast-foreground-color);
40 | font-size: var(--sn-stylekit-base-font-size);
41 | font-family: monospace;
42 | }
43 |
44 | .CodeMirror-dialog button {
45 | font-size: 70%;
46 | }
47 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function (grunt) {
2 |
3 | grunt.initConfig({
4 |
5 | watch: {
6 | js: {
7 | files: ['src/**/*.js'],
8 | tasks: ['concat:app', 'babel', 'browserify', 'concat:lib', 'concat:dist'],
9 | options: {
10 | spawn: false,
11 | },
12 | },
13 | css: {
14 | files: ['src/main.scss'],
15 | tasks: ['sass', 'concat:css'],
16 | options: {
17 | spawn: false,
18 | },
19 | }
20 | },
21 |
22 | sass: {
23 | dist: {
24 | options: {
25 | style: 'expanded',
26 | sourceMap: false
27 | },
28 | files: {
29 | 'dist/app.css': 'src/main.scss'
30 | }
31 | }
32 | },
33 |
34 | babel: {
35 | options: {
36 | sourceMap: true,
37 | presets: ['@babel/preset-env']
38 | },
39 | app: {
40 | files: {
41 | 'dist/app.js': ['dist/app.js']
42 | }
43 | }
44 | },
45 |
46 | browserify: {
47 | dist: {
48 | files: {
49 | 'dist/app.js': 'dist/app.js'
50 | }
51 | }
52 | },
53 |
54 | concat: {
55 | options: {
56 | separator: ';',
57 | },
58 |
59 | app: {
60 | src: [
61 | 'src/**/*.js',
62 | ],
63 | dest: 'dist/app.js',
64 | },
65 |
66 | lib: {
67 | src: [
68 | 'node_modules/codemirror/lib/codemirror.js',
69 | 'node_modules/@standardnotes/component-relay/dist/dist.js',
70 | 'vendor/modes/markdown/markdown.js',
71 | 'vendor/addon/modes/overlay.js',
72 | 'vendor/modes/gfm/gfm.js',
73 | 'vendor/mark-selection.js'
74 | ],
75 | dest: 'dist/lib.js',
76 | },
77 |
78 | dist: {
79 | src: ['dist/lib.js', 'dist/app.js'],
80 | dest: 'dist/dist.js',
81 | },
82 |
83 | css: {
84 | options: {
85 | separator: '',
86 | },
87 | src: ['node_modules/codemirror/lib/codemirror.css', 'node_modules/sn-stylekit/dist/stylekit.css', 'dist/app.css'],
88 | dest: 'dist/dist.css',
89 | }
90 | },
91 | copy: {
92 | main: {
93 | files: [
94 | { expand: true, cwd: 'node_modules/', src: ['sn-codemirror-search/**'], dest: 'dist/' },
95 | ],
96 | },
97 | },
98 | });
99 |
100 | grunt.loadNpmTasks('grunt-newer');
101 | grunt.loadNpmTasks('grunt-contrib-watch');
102 | grunt.loadNpmTasks('grunt-babel');
103 | grunt.loadNpmTasks('grunt-browserify');
104 | grunt.loadNpmTasks('grunt-contrib-concat');
105 | grunt.loadNpmTasks('grunt-contrib-sass');
106 | grunt.loadNpmTasks('grunt-contrib-copy');
107 |
108 | grunt.registerTask('default', ['concat:app', 'babel', 'browserify', 'concat:lib', 'concat:dist', 'sass', 'concat:css', 'copy']);
109 | };
110 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function (event) {
2 |
3 | let componentRelay;
4 | let workingNote, clientData;
5 | let lastValue, lastUUID;
6 | let editor;
7 | let ignoreTextChange = false;
8 | let initialLoad = true;
9 |
10 | function loadComponentRelay() {
11 | const initialPermissions = [{ name: "stream-context-item" }]
12 | componentRelay = new ComponentRelay({
13 | initialPermissions,
14 | targetWindow: window,
15 | onReady: function () {
16 | const platform = componentRelay.platform;
17 | if (platform) {
18 | document.body.classList.add(platform);
19 | }
20 |
21 | loadEditor();
22 |
23 | // only use CodeMirror selection color if we're not on mobile.
24 | editor.setOption("styleSelectedText", !componentRelay.isMobile);
25 | }
26 | });
27 |
28 | componentRelay.streamContextItem((note) => {
29 | onReceivedNote(note);
30 | });
31 | }
32 |
33 | function saveNote() {
34 | if (workingNote) {
35 | // Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time
36 | // you modify it in the presave block, it may not be the same object anymore, so the presave values will not be applied to
37 | // the right object, and it will save incorrectly.
38 | let note = workingNote;
39 |
40 | componentRelay.saveItemWithPresave(note, () => {
41 | lastValue = editor.getValue();
42 | note.content.text = lastValue;
43 | note.clientData = clientData;
44 |
45 | // clear previews
46 | note.content.preview_plain = null;
47 | note.content.preview_html = null;
48 | });
49 | }
50 | }
51 |
52 | function onReceivedNote(note) {
53 | if (note.uuid !== lastUUID) {
54 | // Note changed, reset last values
55 | lastValue = null;
56 | initialLoad = true;
57 | lastUUID = note.uuid;
58 | }
59 |
60 | workingNote = note;
61 |
62 | // Only update UI on non-metadata updates.
63 | if (note.isMetadataUpdate) {
64 | return;
65 | }
66 |
67 | clientData = note.clientData;
68 |
69 | if (editor) {
70 | if (note.content.text !== lastValue) {
71 | ignoreTextChange = true;
72 | editor.getDoc().setValue(workingNote.content.text);
73 | ignoreTextChange = false;
74 | }
75 |
76 | if (initialLoad) {
77 | initialLoad = false;
78 | editor.getDoc().clearHistory();
79 | }
80 |
81 | editor.setOption(
82 | "spellcheck",
83 | workingNote.content.spellcheck
84 | );
85 | }
86 | }
87 |
88 | function loadEditor() {
89 | editor = CodeMirror.fromTextArea(document.getElementById("code"), {
90 | mode: "gfm",
91 | lineWrapping: true,
92 | extraKeys: { "Alt-F": "findPersistent" },
93 | inputStyle: getInputStyleForEnvironment()
94 | });
95 | editor.setSize(undefined, "100%");
96 |
97 | editor.on("change", function () {
98 | if (ignoreTextChange) { return; }
99 | saveNote();
100 | });
101 | }
102 |
103 | function getInputStyleForEnvironment() {
104 | const environment = componentRelay.environment ?? 'web';
105 | return environment === 'mobile' ? 'textarea' : 'contenteditable';
106 | }
107 |
108 | loadComponentRelay();
109 | });
110 |
--------------------------------------------------------------------------------
/vendor/addon/modes/overlay.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Utility function that allows modes to be combined. The mode given
5 | // as the base argument takes care of most of the normal mode
6 | // functionality, but a second (typically simple) mode is used, which
7 | // can override the style of text. Both modes get to parse all of the
8 | // text, but when both assign a non-null style to a piece of code, the
9 | // overlay wins, unless the combine argument was true and not overridden,
10 | // or state.overlay.combineTokens was true, in which case the styles are
11 | // combined.
12 |
13 | (function(mod) {
14 | if (typeof exports == "object" && typeof module == "object") // CommonJS
15 | mod(require("../../lib/codemirror"));
16 | else if (typeof define == "function" && define.amd) // AMD
17 | define(["../../lib/codemirror"], mod);
18 | else // Plain browser env
19 | mod(CodeMirror);
20 | })(function(CodeMirror) {
21 | "use strict";
22 |
23 | CodeMirror.overlayMode = function(base, overlay, combine) {
24 | return {
25 | startState: function() {
26 | return {
27 | base: CodeMirror.startState(base),
28 | overlay: CodeMirror.startState(overlay),
29 | basePos: 0, baseCur: null,
30 | overlayPos: 0, overlayCur: null,
31 | streamSeen: null
32 | };
33 | },
34 | copyState: function(state) {
35 | return {
36 | base: CodeMirror.copyState(base, state.base),
37 | overlay: CodeMirror.copyState(overlay, state.overlay),
38 | basePos: state.basePos, baseCur: null,
39 | overlayPos: state.overlayPos, overlayCur: null
40 | };
41 | },
42 |
43 | token: function(stream, state) {
44 | if (stream != state.streamSeen ||
45 | Math.min(state.basePos, state.overlayPos) < stream.start) {
46 | state.streamSeen = stream;
47 | state.basePos = state.overlayPos = stream.start;
48 | }
49 |
50 | if (stream.start == state.basePos) {
51 | state.baseCur = base.token(stream, state.base);
52 | state.basePos = stream.pos;
53 | }
54 | if (stream.start == state.overlayPos) {
55 | stream.pos = stream.start;
56 | state.overlayCur = overlay.token(stream, state.overlay);
57 | state.overlayPos = stream.pos;
58 | }
59 | stream.pos = Math.min(state.basePos, state.overlayPos);
60 |
61 | // state.overlay.combineTokens always takes precedence over combine,
62 | // unless set to null
63 | if (state.overlayCur == null) return state.baseCur;
64 | else if (state.baseCur != null &&
65 | state.overlay.combineTokens ||
66 | combine && state.overlay.combineTokens == null)
67 | return state.baseCur + " " + state.overlayCur;
68 | else return state.overlayCur;
69 | },
70 |
71 | indent: base.indent && function(state, textAfter, line) {
72 | return base.indent(state.base, textAfter, line);
73 | },
74 | electricChars: base.electricChars,
75 |
76 | innerMode: function(state) { return {state: state.base, mode: base}; },
77 |
78 | blankLine: function(state) {
79 | var baseToken, overlayToken;
80 | if (base.blankLine) baseToken = base.blankLine(state.base);
81 | if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay);
82 |
83 | return overlayToken == null ?
84 | baseToken :
85 | (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken);
86 | }
87 | };
88 | };
89 |
90 | });
91 |
--------------------------------------------------------------------------------
/src/main.scss:
--------------------------------------------------------------------------------
1 | body,
2 | html {
3 | font-family: sans-serif;
4 | font-size: var(--sn-stylekit-base-font-size);
5 | height: 100%;
6 | margin: 0;
7 | background-color: transparent;
8 | }
9 |
10 | * {
11 | // To prevent gray flash when focusing input on mobile Safari
12 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
13 | }
14 |
15 | #wrapper {
16 | display: flex;
17 | flex-direction: column;
18 | position: relative;
19 | height: 100%;
20 | overflow: hidden;
21 | // padding-right: 20px;
22 | }
23 |
24 | .CodeMirror-scroll {
25 | padding: 8px;
26 | }
27 |
28 | .CodeMirror {
29 | background-color: var(--sn-stylekit-editor-background-color) !important;
30 | color: var(--sn-stylekit-editor-foreground-color) !important;
31 | border: 0 !important;
32 | font-family: sans-serif;
33 |
34 | -webkit-overflow-scrolling: touch;
35 |
36 | flex: 1 1 auto;
37 | height: 100%;
38 | resize: none;
39 | font-size: var(--sn-stylekit-font-size-editor);
40 | padding: 0;
41 |
42 | .CodeMirror-code .cm-comment {
43 | background: var(--sn-stylekit-contrast-background-color);
44 | color: var(--sn-stylekit-info-color);
45 | font-family: Consolas, monaco, "Ubuntu Mono", courier, monospace !important;
46 | font-size: 90%; // font-family makes font look a bit big
47 |
48 | &.CodeMirror-selectedtext {
49 | color: var(--sn-stylekit-info-contrast-color) !important;
50 | background: var(--sn-stylekit-info-color) !important;
51 | }
52 | }
53 |
54 | .cm-header {
55 | color: var(--sn-stylekit-editor-foreground-color);
56 |
57 | &.CodeMirror-selectedtext {
58 | color: var(--sn-stylekit-info-contrast-color) !important;
59 | background: var(--sn-stylekit-info-color) !important;
60 | }
61 | }
62 |
63 | // Faded Markdown syntax
64 | .cm-formatting-header,
65 | .cm-formatting-strong,
66 | .cm-formatting-em {
67 | opacity: 0.2;
68 | }
69 |
70 | .cm-variable-2, .cm-variable-3 {
71 | color: var(--sn-stylekit-editor-foreground-color) !important;
72 |
73 | &.CodeMirror-selectedtext {
74 | color: var(--sn-stylekit-info-contrast-color) !important;
75 | background: transparent;
76 | }
77 | }
78 | .cm-variable-3 {
79 | color: var(--sn-stylekit-editor-foreground-color) !important;
80 |
81 | &.CodeMirror-selectedtext {
82 | color: var(--sn-stylekit-info-contrast-color) !important;
83 | background: transparent;
84 | }
85 | }
86 |
87 | .cm-link,
88 | .cm-string {
89 | color: var(--sn-stylekit-info-color) !important;
90 |
91 | &.CodeMirror-selectedtext {
92 | color: var(--sn-stylekit-info-contrast-color) !important;
93 | background: var(--sn-stylekit-info-color) !important;
94 | }
95 | }
96 |
97 | .CodeMirror-linenumber {
98 | color: gray !important;
99 | }
100 | }
101 |
102 | .CodeMirror-cursor {
103 | border-color: var(--sn-stylekit-editor-foreground-color);
104 | }
105 |
106 | .CodeMirror-selected {
107 | background: var(--sn-stylekit-info-color) !important;
108 | }
109 |
110 | .CodeMirror-selectedtext {
111 | color: var(--sn-stylekit-info-contrast-color) !important;
112 | background: var(--sn-stylekit-info-color) !important;
113 | }
114 |
115 | .CodeMirror-gutters {
116 | background-color: var(--sn-stylekit-background-color) !important;
117 | color: var(--sn-stylekit-editor-foreground-color) !important;
118 | border-color: var(--sn-stylekit-border-color) !important;
119 | }
120 |
121 | .cm-header-1 {
122 | font-size: 150%;
123 | }
124 | .cm-header-2 {
125 | font-size: 130%;
126 | }
127 | .cm-header-3 {
128 | font-size: 120%;
129 | }
130 | .cm-header-4 {
131 | font-size: 110%;
132 | }
133 | .cm-header-5 {
134 | font-size: 100%;
135 | }
136 | .cm-header-6 {
137 | font-size: 90%;
138 | }
139 |
140 | .CodeMirror .cm-quote {
141 | color: var(--sn-stylekit-foreground-color);
142 | opacity: 0.6;
143 | }
144 |
145 | .cm-s-default .cm-variable-3, .cm-s-default .cm-type {
146 | color: var(--sn-stylekit-success-color) !important;
147 | }
148 |
149 | .CodeMirror .cm-link, .CodeMirror .cm-string, .CodeMirror .cm-keyword {
150 | color: var(--sn-stylekit-info-color);
151 | }
152 |
--------------------------------------------------------------------------------
/vendor/mark-selection.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Because sometimes you need to mark the selected *text*.
5 | //
6 | // Adds an option 'styleSelectedText' which, when enabled, gives
7 | // selected text the CSS class given as option value, or
8 | // "CodeMirror-selectedtext" when the value is not a string.
9 |
10 | (function(mod) {
11 | if (typeof exports == "object" && typeof module == "object") // CommonJS
12 | mod(require("../../lib/codemirror"));
13 | else if (typeof define == "function" && define.amd) // AMD
14 | define(["../../lib/codemirror"], mod);
15 | else // Plain browser env
16 | mod(CodeMirror);
17 | })(function(CodeMirror) {
18 | "use strict";
19 |
20 | CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) {
21 | var prev = old && old != CodeMirror.Init;
22 | if (val && !prev) {
23 | cm.state.markedSelection = [];
24 | cm.state.markedSelectionStyle = typeof val == "string" ? val : "CodeMirror-selectedtext";
25 | reset(cm);
26 | cm.on("cursorActivity", onCursorActivity);
27 | cm.on("change", onChange);
28 | } else if (!val && prev) {
29 | cm.off("cursorActivity", onCursorActivity);
30 | cm.off("change", onChange);
31 | clear(cm);
32 | cm.state.markedSelection = cm.state.markedSelectionStyle = null;
33 | }
34 | });
35 |
36 | function onCursorActivity(cm) {
37 | if (cm.state.markedSelection)
38 | cm.operation(function() { update(cm); });
39 | }
40 |
41 | function onChange(cm) {
42 | if (cm.state.markedSelection && cm.state.markedSelection.length)
43 | cm.operation(function() { clear(cm); });
44 | }
45 |
46 | var CHUNK_SIZE = 8;
47 | var Pos = CodeMirror.Pos;
48 | var cmp = CodeMirror.cmpPos;
49 |
50 | function coverRange(cm, from, to, addAt) {
51 | if (cmp(from, to) == 0) return;
52 | var array = cm.state.markedSelection;
53 | var cls = cm.state.markedSelectionStyle;
54 | for (var line = from.line;;) {
55 | var start = line == from.line ? from : Pos(line, 0);
56 | var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;
57 | var end = atEnd ? to : Pos(endLine, 0);
58 | var mark = cm.markText(start, end, {className: cls});
59 | if (addAt == null) array.push(mark);
60 | else array.splice(addAt++, 0, mark);
61 | if (atEnd) break;
62 | line = endLine;
63 | }
64 | }
65 |
66 | function clear(cm) {
67 | var array = cm.state.markedSelection;
68 | for (var i = 0; i < array.length; ++i) array[i].clear();
69 | array.length = 0;
70 | }
71 |
72 | function reset(cm) {
73 | clear(cm);
74 | var ranges = cm.listSelections();
75 | for (var i = 0; i < ranges.length; i++)
76 | coverRange(cm, ranges[i].from(), ranges[i].to());
77 | }
78 |
79 | function update(cm) {
80 | if (!cm.somethingSelected()) return clear(cm);
81 | if (cm.listSelections().length > 1) return reset(cm);
82 |
83 | var from = cm.getCursor("start"), to = cm.getCursor("end");
84 |
85 | var array = cm.state.markedSelection;
86 | if (!array.length) return coverRange(cm, from, to);
87 |
88 | var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();
89 | if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE ||
90 | cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)
91 | return reset(cm);
92 |
93 | while (cmp(from, coverStart.from) > 0) {
94 | array.shift().clear();
95 | coverStart = array[0].find();
96 | }
97 | if (cmp(from, coverStart.from) < 0) {
98 | if (coverStart.to.line - from.line < CHUNK_SIZE) {
99 | array.shift().clear();
100 | coverRange(cm, from, coverStart.to, 0);
101 | } else {
102 | coverRange(cm, from, coverStart.from, 0);
103 | }
104 | }
105 |
106 | while (cmp(to, coverEnd.to) < 0) {
107 | array.pop().clear();
108 | coverEnd = array[array.length - 1].find();
109 | }
110 | if (cmp(to, coverEnd.to) > 0) {
111 | if (to.line - coverEnd.from.line < CHUNK_SIZE) {
112 | array.pop().clear();
113 | coverRange(cm, coverEnd.from, to);
114 | } else {
115 | coverRange(cm, coverEnd.to, to);
116 | }
117 | }
118 | }
119 | });
120 |
--------------------------------------------------------------------------------
/vendor/modes/gfm/gfm.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: http://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i
15 |
16 | CodeMirror.defineMode("gfm", function(config, modeConfig) {
17 | var codeDepth = 0;
18 | function blankLine(state) {
19 | state.code = false;
20 | return null;
21 | }
22 | var gfmOverlay = {
23 | startState: function() {
24 | return {
25 | code: false,
26 | codeBlock: false,
27 | ateSpace: false
28 | };
29 | },
30 | copyState: function(s) {
31 | return {
32 | code: s.code,
33 | codeBlock: s.codeBlock,
34 | ateSpace: s.ateSpace
35 | };
36 | },
37 | token: function(stream, state) {
38 | state.combineTokens = null;
39 |
40 | // Hack to prevent formatting override inside code blocks (block and inline)
41 | if (state.codeBlock) {
42 | if (stream.match(/^```+/)) {
43 | state.codeBlock = false;
44 | return null;
45 | }
46 | stream.skipToEnd();
47 | return null;
48 | }
49 | if (stream.sol()) {
50 | state.code = false;
51 | }
52 | if (stream.sol() && stream.match(/^```+/)) {
53 | stream.skipToEnd();
54 | state.codeBlock = true;
55 | return null;
56 | }
57 | // If this block is changed, it may need to be updated in Markdown mode
58 | if (stream.peek() === '`') {
59 | stream.next();
60 | var before = stream.pos;
61 | stream.eatWhile('`');
62 | var difference = 1 + stream.pos - before;
63 | if (!state.code) {
64 | codeDepth = difference;
65 | state.code = true;
66 | } else {
67 | if (difference === codeDepth) { // Must be exact
68 | state.code = false;
69 | }
70 | }
71 | return null;
72 | } else if (state.code) {
73 | stream.next();
74 | return null;
75 | }
76 | // Check if space. If so, links can be formatted later on
77 | if (stream.eatSpace()) {
78 | state.ateSpace = true;
79 | return null;
80 | }
81 | if (stream.sol() || state.ateSpace) {
82 | state.ateSpace = false;
83 | if (modeConfig.gitHubSpice !== false) {
84 | if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) {
85 | // User/Project@SHA
86 | // User@SHA
87 | // SHA
88 | state.combineTokens = true;
89 | return "link";
90 | } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
91 | // User/Project#Num
92 | // User#Num
93 | // #Num
94 | state.combineTokens = true;
95 | return "link";
96 | }
97 | }
98 | }
99 | if (stream.match(urlRE) &&
100 | stream.string.slice(stream.start - 2, stream.start) != "](" &&
101 | (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) {
102 | // URLs
103 | // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
104 | // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
105 | // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL
106 | state.combineTokens = true;
107 | return "link";
108 | }
109 | stream.next();
110 | return null;
111 | },
112 | blankLine: blankLine
113 | };
114 |
115 | var markdownConfig = {
116 | underscoresBreakWords: false,
117 | taskLists: true,
118 | fencedCodeBlocks: '```',
119 | strikethrough: true
120 | };
121 | for (var attr in modeConfig) {
122 | markdownConfig[attr] = modeConfig[attr];
123 | }
124 | markdownConfig.name = "markdown";
125 | return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);
126 |
127 | }, "markdown");
128 |
129 | CodeMirror.defineMIME("text/x-gfm", "gfm");
130 | });
131 |
--------------------------------------------------------------------------------
/dist/sn-codemirror-search/dialog/dialog.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Open simple dialogs on top of an editor. Relies on dialog.css.
5 |
6 | (function(mod) {
7 | if (typeof exports == "object" && typeof module == "object") // CommonJS
8 | mod(require("../../lib/codemirror"));
9 | else if (typeof define == "function" && define.amd) // AMD
10 | define(["../../lib/codemirror"], mod);
11 | else // Plain browser env
12 | mod(CodeMirror);
13 | })(function(CodeMirror) {
14 | function dialogDiv(cm, template, bottom) {
15 | var wrap = cm.getWrapperElement();
16 | var dialog;
17 | dialog = wrap.appendChild(document.createElement("div"));
18 | if (bottom)
19 | dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
20 | else
21 | dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
22 |
23 | if (typeof template == "string") {
24 | dialog.innerHTML = template;
25 | } else { // Assuming it's a detached DOM element.
26 | dialog.appendChild(template);
27 | }
28 | CodeMirror.addClass(wrap, 'dialog-opened');
29 | return dialog;
30 | }
31 |
32 | function closeNotification(cm, newVal) {
33 | if (cm.state.currentNotificationClose)
34 | cm.state.currentNotificationClose();
35 | cm.state.currentNotificationClose = newVal;
36 | }
37 |
38 | CodeMirror.defineExtension("openDialog", function(template, callback, options) {
39 | if (!options) options = {};
40 |
41 | closeNotification(this, null);
42 |
43 | var dialog = dialogDiv(this, template, options.bottom);
44 | var closed = false, me = this;
45 | function close(newVal) {
46 | if (typeof newVal == 'string') {
47 | inp.value = newVal;
48 | } else {
49 | if (closed) return;
50 | closed = true;
51 | CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
52 | dialog.parentNode.removeChild(dialog);
53 | me.focus();
54 |
55 | if (options.onClose) options.onClose(dialog);
56 | }
57 | }
58 |
59 | var inp = dialog.getElementsByTagName("input")[0], button;
60 | if (inp) {
61 | inp.focus();
62 |
63 | if (options.value) {
64 | inp.value = options.value;
65 | if (options.selectValueOnOpen !== false) {
66 | inp.select();
67 | }
68 | }
69 |
70 | if (options.onInput)
71 | CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
72 | if (options.onKeyUp)
73 | CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
74 |
75 | CodeMirror.on(inp, "keydown", function(e) {
76 | if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
77 | if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
78 | inp.blur();
79 | CodeMirror.e_stop(e);
80 | close();
81 | }
82 | if (e.keyCode == 13) callback(inp.value, e);
83 | });
84 |
85 | if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
86 | } else if (button = dialog.getElementsByTagName("button")[0]) {
87 | CodeMirror.on(button, "click", function() {
88 | close();
89 | me.focus();
90 | });
91 |
92 | if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
93 |
94 | button.focus();
95 | }
96 | return close;
97 | });
98 |
99 | CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
100 | closeNotification(this, null);
101 | var dialog = dialogDiv(this, template, options && options.bottom);
102 | var buttons = dialog.getElementsByTagName("button");
103 | var closed = false, me = this, blurring = 1;
104 | function close() {
105 | if (closed) return;
106 | closed = true;
107 | CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
108 | dialog.parentNode.removeChild(dialog);
109 | me.focus();
110 | }
111 | buttons[0].focus();
112 | for (var i = 0; i < buttons.length; ++i) {
113 | var b = buttons[i];
114 | (function(callback) {
115 | CodeMirror.on(b, "click", function(e) {
116 | CodeMirror.e_preventDefault(e);
117 | close();
118 | if (callback) callback(me);
119 | });
120 | })(callbacks[i]);
121 | CodeMirror.on(b, "blur", function() {
122 | --blurring;
123 | setTimeout(function() { if (blurring <= 0) close(); }, 200);
124 | });
125 | CodeMirror.on(b, "focus", function() { ++blurring; });
126 | }
127 | });
128 |
129 | /*
130 | * openNotification
131 | * Opens a notification, that can be closed with an optional timer
132 | * (default 5000ms timer) and always closes on click.
133 | *
134 | * If a notification is opened while another is opened, it will close the
135 | * currently opened one and open the new one immediately.
136 | */
137 | CodeMirror.defineExtension("openNotification", function(template, options) {
138 | closeNotification(this, close);
139 | var dialog = dialogDiv(this, template, options && options.bottom);
140 | var closed = false, doneTimer;
141 | var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
142 |
143 | function close() {
144 | if (closed) return;
145 | closed = true;
146 | clearTimeout(doneTimer);
147 | CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
148 | dialog.parentNode.removeChild(dialog);
149 | }
150 |
151 | CodeMirror.on(dialog, 'click', function(e) {
152 | CodeMirror.e_preventDefault(e);
153 | close();
154 | });
155 |
156 | if (duration)
157 | doneTimer = setTimeout(close, duration);
158 |
159 | return close;
160 | });
161 | });
162 |
--------------------------------------------------------------------------------
/dist/sn-codemirror-search/search.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | // Define search commands. Depends on dialog.js or another
5 | // implementation of the openDialog method.
6 |
7 | // Replace works a little oddly -- it will do the replace on the next
8 | // Ctrl-G (or whatever is bound to findNext) press. You prevent a
9 | // replace by making sure the match is no longer selected when hitting
10 | // Ctrl-G.
11 |
12 | (function(mod) {
13 | if (typeof exports == "object" && typeof module == "object") // CommonJS
14 | mod(require("../../lib/codemirror"), require("./searchcursor"), require("../dialog/dialog"));
15 | else if (typeof define == "function" && define.amd) // AMD
16 | define(["../../lib/codemirror", "./searchcursor", "../dialog/dialog"], mod);
17 | else // Plain browser env
18 | mod(CodeMirror);
19 | })(function(CodeMirror) {
20 | "use strict";
21 |
22 | function searchOverlay(query, caseInsensitive) {
23 | if (typeof query == "string")
24 | query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
25 | else if (!query.global)
26 | query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");
27 |
28 | return {token: function(stream) {
29 | query.lastIndex = stream.pos;
30 | var match = query.exec(stream.string);
31 | if (match && match.index == stream.pos) {
32 | stream.pos += match[0].length || 1;
33 | return "searching";
34 | } else if (match) {
35 | stream.pos = match.index;
36 | } else {
37 | stream.skipToEnd();
38 | }
39 | }};
40 | }
41 |
42 | function SearchState() {
43 | this.posFrom = this.posTo = this.lastQuery = this.query = null;
44 | this.overlay = null;
45 | }
46 |
47 | function getSearchState(cm) {
48 | return cm.state.search || (cm.state.search = new SearchState());
49 | }
50 |
51 | function queryCaseInsensitive(query) {
52 | return typeof query == "string" && query == query.toLowerCase();
53 | }
54 |
55 | function getSearchCursor(cm, query, pos) {
56 | // Heuristic: if the query string is all lowercase, do a case insensitive search.
57 | return cm.getSearchCursor(query, pos, {caseFold: queryCaseInsensitive(query), multiline: true});
58 | }
59 |
60 | function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
61 | cm.openDialog(text, onEnter, {
62 | value: deflt,
63 | selectValueOnOpen: true,
64 | closeOnEnter: false,
65 | onClose: function() { clearSearch(cm); },
66 | onKeyDown: onKeyDown
67 | });
68 | }
69 |
70 | function dialog(cm, text, shortText, deflt, f) {
71 | if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
72 | else f(prompt(shortText, deflt));
73 | }
74 |
75 | function confirmDialog(cm, text, shortText, fs) {
76 | if (cm.openConfirm) cm.openConfirm(text, fs);
77 | else if (confirm(shortText)) fs[0]();
78 | }
79 |
80 | function parseString(string) {
81 | return string.replace(/\\(.)/g, function(_, ch) {
82 | if (ch == "n") return "\n"
83 | if (ch == "r") return "\r"
84 | return ch
85 | })
86 | }
87 |
88 | function parseQuery(query) {
89 | var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
90 | if (isRE) {
91 | try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }
92 | catch(e) {} // Not a regular expression after all, do a string search
93 | } else {
94 | query = parseString(query)
95 | }
96 | if (typeof query == "string" ? query == "" : query.test(""))
97 | query = /x^/;
98 | return query;
99 | }
100 |
101 | function startSearch(cm, state, query) {
102 | state.queryText = query;
103 | state.query = parseQuery(query);
104 | cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
105 | state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
106 | cm.addOverlay(state.overlay);
107 | if (cm.showMatchesOnScrollbar) {
108 | if (state.annotate) { state.annotate.clear(); state.annotate = null; }
109 | state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
110 | }
111 | }
112 |
113 | function doSearch(cm, rev, persistent, immediate) {
114 | var state = getSearchState(cm);
115 | if (state.query) return findNext(cm, rev);
116 | var q = cm.getSelection() || state.lastQuery;
117 | if (q instanceof RegExp && q.source == "x^") q = null
118 | if (persistent && cm.openDialog) {
119 | var hiding = null
120 | var searchNext = function(query, event) {
121 | CodeMirror.e_stop(event);
122 | if (!query) return;
123 | if (query != state.queryText) {
124 | startSearch(cm, state, query);
125 | state.posFrom = state.posTo = cm.getCursor();
126 | }
127 | if (hiding) hiding.style.opacity = 1
128 | findNext(cm, event.shiftKey, function(_, to) {
129 | var dialog
130 | if (to.line < 3 && document.querySelector &&
131 | (dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) &&
132 | dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)
133 | (hiding = dialog).style.opacity = .4
134 | })
135 | };
136 | persistentDialog(cm, getQueryDialog(cm), q, searchNext, function(event, query) {
137 | var keyName = CodeMirror.keyName(event)
138 | var extra = cm.getOption('extraKeys'), cmd = (extra && extra[keyName]) || CodeMirror.keyMap[cm.getOption("keyMap")][keyName]
139 | if (cmd == "findNext" || cmd == "findPrev" ||
140 | cmd == "findPersistentNext" || cmd == "findPersistentPrev") {
141 | CodeMirror.e_stop(event);
142 | startSearch(cm, getSearchState(cm), query);
143 | cm.execCommand(cmd);
144 | } else if (cmd == "find" || cmd == "findPersistent") {
145 | CodeMirror.e_stop(event);
146 | searchNext(query, event);
147 | }
148 | });
149 | if (immediate && q) {
150 | startSearch(cm, state, q);
151 | findNext(cm, rev);
152 | }
153 | } else {
154 | dialog(cm, getQueryDialog(cm), "Search for:", q, function(query) {
155 | if (query && !state.query) cm.operation(function() {
156 | startSearch(cm, state, query);
157 | state.posFrom = state.posTo = cm.getCursor();
158 | findNext(cm, rev);
159 | });
160 | });
161 | }
162 | }
163 |
164 | function findNext(cm, rev, callback) {cm.operation(function() {
165 | var state = getSearchState(cm);
166 | var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
167 | if (!cursor.find(rev)) {
168 | cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
169 | if (!cursor.find(rev)) return;
170 | }
171 | cm.setSelection(cursor.from(), cursor.to());
172 | cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);
173 | state.posFrom = cursor.from(); state.posTo = cursor.to();
174 | if (callback) callback(cursor.from(), cursor.to())
175 | });}
176 |
177 | function clearSearch(cm) {cm.operation(function() {
178 | var state = getSearchState(cm);
179 | state.lastQuery = state.query;
180 | if (!state.query) return;
181 | state.query = state.queryText = null;
182 | cm.removeOverlay(state.overlay);
183 | if (state.annotate) { state.annotate.clear(); state.annotate = null; }
184 | });}
185 |
186 |
187 | function getQueryDialog(cm) {
188 | return '' + cm.phrase("Search:") + ' ' + cm.phrase("(Use /re/ syntax for regexp search)") + '';
189 | }
190 | function getReplaceQueryDialog(cm) {
191 | return ' ' + cm.phrase("(Use /re/ syntax for regexp search)") + '';
192 | }
193 | function getReplacementQueryDialog(cm) {
194 | return '' + cm.phrase("With:") + ' ';
195 | }
196 | function getDoReplaceConfirm(cm) {
197 | return '' + cm.phrase("Replace?") + ' ';
198 | }
199 |
200 | function replaceAll(cm, query, text) {
201 | cm.operation(function() {
202 | for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
203 | if (typeof query != "string") {
204 | var match = cm.getRange(cursor.from(), cursor.to()).match(query);
205 | cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
206 | } else cursor.replace(text);
207 | }
208 | });
209 | }
210 |
211 | function replace(cm, all) {
212 | if (cm.getOption("readOnly")) return;
213 | var query = cm.getSelection() || getSearchState(cm).lastQuery;
214 | var dialogText = '' + (all ? cm.phrase("Replace all:") : cm.phrase("Replace:")) + '';
215 | dialog(cm, dialogText + getReplaceQueryDialog(cm), dialogText, query, function(query) {
216 | if (!query) return;
217 | query = parseQuery(query);
218 | dialog(cm, getReplacementQueryDialog(cm), cm.phrase("Replace with:"), "", function(text) {
219 | text = parseString(text)
220 | if (all) {
221 | replaceAll(cm, query, text)
222 | } else {
223 | clearSearch(cm);
224 | var cursor = getSearchCursor(cm, query, cm.getCursor("from"));
225 | var advance = function() {
226 | var start = cursor.from(), match;
227 | if (!(match = cursor.findNext())) {
228 | cursor = getSearchCursor(cm, query);
229 | if (!(match = cursor.findNext()) ||
230 | (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
231 | }
232 | cm.setSelection(cursor.from(), cursor.to());
233 | cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
234 | confirmDialog(cm, getDoReplaceConfirm(cm), cm.phrase("Replace?"),
235 | [function() {doReplace(match);}, advance,
236 | function() {replaceAll(cm, query, text)}]);
237 | };
238 | var doReplace = function(match) {
239 | cursor.replace(typeof query == "string" ? text :
240 | text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
241 | advance();
242 | };
243 | advance();
244 | }
245 | });
246 | });
247 | }
248 |
249 | CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
250 | CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);};
251 | CodeMirror.commands.findPersistentNext = function(cm) {doSearch(cm, false, true, true);};
252 | CodeMirror.commands.findPersistentPrev = function(cm) {doSearch(cm, true, true, true);};
253 | CodeMirror.commands.findNext = doSearch;
254 | CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
255 | CodeMirror.commands.clearSearch = clearSearch;
256 | CodeMirror.commands.replace = replace;
257 | CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
258 | });
259 |
--------------------------------------------------------------------------------
/dist/sn-codemirror-search/searchcursor.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"))
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror"], mod)
9 | else // Plain browser env
10 | mod(CodeMirror)
11 | })(function(CodeMirror) {
12 | "use strict"
13 | var Pos = CodeMirror.Pos
14 |
15 | function regexpFlags(regexp) {
16 | var flags = regexp.flags
17 | return flags != null ? flags : (regexp.ignoreCase ? "i" : "")
18 | + (regexp.global ? "g" : "")
19 | + (regexp.multiline ? "m" : "")
20 | }
21 |
22 | function ensureFlags(regexp, flags) {
23 | var current = regexpFlags(regexp), target = current
24 | for (var i = 0; i < flags.length; i++) if (target.indexOf(flags.charAt(i)) == -1)
25 | target += flags.charAt(i)
26 | return current == target ? regexp : new RegExp(regexp.source, target)
27 | }
28 |
29 | function maybeMultiline(regexp) {
30 | return /\\s|\\n|\n|\\W|\\D|\[\^/.test(regexp.source)
31 | }
32 |
33 | function searchRegexpForward(doc, regexp, start) {
34 | regexp = ensureFlags(regexp, "g")
35 | for (var line = start.line, ch = start.ch, last = doc.lastLine(); line <= last; line++, ch = 0) {
36 | regexp.lastIndex = ch
37 | var string = doc.getLine(line), match = regexp.exec(string)
38 | if (match)
39 | return {from: Pos(line, match.index),
40 | to: Pos(line, match.index + match[0].length),
41 | match: match}
42 | }
43 | }
44 |
45 | function searchRegexpForwardMultiline(doc, regexp, start) {
46 | if (!maybeMultiline(regexp)) return searchRegexpForward(doc, regexp, start)
47 |
48 | regexp = ensureFlags(regexp, "gm")
49 | var string, chunk = 1
50 | for (var line = start.line, last = doc.lastLine(); line <= last;) {
51 | // This grows the search buffer in exponentially-sized chunks
52 | // between matches, so that nearby matches are fast and don't
53 | // require concatenating the whole document (in case we're
54 | // searching for something that has tons of matches), but at the
55 | // same time, the amount of retries is limited.
56 | for (var i = 0; i < chunk; i++) {
57 | if (line > last) break
58 | var curLine = doc.getLine(line++)
59 | string = string == null ? curLine : string + "\n" + curLine
60 | }
61 | chunk = chunk * 2
62 | regexp.lastIndex = start.ch
63 | var match = regexp.exec(string)
64 | if (match) {
65 | var before = string.slice(0, match.index).split("\n"), inside = match[0].split("\n")
66 | var startLine = start.line + before.length - 1, startCh = before[before.length - 1].length
67 | return {from: Pos(startLine, startCh),
68 | to: Pos(startLine + inside.length - 1,
69 | inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),
70 | match: match}
71 | }
72 | }
73 | }
74 |
75 | function lastMatchIn(string, regexp) {
76 | var cutOff = 0, match
77 | for (;;) {
78 | regexp.lastIndex = cutOff
79 | var newMatch = regexp.exec(string)
80 | if (!newMatch) return match
81 | match = newMatch
82 | cutOff = match.index + (match[0].length || 1)
83 | if (cutOff == string.length) return match
84 | }
85 | }
86 |
87 | function searchRegexpBackward(doc, regexp, start) {
88 | regexp = ensureFlags(regexp, "g")
89 | for (var line = start.line, ch = start.ch, first = doc.firstLine(); line >= first; line--, ch = -1) {
90 | var string = doc.getLine(line)
91 | if (ch > -1) string = string.slice(0, ch)
92 | var match = lastMatchIn(string, regexp)
93 | if (match)
94 | return {from: Pos(line, match.index),
95 | to: Pos(line, match.index + match[0].length),
96 | match: match}
97 | }
98 | }
99 |
100 | function searchRegexpBackwardMultiline(doc, regexp, start) {
101 | regexp = ensureFlags(regexp, "gm")
102 | var string, chunk = 1
103 | for (var line = start.line, first = doc.firstLine(); line >= first;) {
104 | for (var i = 0; i < chunk; i++) {
105 | var curLine = doc.getLine(line--)
106 | string = string == null ? curLine.slice(0, start.ch) : curLine + "\n" + string
107 | }
108 | chunk *= 2
109 |
110 | var match = lastMatchIn(string, regexp)
111 | if (match) {
112 | var before = string.slice(0, match.index).split("\n"), inside = match[0].split("\n")
113 | var startLine = line + before.length, startCh = before[before.length - 1].length
114 | return {from: Pos(startLine, startCh),
115 | to: Pos(startLine + inside.length - 1,
116 | inside.length == 1 ? startCh + inside[0].length : inside[inside.length - 1].length),
117 | match: match}
118 | }
119 | }
120 | }
121 |
122 | var doFold, noFold
123 | if (String.prototype.normalize) {
124 | doFold = function(str) { return str.normalize("NFD").toLowerCase() }
125 | noFold = function(str) { return str.normalize("NFD") }
126 | } else {
127 | doFold = function(str) { return str.toLowerCase() }
128 | noFold = function(str) { return str }
129 | }
130 |
131 | // Maps a position in a case-folded line back to a position in the original line
132 | // (compensating for codepoints increasing in number during folding)
133 | function adjustPos(orig, folded, pos, foldFunc) {
134 | if (orig.length == folded.length) return pos
135 | for (var min = 0, max = pos + Math.max(0, orig.length - folded.length);;) {
136 | if (min == max) return min
137 | var mid = (min + max) >> 1
138 | var len = foldFunc(orig.slice(0, mid)).length
139 | if (len == pos) return mid
140 | else if (len > pos) max = mid
141 | else min = mid + 1
142 | }
143 | }
144 |
145 | function searchStringForward(doc, query, start, caseFold) {
146 | // Empty string would match anything and never progress, so we
147 | // define it to match nothing instead.
148 | if (!query.length) return null
149 | var fold = caseFold ? doFold : noFold
150 | var lines = fold(query).split(/\r|\n\r?/)
151 |
152 | search: for (var line = start.line, ch = start.ch, last = doc.lastLine() + 1 - lines.length; line <= last; line++, ch = 0) {
153 | var orig = doc.getLine(line).slice(ch), string = fold(orig)
154 | if (lines.length == 1) {
155 | var found = string.indexOf(lines[0])
156 | if (found == -1) continue search
157 | var start = adjustPos(orig, string, found, fold) + ch
158 | return {from: Pos(line, adjustPos(orig, string, found, fold) + ch),
159 | to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold) + ch)}
160 | } else {
161 | var cutFrom = string.length - lines[0].length
162 | if (string.slice(cutFrom) != lines[0]) continue search
163 | for (var i = 1; i < lines.length - 1; i++)
164 | if (fold(doc.getLine(line + i)) != lines[i]) continue search
165 | var end = doc.getLine(line + lines.length - 1), endString = fold(end), lastLine = lines[lines.length - 1]
166 | if (endString.slice(0, lastLine.length) != lastLine) continue search
167 | return {from: Pos(line, adjustPos(orig, string, cutFrom, fold) + ch),
168 | to: Pos(line + lines.length - 1, adjustPos(end, endString, lastLine.length, fold))}
169 | }
170 | }
171 | }
172 |
173 | function searchStringBackward(doc, query, start, caseFold) {
174 | if (!query.length) return null
175 | var fold = caseFold ? doFold : noFold
176 | var lines = fold(query).split(/\r|\n\r?/)
177 |
178 | search: for (var line = start.line, ch = start.ch, first = doc.firstLine() - 1 + lines.length; line >= first; line--, ch = -1) {
179 | var orig = doc.getLine(line)
180 | if (ch > -1) orig = orig.slice(0, ch)
181 | var string = fold(orig)
182 | if (lines.length == 1) {
183 | var found = string.lastIndexOf(lines[0])
184 | if (found == -1) continue search
185 | return {from: Pos(line, adjustPos(orig, string, found, fold)),
186 | to: Pos(line, adjustPos(orig, string, found + lines[0].length, fold))}
187 | } else {
188 | var lastLine = lines[lines.length - 1]
189 | if (string.slice(0, lastLine.length) != lastLine) continue search
190 | for (var i = 1, start = line - lines.length + 1; i < lines.length - 1; i++)
191 | if (fold(doc.getLine(start + i)) != lines[i]) continue search
192 | var top = doc.getLine(line + 1 - lines.length), topString = fold(top)
193 | if (topString.slice(topString.length - lines[0].length) != lines[0]) continue search
194 | return {from: Pos(line + 1 - lines.length, adjustPos(top, topString, top.length - lines[0].length, fold)),
195 | to: Pos(line, adjustPos(orig, string, lastLine.length, fold))}
196 | }
197 | }
198 | }
199 |
200 | function SearchCursor(doc, query, pos, options) {
201 | this.atOccurrence = false
202 | this.doc = doc
203 | pos = pos ? doc.clipPos(pos) : Pos(0, 0)
204 | this.pos = {from: pos, to: pos}
205 |
206 | var caseFold
207 | if (typeof options == "object") {
208 | caseFold = options.caseFold
209 | } else { // Backwards compat for when caseFold was the 4th argument
210 | caseFold = options
211 | options = null
212 | }
213 |
214 | if (typeof query == "string") {
215 | if (caseFold == null) caseFold = false
216 | this.matches = function(reverse, pos) {
217 | return (reverse ? searchStringBackward : searchStringForward)(doc, query, pos, caseFold)
218 | }
219 | } else {
220 | query = ensureFlags(query, "gm")
221 | if (!options || options.multiline !== false)
222 | this.matches = function(reverse, pos) {
223 | return (reverse ? searchRegexpBackwardMultiline : searchRegexpForwardMultiline)(doc, query, pos)
224 | }
225 | else
226 | this.matches = function(reverse, pos) {
227 | return (reverse ? searchRegexpBackward : searchRegexpForward)(doc, query, pos)
228 | }
229 | }
230 | }
231 |
232 | SearchCursor.prototype = {
233 | findNext: function() {return this.find(false)},
234 | findPrevious: function() {return this.find(true)},
235 |
236 | find: function(reverse) {
237 | var result = this.matches(reverse, this.doc.clipPos(reverse ? this.pos.from : this.pos.to))
238 |
239 | // Implements weird auto-growing behavior on null-matches for
240 | // backwards-compatiblity with the vim code (unfortunately)
241 | while (result && CodeMirror.cmpPos(result.from, result.to) == 0) {
242 | if (reverse) {
243 | if (result.from.ch) result.from = Pos(result.from.line, result.from.ch - 1)
244 | else if (result.from.line == this.doc.firstLine()) result = null
245 | else result = this.matches(reverse, this.doc.clipPos(Pos(result.from.line - 1)))
246 | } else {
247 | if (result.to.ch < this.doc.getLine(result.to.line).length) result.to = Pos(result.to.line, result.to.ch + 1)
248 | else if (result.to.line == this.doc.lastLine()) result = null
249 | else result = this.matches(reverse, Pos(result.to.line + 1, 0))
250 | }
251 | }
252 |
253 | if (result) {
254 | this.pos = result
255 | this.atOccurrence = true
256 | return this.pos.match || true
257 | } else {
258 | var end = Pos(reverse ? this.doc.firstLine() : this.doc.lastLine() + 1, 0)
259 | this.pos = {from: end, to: end}
260 | return this.atOccurrence = false
261 | }
262 | },
263 |
264 | from: function() {if (this.atOccurrence) return this.pos.from},
265 | to: function() {if (this.atOccurrence) return this.pos.to},
266 |
267 | replace: function(newText, origin) {
268 | if (!this.atOccurrence) return
269 | var lines = CodeMirror.splitLines(newText)
270 | this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin)
271 | this.pos.to = Pos(this.pos.from.line + lines.length - 1,
272 | lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0))
273 | }
274 | }
275 |
276 | CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) {
277 | return new SearchCursor(this.doc, query, pos, caseFold)
278 | })
279 | CodeMirror.defineDocExtension("getSearchCursor", function(query, pos, caseFold) {
280 | return new SearchCursor(this, query, pos, caseFold)
281 | })
282 |
283 | CodeMirror.defineExtension("selectMatches", function(query, caseFold) {
284 | var ranges = []
285 | var cur = this.getSearchCursor(query, this.getCursor("from"), caseFold)
286 | while (cur.findNext()) {
287 | if (CodeMirror.cmpPos(cur.to(), this.getCursor("to")) > 0) break
288 | ranges.push({anchor: cur.from(), head: cur.to()})
289 | }
290 | if (ranges.length)
291 | this.setSelections(ranges, 0)
292 | })
293 | });
294 |
--------------------------------------------------------------------------------
/vendor/modes/markdown/markdown.js:
--------------------------------------------------------------------------------
1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others
2 | // Distributed under an MIT license: https://codemirror.net/LICENSE
3 |
4 | (function(mod) {
5 | if (typeof exports == "object" && typeof module == "object") // CommonJS
6 | mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
7 | else if (typeof define == "function" && define.amd) // AMD
8 | define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
9 | else // Plain browser env
10 | mod(CodeMirror);
11 | })(function(CodeMirror) {
12 | "use strict";
13 |
14 | CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
15 |
16 | var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
17 | var htmlModeMissing = htmlMode.name == "null"
18 |
19 | function getMode(name) {
20 | if (CodeMirror.findModeByName) {
21 | var found = CodeMirror.findModeByName(name);
22 | if (found) name = found.mime || found.mimes[0];
23 | }
24 | var mode = CodeMirror.getMode(cmCfg, name);
25 | return mode.name == "null" ? null : mode;
26 | }
27 |
28 | // Should characters that affect highlighting be highlighted separate?
29 | // Does not include characters that will be output (such as `1.` and `-` for lists)
30 | if (modeCfg.highlightFormatting === undefined)
31 | modeCfg.highlightFormatting = false;
32 |
33 | // Maximum number of nested blockquotes. Set to 0 for infinite nesting.
34 | // Excess `>` will emit `error` token.
35 | if (modeCfg.maxBlockquoteDepth === undefined)
36 | modeCfg.maxBlockquoteDepth = 0;
37 |
38 | // Turn on task lists? ("- [ ] " and "- [x] ")
39 | if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
40 |
41 | // Turn on strikethrough syntax
42 | if (modeCfg.strikethrough === undefined)
43 | modeCfg.strikethrough = false;
44 |
45 | if (modeCfg.emoji === undefined)
46 | modeCfg.emoji = false;
47 |
48 | if (modeCfg.fencedCodeBlockHighlighting === undefined)
49 | modeCfg.fencedCodeBlockHighlighting = true;
50 |
51 | if (modeCfg.xml === undefined)
52 | modeCfg.xml = true;
53 |
54 | // Allow token types to be overridden by user-provided token types.
55 | if (modeCfg.tokenTypeOverrides === undefined)
56 | modeCfg.tokenTypeOverrides = {};
57 |
58 | var tokenTypes = {
59 | header: "header",
60 | code: "comment",
61 | quote: "quote",
62 | list1: "variable-2",
63 | list2: "variable-3",
64 | list3: "keyword",
65 | hr: "hr",
66 | image: "image",
67 | imageAltText: "image-alt-text",
68 | imageMarker: "image-marker",
69 | formatting: "formatting",
70 | linkInline: "link",
71 | linkEmail: "link",
72 | linkText: "link",
73 | linkHref: "string",
74 | em: "em",
75 | strong: "strong",
76 | strikethrough: "strikethrough",
77 | emoji: "builtin"
78 | };
79 |
80 | for (var tokenType in tokenTypes) {
81 | if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
82 | tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
83 | }
84 | }
85 |
86 | var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
87 | , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/
88 | , taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE
89 | , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
90 | , setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/
91 | , textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
92 | , fencedCodeRE = /^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/
93 | , linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
94 | , punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
95 | , expandedTab = " " // CommonMark specifies tab as 4 spaces
96 |
97 | function switchInline(stream, state, f) {
98 | state.f = state.inline = f;
99 | return f(stream, state);
100 | }
101 |
102 | function switchBlock(stream, state, f) {
103 | state.f = state.block = f;
104 | return f(stream, state);
105 | }
106 |
107 | function lineIsEmpty(line) {
108 | return !line || !/\S/.test(line.string)
109 | }
110 |
111 | // Blocks
112 |
113 | function blankLine(state) {
114 | // Reset linkTitle state
115 | state.linkTitle = false;
116 | state.linkHref = false;
117 | state.linkText = false;
118 | // Reset EM state
119 | state.em = false;
120 | // Reset STRONG state
121 | state.strong = false;
122 | // Reset strikethrough state
123 | state.strikethrough = false;
124 | // Reset state.quote
125 | state.quote = 0;
126 | // Reset state.indentedCode
127 | state.indentedCode = false;
128 | if (state.f == htmlBlock) {
129 | var exit = htmlModeMissing
130 | if (!exit) {
131 | var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
132 | exit = inner.mode.name == "xml" && inner.state.tagStart === null &&
133 | (!inner.state.context && inner.state.tokenize.isInText)
134 | }
135 | if (exit) {
136 | state.f = inlineNormal;
137 | state.block = blockNormal;
138 | state.htmlState = null;
139 | }
140 | }
141 | // Reset state.trailingSpace
142 | state.trailingSpace = 0;
143 | state.trailingSpaceNewLine = false;
144 | // Mark this line as blank
145 | state.prevLine = state.thisLine
146 | state.thisLine = {stream: null}
147 | return null;
148 | }
149 |
150 | function blockNormal(stream, state) {
151 | var firstTokenOnLine = stream.column() === state.indentation;
152 | var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
153 | var prevLineIsIndentedCode = state.indentedCode;
154 | var prevLineIsHr = state.prevLine.hr;
155 | var prevLineIsList = state.list !== false;
156 | var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
157 |
158 | state.indentedCode = false;
159 |
160 | var lineIndentation = state.indentation;
161 | // compute once per line (on first token)
162 | if (state.indentationDiff === null) {
163 | state.indentationDiff = state.indentation;
164 | if (prevLineIsList) {
165 | // Reset inline styles which shouldn't propagate aross list items
166 | state.em = false;
167 | state.strong = false;
168 | state.code = false;
169 | state.strikethrough = false;
170 |
171 | state.list = null;
172 | // While this list item's marker's indentation is less than the deepest
173 | // list item's content's indentation,pop the deepest list item
174 | // indentation off the stack, and update block indentation state
175 | while (lineIndentation < state.listStack[state.listStack.length - 1]) {
176 | state.listStack.pop();
177 | if (state.listStack.length) {
178 | state.indentation = state.listStack[state.listStack.length - 1];
179 | // less than the first list's indent -> the line is no longer a list
180 | } else {
181 | state.list = false;
182 | }
183 | }
184 | if (state.list !== false) {
185 | state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1]
186 | }
187 | }
188 | }
189 |
190 | // not comprehensive (currently only for setext detection purposes)
191 | var allowsInlineContinuation = (
192 | !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header &&
193 | (!prevLineIsList || !prevLineIsIndentedCode) &&
194 | !state.prevLine.fencedCodeEnd
195 | );
196 |
197 | var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) &&
198 | state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
199 |
200 | var match = null;
201 | if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd ||
202 | state.prevLine.header || prevLineLineIsEmpty)) {
203 | stream.skipToEnd();
204 | state.indentedCode = true;
205 | return tokenTypes.code;
206 | } else if (stream.eatSpace()) {
207 | return null;
208 | } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
209 | state.quote = 0;
210 | state.header = match[1].length;
211 | state.thisLine.header = true;
212 | if (modeCfg.highlightFormatting) state.formatting = "header";
213 | state.f = state.inline;
214 | return getType(state);
215 | } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) {
216 | state.quote = firstTokenOnLine ? 1 : state.quote + 1;
217 | if (modeCfg.highlightFormatting) state.formatting = "quote";
218 | stream.eatSpace();
219 | return getType(state);
220 | } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
221 | var listType = match[1] ? "ol" : "ul";
222 |
223 | state.indentation = lineIndentation + stream.current().length;
224 | state.list = true;
225 | state.quote = 0;
226 |
227 | // Add this list item's content's indentation to the stack
228 | state.listStack.push(state.indentation);
229 |
230 | if (modeCfg.taskLists && stream.match(taskListRE, false)) {
231 | state.taskList = true;
232 | }
233 | state.f = state.inline;
234 | if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
235 | return getType(state);
236 | } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
237 | state.quote = 0;
238 | state.fencedEndRE = new RegExp(match[1] + "+ *$");
239 | // try switching mode
240 | state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]);
241 | if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
242 | state.f = state.block = local;
243 | if (modeCfg.highlightFormatting) state.formatting = "code-block";
244 | state.code = -1
245 | return getType(state);
246 | // SETEXT has lowest block-scope precedence after HR, so check it after
247 | // the others (code, blockquote, list...)
248 | } else if (
249 | // if setext set, indicates line after ---/===
250 | state.setext || (
251 | // line before ---/===
252 | (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false &&
253 | !state.code && !isHr && !linkDefRE.test(stream.string) &&
254 | (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
255 | )
256 | ) {
257 | if ( !state.setext ) {
258 | state.header = match[0].charAt(0) == '=' ? 1 : 2;
259 | state.setext = state.header;
260 | } else {
261 | state.header = state.setext;
262 | // has no effect on type so we can reset it now
263 | state.setext = 0;
264 | stream.skipToEnd();
265 | if (modeCfg.highlightFormatting) state.formatting = "header";
266 | }
267 | state.thisLine.header = true;
268 | state.f = state.inline;
269 | return getType(state);
270 | } else if (isHr) {
271 | stream.skipToEnd();
272 | state.hr = true;
273 | state.thisLine.hr = true;
274 | return tokenTypes.hr;
275 | } else if (stream.peek() === '[') {
276 | return switchInline(stream, state, footnoteLink);
277 | }
278 |
279 | return switchInline(stream, state, state.inline);
280 | }
281 |
282 | function htmlBlock(stream, state) {
283 | var style = htmlMode.token(stream, state.htmlState);
284 | if (!htmlModeMissing) {
285 | var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
286 | if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
287 | (!inner.state.context && inner.state.tokenize.isInText)) ||
288 | (state.md_inside && stream.current().indexOf(">") > -1)) {
289 | state.f = inlineNormal;
290 | state.block = blockNormal;
291 | state.htmlState = null;
292 | }
293 | }
294 | return style;
295 | }
296 |
297 | function local(stream, state) {
298 | var currListInd = state.listStack[state.listStack.length - 1] || 0;
299 | var hasExitedList = state.indentation < currListInd;
300 | var maxFencedEndInd = currListInd + 3;
301 | if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
302 | if (modeCfg.highlightFormatting) state.formatting = "code-block";
303 | var returnType;
304 | if (!hasExitedList) returnType = getType(state)
305 | state.localMode = state.localState = null;
306 | state.block = blockNormal;
307 | state.f = inlineNormal;
308 | state.fencedEndRE = null;
309 | state.code = 0
310 | state.thisLine.fencedCodeEnd = true;
311 | if (hasExitedList) return switchBlock(stream, state, state.block);
312 | return returnType;
313 | } else if (state.localMode) {
314 | return state.localMode.token(stream, state.localState);
315 | } else {
316 | stream.skipToEnd();
317 | return tokenTypes.code;
318 | }
319 | }
320 |
321 | // Inline
322 | function getType(state) {
323 | var styles = [];
324 |
325 | if (state.formatting) {
326 | styles.push(tokenTypes.formatting);
327 |
328 | if (typeof state.formatting === "string") state.formatting = [state.formatting];
329 |
330 | for (var i = 0; i < state.formatting.length; i++) {
331 | styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
332 |
333 | if (state.formatting[i] === "header") {
334 | styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
335 | }
336 |
337 | // Add `formatting-quote` and `formatting-quote-#` for blockquotes
338 | // Add `error` instead if the maximum blockquote nesting depth is passed
339 | if (state.formatting[i] === "quote") {
340 | if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
341 | styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
342 | } else {
343 | styles.push("error");
344 | }
345 | }
346 | }
347 | }
348 |
349 | if (state.taskOpen) {
350 | styles.push("meta");
351 | return styles.length ? styles.join(' ') : null;
352 | }
353 | if (state.taskClosed) {
354 | styles.push("property");
355 | return styles.length ? styles.join(' ') : null;
356 | }
357 |
358 | if (state.linkHref) {
359 | styles.push(tokenTypes.linkHref, "url");
360 | } else { // Only apply inline styles to non-url text
361 | if (state.strong) { styles.push(tokenTypes.strong); }
362 | if (state.em) { styles.push(tokenTypes.em); }
363 | if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
364 | if (state.emoji) { styles.push(tokenTypes.emoji); }
365 | if (state.linkText) { styles.push(tokenTypes.linkText); }
366 | if (state.code) { styles.push(tokenTypes.code); }
367 | if (state.image) { styles.push(tokenTypes.image); }
368 | if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); }
369 | if (state.imageMarker) { styles.push(tokenTypes.imageMarker); }
370 | }
371 |
372 | if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
373 |
374 | if (state.quote) {
375 | styles.push(tokenTypes.quote);
376 |
377 | // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
378 | if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
379 | styles.push(tokenTypes.quote + "-" + state.quote);
380 | } else {
381 | styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
382 | }
383 | }
384 |
385 | if (state.list !== false) {
386 | var listMod = (state.listStack.length - 1) % 3;
387 | if (!listMod) {
388 | styles.push(tokenTypes.list1);
389 | } else if (listMod === 1) {
390 | styles.push(tokenTypes.list2);
391 | } else {
392 | styles.push(tokenTypes.list3);
393 | }
394 | }
395 |
396 | if (state.trailingSpaceNewLine) {
397 | styles.push("trailing-space-new-line");
398 | } else if (state.trailingSpace) {
399 | styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
400 | }
401 |
402 | return styles.length ? styles.join(' ') : null;
403 | }
404 |
405 | function handleText(stream, state) {
406 | if (stream.match(textRE, true)) {
407 | return getType(state);
408 | }
409 | return undefined;
410 | }
411 |
412 | function inlineNormal(stream, state) {
413 | var style = state.text(stream, state);
414 | if (typeof style !== 'undefined')
415 | return style;
416 |
417 | if (state.list) { // List marker (*, +, -, 1., etc)
418 | state.list = null;
419 | return getType(state);
420 | }
421 |
422 | if (state.taskList) {
423 | var taskOpen = stream.match(taskListRE, true)[1] === " ";
424 | if (taskOpen) state.taskOpen = true;
425 | else state.taskClosed = true;
426 | if (modeCfg.highlightFormatting) state.formatting = "task";
427 | state.taskList = false;
428 | return getType(state);
429 | }
430 |
431 | state.taskOpen = false;
432 | state.taskClosed = false;
433 |
434 | if (state.header && stream.match(/^#+$/, true)) {
435 | if (modeCfg.highlightFormatting) state.formatting = "header";
436 | return getType(state);
437 | }
438 |
439 | var ch = stream.next();
440 |
441 | // Matches link titles present on next line
442 | if (state.linkTitle) {
443 | state.linkTitle = false;
444 | var matchCh = ch;
445 | if (ch === '(') {
446 | matchCh = ')';
447 | }
448 | matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
449 | var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
450 | if (stream.match(new RegExp(regex), true)) {
451 | return tokenTypes.linkHref;
452 | }
453 | }
454 |
455 | // If this block is changed, it may need to be updated in GFM mode
456 | if (ch === '`') {
457 | var previousFormatting = state.formatting;
458 | if (modeCfg.highlightFormatting) state.formatting = "code";
459 | stream.eatWhile('`');
460 | var count = stream.current().length
461 | if (state.code == 0 && (!state.quote || count == 1)) {
462 | state.code = count
463 | return getType(state)
464 | } else if (count == state.code) { // Must be exact
465 | var t = getType(state)
466 | state.code = 0
467 | return t
468 | } else {
469 | state.formatting = previousFormatting
470 | return getType(state)
471 | }
472 | } else if (state.code) {
473 | return getType(state);
474 | }
475 |
476 | if (ch === '\\') {
477 | stream.next();
478 | if (modeCfg.highlightFormatting) {
479 | var type = getType(state);
480 | var formattingEscape = tokenTypes.formatting + "-escape";
481 | return type ? type + " " + formattingEscape : formattingEscape;
482 | }
483 | }
484 |
485 | if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
486 | state.imageMarker = true;
487 | state.image = true;
488 | if (modeCfg.highlightFormatting) state.formatting = "image";
489 | return getType(state);
490 | }
491 |
492 | if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
493 | state.imageMarker = false;
494 | state.imageAltText = true
495 | if (modeCfg.highlightFormatting) state.formatting = "image";
496 | return getType(state);
497 | }
498 |
499 | if (ch === ']' && state.imageAltText) {
500 | if (modeCfg.highlightFormatting) state.formatting = "image";
501 | var type = getType(state);
502 | state.imageAltText = false;
503 | state.image = false;
504 | state.inline = state.f = linkHref;
505 | return type;
506 | }
507 |
508 | if (ch === '[' && !state.image) {
509 | if (state.linkText && stream.match(/^.*?\]/)) return getType(state)
510 | state.linkText = true;
511 | if (modeCfg.highlightFormatting) state.formatting = "link";
512 | return getType(state);
513 | }
514 |
515 | if (ch === ']' && state.linkText) {
516 | if (modeCfg.highlightFormatting) state.formatting = "link";
517 | var type = getType(state);
518 | state.linkText = false;
519 | state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal
520 | return type;
521 | }
522 |
523 | if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
524 | state.f = state.inline = linkInline;
525 | if (modeCfg.highlightFormatting) state.formatting = "link";
526 | var type = getType(state);
527 | if (type){
528 | type += " ";
529 | } else {
530 | type = "";
531 | }
532 | return type + tokenTypes.linkInline;
533 | }
534 |
535 | if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
536 | state.f = state.inline = linkInline;
537 | if (modeCfg.highlightFormatting) state.formatting = "link";
538 | var type = getType(state);
539 | if (type){
540 | type += " ";
541 | } else {
542 | type = "";
543 | }
544 | return type + tokenTypes.linkEmail;
545 | }
546 |
547 | if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
548 | var end = stream.string.indexOf(">", stream.pos);
549 | if (end != -1) {
550 | var atts = stream.string.substring(stream.start, end);
551 | if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
552 | }
553 | stream.backUp(1);
554 | state.htmlState = CodeMirror.startState(htmlMode);
555 | return switchBlock(stream, state, htmlBlock);
556 | }
557 |
558 | if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) {
559 | state.md_inside = false;
560 | return "tag";
561 | } else if (ch === "*" || ch === "_") {
562 | var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2)
563 | while (len < 3 && stream.eat(ch)) len++
564 | var after = stream.peek() || " "
565 | // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis
566 | var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before))
567 | var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after))
568 | var setEm = null, setStrong = null
569 | if (len % 2) { // Em
570 | if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
571 | setEm = true
572 | else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
573 | setEm = false
574 | }
575 | if (len > 1) { // Strong
576 | if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
577 | setStrong = true
578 | else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
579 | setStrong = false
580 | }
581 | if (setStrong != null || setEm != null) {
582 | if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em"
583 | if (setEm === true) state.em = ch
584 | if (setStrong === true) state.strong = ch
585 | var t = getType(state)
586 | if (setEm === false) state.em = false
587 | if (setStrong === false) state.strong = false
588 | return t
589 | }
590 | } else if (ch === ' ') {
591 | if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
592 | if (stream.peek() === ' ') { // Surrounded by spaces, ignore
593 | return getType(state);
594 | } else { // Not surrounded by spaces, back up pointer
595 | stream.backUp(1);
596 | }
597 | }
598 | }
599 |
600 | if (modeCfg.strikethrough) {
601 | if (ch === '~' && stream.eatWhile(ch)) {
602 | if (state.strikethrough) {// Remove strikethrough
603 | if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
604 | var t = getType(state);
605 | state.strikethrough = false;
606 | return t;
607 | } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
608 | state.strikethrough = true;
609 | if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
610 | return getType(state);
611 | }
612 | } else if (ch === ' ') {
613 | if (stream.match(/^~~/, true)) { // Probably surrounded by space
614 | if (stream.peek() === ' ') { // Surrounded by spaces, ignore
615 | return getType(state);
616 | } else { // Not surrounded by spaces, back up pointer
617 | stream.backUp(2);
618 | }
619 | }
620 | }
621 | }
622 |
623 | if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
624 | state.emoji = true;
625 | if (modeCfg.highlightFormatting) state.formatting = "emoji";
626 | var retType = getType(state);
627 | state.emoji = false;
628 | return retType;
629 | }
630 |
631 | if (ch === ' ') {
632 | if (stream.match(/^ +$/, false)) {
633 | state.trailingSpace++;
634 | } else if (state.trailingSpace) {
635 | state.trailingSpaceNewLine = true;
636 | }
637 | }
638 |
639 | return getType(state);
640 | }
641 |
642 | function linkInline(stream, state) {
643 | var ch = stream.next();
644 |
645 | if (ch === ">") {
646 | state.f = state.inline = inlineNormal;
647 | if (modeCfg.highlightFormatting) state.formatting = "link";
648 | var type = getType(state);
649 | if (type){
650 | type += " ";
651 | } else {
652 | type = "";
653 | }
654 | return type + tokenTypes.linkInline;
655 | }
656 |
657 | stream.match(/^[^>]+/, true);
658 |
659 | return tokenTypes.linkInline;
660 | }
661 |
662 | function linkHref(stream, state) {
663 | // Check if space, and return NULL if so (to avoid marking the space)
664 | if(stream.eatSpace()){
665 | return null;
666 | }
667 | var ch = stream.next();
668 | if (ch === '(' || ch === '[') {
669 | state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
670 | if (modeCfg.highlightFormatting) state.formatting = "link-string";
671 | state.linkHref = true;
672 | return getType(state);
673 | }
674 | return 'error';
675 | }
676 |
677 | var linkRE = {
678 | ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
679 | "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
680 | }
681 |
682 | function getLinkHrefInside(endChar) {
683 | return function(stream, state) {
684 | var ch = stream.next();
685 |
686 | if (ch === endChar) {
687 | state.f = state.inline = inlineNormal;
688 | if (modeCfg.highlightFormatting) state.formatting = "link-string";
689 | var returnState = getType(state);
690 | state.linkHref = false;
691 | return returnState;
692 | }
693 |
694 | stream.match(linkRE[endChar])
695 | state.linkHref = true;
696 | return getType(state);
697 | };
698 | }
699 |
700 | function footnoteLink(stream, state) {
701 | if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
702 | state.f = footnoteLinkInside;
703 | stream.next(); // Consume [
704 | if (modeCfg.highlightFormatting) state.formatting = "link";
705 | state.linkText = true;
706 | return getType(state);
707 | }
708 | return switchInline(stream, state, inlineNormal);
709 | }
710 |
711 | function footnoteLinkInside(stream, state) {
712 | if (stream.match(/^\]:/, true)) {
713 | state.f = state.inline = footnoteUrl;
714 | if (modeCfg.highlightFormatting) state.formatting = "link";
715 | var returnType = getType(state);
716 | state.linkText = false;
717 | return returnType;
718 | }
719 |
720 | stream.match(/^([^\]\\]|\\.)+/, true);
721 |
722 | return tokenTypes.linkText;
723 | }
724 |
725 | function footnoteUrl(stream, state) {
726 | // Check if space, and return NULL if so (to avoid marking the space)
727 | if(stream.eatSpace()){
728 | return null;
729 | }
730 | // Match URL
731 | stream.match(/^[^\s]+/, true);
732 | // Check for link title
733 | if (stream.peek() === undefined) { // End of line, set flag to check next line
734 | state.linkTitle = true;
735 | } else { // More content on line, check if link title
736 | stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
737 | }
738 | state.f = state.inline = inlineNormal;
739 | return tokenTypes.linkHref + " url";
740 | }
741 |
742 | var mode = {
743 | startState: function() {
744 | return {
745 | f: blockNormal,
746 |
747 | prevLine: {stream: null},
748 | thisLine: {stream: null},
749 |
750 | block: blockNormal,
751 | htmlState: null,
752 | indentation: 0,
753 |
754 | inline: inlineNormal,
755 | text: handleText,
756 |
757 | formatting: false,
758 | linkText: false,
759 | linkHref: false,
760 | linkTitle: false,
761 | code: 0,
762 | em: false,
763 | strong: false,
764 | header: 0,
765 | setext: 0,
766 | hr: false,
767 | taskList: false,
768 | list: false,
769 | listStack: [],
770 | quote: 0,
771 | trailingSpace: 0,
772 | trailingSpaceNewLine: false,
773 | strikethrough: false,
774 | emoji: false,
775 | fencedEndRE: null
776 | };
777 | },
778 |
779 | copyState: function(s) {
780 | return {
781 | f: s.f,
782 |
783 | prevLine: s.prevLine,
784 | thisLine: s.thisLine,
785 |
786 | block: s.block,
787 | htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
788 | indentation: s.indentation,
789 |
790 | localMode: s.localMode,
791 | localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
792 |
793 | inline: s.inline,
794 | text: s.text,
795 | formatting: false,
796 | linkText: s.linkText,
797 | linkTitle: s.linkTitle,
798 | linkHref: s.linkHref,
799 | code: s.code,
800 | em: s.em,
801 | strong: s.strong,
802 | strikethrough: s.strikethrough,
803 | emoji: s.emoji,
804 | header: s.header,
805 | setext: s.setext,
806 | hr: s.hr,
807 | taskList: s.taskList,
808 | list: s.list,
809 | listStack: s.listStack.slice(0),
810 | quote: s.quote,
811 | indentedCode: s.indentedCode,
812 | trailingSpace: s.trailingSpace,
813 | trailingSpaceNewLine: s.trailingSpaceNewLine,
814 | md_inside: s.md_inside,
815 | fencedEndRE: s.fencedEndRE
816 | };
817 | },
818 |
819 | token: function(stream, state) {
820 |
821 | // Reset state.formatting
822 | state.formatting = false;
823 |
824 | if (stream != state.thisLine.stream) {
825 | state.header = 0;
826 | state.hr = false;
827 |
828 | if (stream.match(/^\s*$/, true)) {
829 | blankLine(state);
830 | return null;
831 | }
832 |
833 | state.prevLine = state.thisLine
834 | state.thisLine = {stream: stream}
835 |
836 | // Reset state.taskList
837 | state.taskList = false;
838 |
839 | // Reset state.trailingSpace
840 | state.trailingSpace = 0;
841 | state.trailingSpaceNewLine = false;
842 |
843 | if (!state.localState) {
844 | state.f = state.block;
845 | if (state.f != htmlBlock) {
846 | var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
847 | state.indentation = indentation;
848 | state.indentationDiff = null;
849 | if (indentation > 0) return null;
850 | }
851 | }
852 | }
853 | return state.f(stream, state);
854 | },
855 |
856 | innerMode: function(state) {
857 | if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
858 | if (state.localState) return {state: state.localState, mode: state.localMode};
859 | return {state: state, mode: mode};
860 | },
861 |
862 | indent: function(state, textAfter, line) {
863 | if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line)
864 | if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line)
865 | return CodeMirror.Pass
866 | },
867 |
868 | blankLine: blankLine,
869 |
870 | getType: getType,
871 |
872 | blockCommentStart: "",
874 | closeBrackets: "()[]{}''\"\"``",
875 | fold: "markdown"
876 | };
877 | return mode;
878 | }, "xml");
879 |
880 | CodeMirror.defineMIME("text/markdown", "markdown");
881 |
882 | CodeMirror.defineMIME("text/x-markdown", "markdown");
883 |
884 | });
885 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license for
11 | software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are designed
15 | to take away your freedom to share and change the works. By contrast,
16 | our General Public Licenses are intended to guarantee your freedom to
17 | share and change all versions of a program--to make sure it remains free
18 | software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public License.
64 |
65 | "Copyright" also means copyright-like laws that apply to other kinds of
66 | works, such as semiconductor masks.
67 |
68 | "The Program" refers to any copyrightable work licensed under this
69 | License. Each licensee is addressed as "you". "Licensees" and
70 | "recipients" may be individuals or organizations.
71 |
72 | To "modify" a work means to copy from or adapt all or part of the work
73 | in a fashion requiring copyright permission, other than the making of an
74 | exact copy. The resulting work is called a "modified version" of the
75 | earlier work or a work "based on" the earlier work.
76 |
77 | A "covered work" means either the unmodified Program or a work based
78 | on the Program.
79 |
80 | To "propagate" a work means to do anything with it that, without
81 | permission, would make you directly or secondarily liable for
82 | infringement under applicable copyright law, except executing it on a
83 | computer or modifying a private copy. Propagation includes copying,
84 | distribution (with or without modification), making available to the
85 | public, and in some countries other activities as well.
86 |
87 | To "convey" a work means any kind of propagation that enables other
88 | parties to make or receive copies. Mere interaction with a user through
89 | a computer network, with no transfer of a copy, is not conveying.
90 |
91 | An interactive user interface displays "Appropriate Legal Notices"
92 | to the extent that it includes a convenient and prominently visible
93 | feature that (1) displays an appropriate copyright notice, and (2)
94 | tells the user that there is no warranty for the work (except to the
95 | extent that warranties are provided), that licensees may convey the
96 | work under this License, and how to view a copy of this License. If
97 | the interface presents a list of user commands or options, such as a
98 | menu, a prominent item in the list meets this criterion.
99 |
100 | 1. Source Code.
101 |
102 | The "source code" for a work means the preferred form of the work
103 | for making modifications to it. "Object code" means any non-source
104 | form of a work.
105 |
106 | A "Standard Interface" means an interface that either is an official
107 | standard defined by a recognized standards body, or, in the case of
108 | interfaces specified for a particular programming language, one that
109 | is widely used among developers working in that language.
110 |
111 | The "System Libraries" of an executable work include anything, other
112 | than the work as a whole, that (a) is included in the normal form of
113 | packaging a Major Component, but which is not part of that Major
114 | Component, and (b) serves only to enable use of the work with that
115 | Major Component, or to implement a Standard Interface for which an
116 | implementation is available to the public in source code form. A
117 | "Major Component", in this context, means a major essential component
118 | (kernel, window system, and so on) of the specific operating system
119 | (if any) on which the executable work runs, or a compiler used to
120 | produce the work, or an object code interpreter used to run it.
121 |
122 | The "Corresponding Source" for a work in object code form means all
123 | the source code needed to generate, install, and (for an executable
124 | work) run the object code and to modify the work, including scripts to
125 | control those activities. However, it does not include the work's
126 | System Libraries, or general-purpose tools or generally available free
127 | programs which are used unmodified in performing those activities but
128 | which are not part of the work. For example, Corresponding Source
129 | includes interface definition files associated with source files for
130 | the work, and the source code for shared libraries and dynamically
131 | linked subprograms that the work is specifically designed to require,
132 | such as by intimate data communication or control flow between those
133 | subprograms and other parts of the work.
134 |
135 | The Corresponding Source need not include anything that users
136 | can regenerate automatically from other parts of the Corresponding
137 | Source.
138 |
139 | The Corresponding Source for a work in source code form is that
140 | same work.
141 |
142 | 2. Basic Permissions.
143 |
144 | All rights granted under this License are granted for the term of
145 | copyright on the Program, and are irrevocable provided the stated
146 | conditions are met. This License explicitly affirms your unlimited
147 | permission to run the unmodified Program. The output from running a
148 | covered work is covered by this License only if the output, given its
149 | content, constitutes a covered work. This License acknowledges your
150 | rights of fair use or other equivalent, as provided by copyright law.
151 |
152 | You may make, run and propagate covered works that you do not
153 | convey, without conditions so long as your license otherwise remains
154 | in force. You may convey covered works to others for the sole purpose
155 | of having them make modifications exclusively for you, or provide you
156 | with facilities for running those works, provided that you comply with
157 | the terms of this License in conveying all material for which you do
158 | not control copyright. Those thus making or running the covered works
159 | for you must do so exclusively on your behalf, under your direction
160 | and control, on terms that prohibit them from making any copies of
161 | your copyrighted material outside their relationship with you.
162 |
163 | Conveying under any other circumstances is permitted solely under
164 | the conditions stated below. Sublicensing is not allowed; section 10
165 | makes it unnecessary.
166 |
167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168 |
169 | No covered work shall be deemed part of an effective technological
170 | measure under any applicable law fulfilling obligations under article
171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172 | similar laws prohibiting or restricting circumvention of such
173 | measures.
174 |
175 | When you convey a covered work, you waive any legal power to forbid
176 | circumvention of technological measures to the extent such circumvention
177 | is effected by exercising rights under this License with respect to
178 | the covered work, and you disclaim any intention to limit operation or
179 | modification of the work as a means of enforcing, against the work's
180 | users, your or third parties' legal rights to forbid circumvention of
181 | technological measures.
182 |
183 | 4. Conveying Verbatim Copies.
184 |
185 | You may convey verbatim copies of the Program's source code as you
186 | receive it, in any medium, provided that you conspicuously and
187 | appropriately publish on each copy an appropriate copyright notice;
188 | keep intact all notices stating that this License and any
189 | non-permissive terms added in accord with section 7 apply to the code;
190 | keep intact all notices of the absence of any warranty; and give all
191 | recipients a copy of this License along with the Program.
192 |
193 | You may charge any price or no price for each copy that you convey,
194 | and you may offer support or warranty protection for a fee.
195 |
196 | 5. Conveying Modified Source Versions.
197 |
198 | You may convey a work based on the Program, or the modifications to
199 | produce it from the Program, in the form of source code under the
200 | terms of section 4, provided that you also meet all of these conditions:
201 |
202 | a) The work must carry prominent notices stating that you modified
203 | it, and giving a relevant date.
204 |
205 | b) The work must carry prominent notices stating that it is
206 | released under this License and any conditions added under section
207 | 7. This requirement modifies the requirement in section 4 to
208 | "keep intact all notices".
209 |
210 | c) You must license the entire work, as a whole, under this
211 | License to anyone who comes into possession of a copy. This
212 | License will therefore apply, along with any applicable section 7
213 | additional terms, to the whole of the work, and all its parts,
214 | regardless of how they are packaged. This License gives no
215 | permission to license the work in any other way, but it does not
216 | invalidate such permission if you have separately received it.
217 |
218 | d) If the work has interactive user interfaces, each must display
219 | Appropriate Legal Notices; however, if the Program has interactive
220 | interfaces that do not display Appropriate Legal Notices, your
221 | work need not make them do so.
222 |
223 | A compilation of a covered work with other separate and independent
224 | works, which are not by their nature extensions of the covered work,
225 | and which are not combined with it such as to form a larger program,
226 | in or on a volume of a storage or distribution medium, is called an
227 | "aggregate" if the compilation and its resulting copyright are not
228 | used to limit the access or legal rights of the compilation's users
229 | beyond what the individual works permit. Inclusion of a covered work
230 | in an aggregate does not cause this License to apply to the other
231 | parts of the aggregate.
232 |
233 | 6. Conveying Non-Source Forms.
234 |
235 | You may convey a covered work in object code form under the terms
236 | of sections 4 and 5, provided that you also convey the
237 | machine-readable Corresponding Source under the terms of this License,
238 | in one of these ways:
239 |
240 | a) Convey the object code in, or embodied in, a physical product
241 | (including a physical distribution medium), accompanied by the
242 | Corresponding Source fixed on a durable physical medium
243 | customarily used for software interchange.
244 |
245 | b) Convey the object code in, or embodied in, a physical product
246 | (including a physical distribution medium), accompanied by a
247 | written offer, valid for at least three years and valid for as
248 | long as you offer spare parts or customer support for that product
249 | model, to give anyone who possesses the object code either (1) a
250 | copy of the Corresponding Source for all the software in the
251 | product that is covered by this License, on a durable physical
252 | medium customarily used for software interchange, for a price no
253 | more than your reasonable cost of physically performing this
254 | conveying of source, or (2) access to copy the
255 | Corresponding Source from a network server at no charge.
256 |
257 | c) Convey individual copies of the object code with a copy of the
258 | written offer to provide the Corresponding Source. This
259 | alternative is allowed only occasionally and noncommercially, and
260 | only if you received the object code with such an offer, in accord
261 | with subsection 6b.
262 |
263 | d) Convey the object code by offering access from a designated
264 | place (gratis or for a charge), and offer equivalent access to the
265 | Corresponding Source in the same way through the same place at no
266 | further charge. You need not require recipients to copy the
267 | Corresponding Source along with the object code. If the place to
268 | copy the object code is a network server, the Corresponding Source
269 | may be on a different server (operated by you or a third party)
270 | that supports equivalent copying facilities, provided you maintain
271 | clear directions next to the object code saying where to find the
272 | Corresponding Source. Regardless of what server hosts the
273 | Corresponding Source, you remain obligated to ensure that it is
274 | available for as long as needed to satisfy these requirements.
275 |
276 | e) Convey the object code using peer-to-peer transmission, provided
277 | you inform other peers where the object code and Corresponding
278 | Source of the work are being offered to the general public at no
279 | charge under subsection 6d.
280 |
281 | A separable portion of the object code, whose source code is excluded
282 | from the Corresponding Source as a System Library, need not be
283 | included in conveying the object code work.
284 |
285 | A "User Product" is either (1) a "consumer product", which means any
286 | tangible personal property which is normally used for personal, family,
287 | or household purposes, or (2) anything designed or sold for incorporation
288 | into a dwelling. In determining whether a product is a consumer product,
289 | doubtful cases shall be resolved in favor of coverage. For a particular
290 | product received by a particular user, "normally used" refers to a
291 | typical or common use of that class of product, regardless of the status
292 | of the particular user or of the way in which the particular user
293 | actually uses, or expects or is expected to use, the product. A product
294 | is a consumer product regardless of whether the product has substantial
295 | commercial, industrial or non-consumer uses, unless such uses represent
296 | the only significant mode of use of the product.
297 |
298 | "Installation Information" for a User Product means any methods,
299 | procedures, authorization keys, or other information required to install
300 | and execute modified versions of a covered work in that User Product from
301 | a modified version of its Corresponding Source. The information must
302 | suffice to ensure that the continued functioning of the modified object
303 | code is in no case prevented or interfered with solely because
304 | modification has been made.
305 |
306 | If you convey an object code work under this section in, or with, or
307 | specifically for use in, a User Product, and the conveying occurs as
308 | part of a transaction in which the right of possession and use of the
309 | User Product is transferred to the recipient in perpetuity or for a
310 | fixed term (regardless of how the transaction is characterized), the
311 | Corresponding Source conveyed under this section must be accompanied
312 | by the Installation Information. But this requirement does not apply
313 | if neither you nor any third party retains the ability to install
314 | modified object code on the User Product (for example, the work has
315 | been installed in ROM).
316 |
317 | The requirement to provide Installation Information does not include a
318 | requirement to continue to provide support service, warranty, or updates
319 | for a work that has been modified or installed by the recipient, or for
320 | the User Product in which it has been modified or installed. Access to a
321 | network may be denied when the modification itself materially and
322 | adversely affects the operation of the network or violates the rules and
323 | protocols for communication across the network.
324 |
325 | Corresponding Source conveyed, and Installation Information provided,
326 | in accord with this section must be in a format that is publicly
327 | documented (and with an implementation available to the public in
328 | source code form), and must require no special password or key for
329 | unpacking, reading or copying.
330 |
331 | 7. Additional Terms.
332 |
333 | "Additional permissions" are terms that supplement the terms of this
334 | License by making exceptions from one or more of its conditions.
335 | Additional permissions that are applicable to the entire Program shall
336 | be treated as though they were included in this License, to the extent
337 | that they are valid under applicable law. If additional permissions
338 | apply only to part of the Program, that part may be used separately
339 | under those permissions, but the entire Program remains governed by
340 | this License without regard to the additional permissions.
341 |
342 | When you convey a copy of a covered work, you may at your option
343 | remove any additional permissions from that copy, or from any part of
344 | it. (Additional permissions may be written to require their own
345 | removal in certain cases when you modify the work.) You may place
346 | additional permissions on material, added by you to a covered work,
347 | for which you have or can give appropriate copyright permission.
348 |
349 | Notwithstanding any other provision of this License, for material you
350 | add to a covered work, you may (if authorized by the copyright holders of
351 | that material) supplement the terms of this License with terms:
352 |
353 | a) Disclaiming warranty or limiting liability differently from the
354 | terms of sections 15 and 16 of this License; or
355 |
356 | b) Requiring preservation of specified reasonable legal notices or
357 | author attributions in that material or in the Appropriate Legal
358 | Notices displayed by works containing it; or
359 |
360 | c) Prohibiting misrepresentation of the origin of that material, or
361 | requiring that modified versions of such material be marked in
362 | reasonable ways as different from the original version; or
363 |
364 | d) Limiting the use for publicity purposes of names of licensors or
365 | authors of the material; or
366 |
367 | e) Declining to grant rights under trademark law for use of some
368 | trade names, trademarks, or service marks; or
369 |
370 | f) Requiring indemnification of licensors and authors of that
371 | material by anyone who conveys the material (or modified versions of
372 | it) with contractual assumptions of liability to the recipient, for
373 | any liability that these contractual assumptions directly impose on
374 | those licensors and authors.
375 |
376 | All other non-permissive additional terms are considered "further
377 | restrictions" within the meaning of section 10. If the Program as you
378 | received it, or any part of it, contains a notice stating that it is
379 | governed by this License along with a term that is a further
380 | restriction, you may remove that term. If a license document contains
381 | a further restriction but permits relicensing or conveying under this
382 | License, you may add to a covered work material governed by the terms
383 | of that license document, provided that the further restriction does
384 | not survive such relicensing or conveying.
385 |
386 | If you add terms to a covered work in accord with this section, you
387 | must place, in the relevant source files, a statement of the
388 | additional terms that apply to those files, or a notice indicating
389 | where to find the applicable terms.
390 |
391 | Additional terms, permissive or non-permissive, may be stated in the
392 | form of a separately written license, or stated as exceptions;
393 | the above requirements apply either way.
394 |
395 | 8. Termination.
396 |
397 | You may not propagate or modify a covered work except as expressly
398 | provided under this License. Any attempt otherwise to propagate or
399 | modify it is void, and will automatically terminate your rights under
400 | this License (including any patent licenses granted under the third
401 | paragraph of section 11).
402 |
403 | However, if you cease all violation of this License, then your
404 | license from a particular copyright holder is reinstated (a)
405 | provisionally, unless and until the copyright holder explicitly and
406 | finally terminates your license, and (b) permanently, if the copyright
407 | holder fails to notify you of the violation by some reasonable means
408 | prior to 60 days after the cessation.
409 |
410 | Moreover, your license from a particular copyright holder is
411 | reinstated permanently if the copyright holder notifies you of the
412 | violation by some reasonable means, this is the first time you have
413 | received notice of violation of this License (for any work) from that
414 | copyright holder, and you cure the violation prior to 30 days after
415 | your receipt of the notice.
416 |
417 | Termination of your rights under this section does not terminate the
418 | licenses of parties who have received copies or rights from you under
419 | this License. If your rights have been terminated and not permanently
420 | reinstated, you do not qualify to receive new licenses for the same
421 | material under section 10.
422 |
423 | 9. Acceptance Not Required for Having Copies.
424 |
425 | You are not required to accept this License in order to receive or
426 | run a copy of the Program. Ancillary propagation of a covered work
427 | occurring solely as a consequence of using peer-to-peer transmission
428 | to receive a copy likewise does not require acceptance. However,
429 | nothing other than this License grants you permission to propagate or
430 | modify any covered work. These actions infringe copyright if you do
431 | not accept this License. Therefore, by modifying or propagating a
432 | covered work, you indicate your acceptance of this License to do so.
433 |
434 | 10. Automatic Licensing of Downstream Recipients.
435 |
436 | Each time you convey a covered work, the recipient automatically
437 | receives a license from the original licensors, to run, modify and
438 | propagate that work, subject to this License. You are not responsible
439 | for enforcing compliance by third parties with this License.
440 |
441 | An "entity transaction" is a transaction transferring control of an
442 | organization, or substantially all assets of one, or subdividing an
443 | organization, or merging organizations. If propagation of a covered
444 | work results from an entity transaction, each party to that
445 | transaction who receives a copy of the work also receives whatever
446 | licenses to the work the party's predecessor in interest had or could
447 | give under the previous paragraph, plus a right to possession of the
448 | Corresponding Source of the work from the predecessor in interest, if
449 | the predecessor has it or can get it with reasonable efforts.
450 |
451 | You may not impose any further restrictions on the exercise of the
452 | rights granted or affirmed under this License. For example, you may
453 | not impose a license fee, royalty, or other charge for exercise of
454 | rights granted under this License, and you may not initiate litigation
455 | (including a cross-claim or counterclaim in a lawsuit) alleging that
456 | any patent claim is infringed by making, using, selling, offering for
457 | sale, or importing the Program or any portion of it.
458 |
459 | 11. Patents.
460 |
461 | A "contributor" is a copyright holder who authorizes use under this
462 | License of the Program or a work on which the Program is based. The
463 | work thus licensed is called the contributor's "contributor version".
464 |
465 | A contributor's "essential patent claims" are all patent claims
466 | owned or controlled by the contributor, whether already acquired or
467 | hereafter acquired, that would be infringed by some manner, permitted
468 | by this License, of making, using, or selling its contributor version,
469 | but do not include claims that would be infringed only as a
470 | consequence of further modification of the contributor version. For
471 | purposes of this definition, "control" includes the right to grant
472 | patent sublicenses in a manner consistent with the requirements of
473 | this License.
474 |
475 | Each contributor grants you a non-exclusive, worldwide, royalty-free
476 | patent license under the contributor's essential patent claims, to
477 | make, use, sell, offer for sale, import and otherwise run, modify and
478 | propagate the contents of its contributor version.
479 |
480 | In the following three paragraphs, a "patent license" is any express
481 | agreement or commitment, however denominated, not to enforce a patent
482 | (such as an express permission to practice a patent or covenant not to
483 | sue for patent infringement). To "grant" such a patent license to a
484 | party means to make such an agreement or commitment not to enforce a
485 | patent against the party.
486 |
487 | If you convey a covered work, knowingly relying on a patent license,
488 | and the Corresponding Source of the work is not available for anyone
489 | to copy, free of charge and under the terms of this License, through a
490 | publicly available network server or other readily accessible means,
491 | then you must either (1) cause the Corresponding Source to be so
492 | available, or (2) arrange to deprive yourself of the benefit of the
493 | patent license for this particular work, or (3) arrange, in a manner
494 | consistent with the requirements of this License, to extend the patent
495 | license to downstream recipients. "Knowingly relying" means you have
496 | actual knowledge that, but for the patent license, your conveying the
497 | covered work in a country, or your recipient's use of the covered work
498 | in a country, would infringe one or more identifiable patents in that
499 | country that you have reason to believe are valid.
500 |
501 | If, pursuant to or in connection with a single transaction or
502 | arrangement, you convey, or propagate by procuring conveyance of, a
503 | covered work, and grant a patent license to some of the parties
504 | receiving the covered work authorizing them to use, propagate, modify
505 | or convey a specific copy of the covered work, then the patent license
506 | you grant is automatically extended to all recipients of the covered
507 | work and works based on it.
508 |
509 | A patent license is "discriminatory" if it does not include within
510 | the scope of its coverage, prohibits the exercise of, or is
511 | conditioned on the non-exercise of one or more of the rights that are
512 | specifically granted under this License. You may not convey a covered
513 | work if you are a party to an arrangement with a third party that is
514 | in the business of distributing software, under which you make payment
515 | to the third party based on the extent of your activity of conveying
516 | the work, and under which the third party grants, to any of the
517 | parties who would receive the covered work from you, a discriminatory
518 | patent license (a) in connection with copies of the covered work
519 | conveyed by you (or copies made from those copies), or (b) primarily
520 | for and in connection with specific products or compilations that
521 | contain the covered work, unless you entered into that arrangement,
522 | or that patent license was granted, prior to 28 March 2007.
523 |
524 | Nothing in this License shall be construed as excluding or limiting
525 | any implied license or other defenses to infringement that may
526 | otherwise be available to you under applicable patent law.
527 |
528 | 12. No Surrender of Others' Freedom.
529 |
530 | If conditions are imposed on you (whether by court order, agreement or
531 | otherwise) that contradict the conditions of this License, they do not
532 | excuse you from the conditions of this License. If you cannot convey a
533 | covered work so as to satisfy simultaneously your obligations under this
534 | License and any other pertinent obligations, then as a consequence you may
535 | not convey it at all. For example, if you agree to terms that obligate you
536 | to collect a royalty for further conveying from those to whom you convey
537 | the Program, the only way you could satisfy both those terms and this
538 | License would be to refrain entirely from conveying the Program.
539 |
540 | 13. Remote Network Interaction; Use with the GNU General Public License.
541 |
542 | Notwithstanding any other provision of this License, if you modify the
543 | Program, your modified version must prominently offer all users
544 | interacting with it remotely through a computer network (if your version
545 | supports such interaction) an opportunity to receive the Corresponding
546 | Source of your version by providing access to the Corresponding Source
547 | from a network server at no charge, through some standard or customary
548 | means of facilitating copying of software. This Corresponding Source
549 | shall include the Corresponding Source for any work covered by version 3
550 | of the GNU General Public License that is incorporated pursuant to the
551 | following paragraph.
552 |
553 | Notwithstanding any other provision of this License, you have
554 | permission to link or combine any covered work with a work licensed
555 | under version 3 of the GNU General Public License into a single
556 | combined work, and to convey the resulting work. The terms of this
557 | License will continue to apply to the part which is the covered work,
558 | but the work with which it is combined will remain governed by version
559 | 3 of the GNU General Public License.
560 |
561 | 14. Revised Versions of this License.
562 |
563 | The Free Software Foundation may publish revised and/or new versions of
564 | the GNU Affero General Public License from time to time. Such new versions
565 | will be similar in spirit to the present version, but may differ in detail to
566 | address new problems or concerns.
567 |
568 | Each version is given a distinguishing version number. If the
569 | Program specifies that a certain numbered version of the GNU Affero General
570 | Public License "or any later version" applies to it, you have the
571 | option of following the terms and conditions either of that numbered
572 | version or of any later version published by the Free Software
573 | Foundation. If the Program does not specify a version number of the
574 | GNU Affero General Public License, you may choose any version ever published
575 | by the Free Software Foundation.
576 |
577 | If the Program specifies that a proxy can decide which future
578 | versions of the GNU Affero General Public License can be used, that proxy's
579 | public statement of acceptance of a version permanently authorizes you
580 | to choose that version for the Program.
581 |
582 | Later license versions may give you additional or different
583 | permissions. However, no additional obligations are imposed on any
584 | author or copyright holder as a result of your choosing to follow a
585 | later version.
586 |
587 | 15. Disclaimer of Warranty.
588 |
589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597 |
598 | 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608 | SUCH DAMAGES.
609 |
610 | 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these terms.
626 |
627 | To do so, attach the following notices to the program. It is safest
628 | to attach them to the start of each source file to most effectively
629 | state the exclusion of warranty; and each file should have at least
630 | the "copyright" line and a pointer to where the full notice is found.
631 |
632 |
633 | Copyright (C)
634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published
637 | by the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/dist/dist.css:
--------------------------------------------------------------------------------
1 | /* BASICS */
2 |
3 | .CodeMirror {
4 | /* Set height, width, borders, and global font properties here */
5 | font-family: monospace;
6 | height: 300px;
7 | color: black;
8 | direction: ltr;
9 | }
10 |
11 | /* PADDING */
12 |
13 | .CodeMirror-lines {
14 | padding: 4px 0; /* Vertical padding around content */
15 | }
16 | .CodeMirror pre.CodeMirror-line,
17 | .CodeMirror pre.CodeMirror-line-like {
18 | padding: 0 4px; /* Horizontal padding of content */
19 | }
20 |
21 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
22 | background-color: white; /* The little square between H and V scrollbars */
23 | }
24 |
25 | /* GUTTER */
26 |
27 | .CodeMirror-gutters {
28 | border-right: 1px solid #ddd;
29 | background-color: #f7f7f7;
30 | white-space: nowrap;
31 | }
32 | .CodeMirror-linenumbers {}
33 | .CodeMirror-linenumber {
34 | padding: 0 3px 0 5px;
35 | min-width: 20px;
36 | text-align: right;
37 | color: #999;
38 | white-space: nowrap;
39 | }
40 |
41 | .CodeMirror-guttermarker { color: black; }
42 | .CodeMirror-guttermarker-subtle { color: #999; }
43 |
44 | /* CURSOR */
45 |
46 | .CodeMirror-cursor {
47 | border-left: 1px solid black;
48 | border-right: none;
49 | width: 0;
50 | }
51 | /* Shown when moving in bi-directional text */
52 | .CodeMirror div.CodeMirror-secondarycursor {
53 | border-left: 1px solid silver;
54 | }
55 | .cm-fat-cursor .CodeMirror-cursor {
56 | width: auto;
57 | border: 0 !important;
58 | background: #7e7;
59 | }
60 | .cm-fat-cursor div.CodeMirror-cursors {
61 | z-index: 1;
62 | }
63 | .cm-fat-cursor-mark {
64 | background-color: rgba(20, 255, 20, 0.5);
65 | -webkit-animation: blink 1.06s steps(1) infinite;
66 | -moz-animation: blink 1.06s steps(1) infinite;
67 | animation: blink 1.06s steps(1) infinite;
68 | }
69 | .cm-animate-fat-cursor {
70 | width: auto;
71 | border: 0;
72 | -webkit-animation: blink 1.06s steps(1) infinite;
73 | -moz-animation: blink 1.06s steps(1) infinite;
74 | animation: blink 1.06s steps(1) infinite;
75 | background-color: #7e7;
76 | }
77 | @-moz-keyframes blink {
78 | 0% {}
79 | 50% { background-color: transparent; }
80 | 100% {}
81 | }
82 | @-webkit-keyframes blink {
83 | 0% {}
84 | 50% { background-color: transparent; }
85 | 100% {}
86 | }
87 | @keyframes blink {
88 | 0% {}
89 | 50% { background-color: transparent; }
90 | 100% {}
91 | }
92 |
93 | /* Can style cursor different in overwrite (non-insert) mode */
94 | .CodeMirror-overwrite .CodeMirror-cursor {}
95 |
96 | .cm-tab { display: inline-block; text-decoration: inherit; }
97 |
98 | .CodeMirror-rulers {
99 | position: absolute;
100 | left: 0; right: 0; top: -50px; bottom: 0;
101 | overflow: hidden;
102 | }
103 | .CodeMirror-ruler {
104 | border-left: 1px solid #ccc;
105 | top: 0; bottom: 0;
106 | position: absolute;
107 | }
108 |
109 | /* DEFAULT THEME */
110 |
111 | .cm-s-default .cm-header {color: blue;}
112 | .cm-s-default .cm-quote {color: #090;}
113 | .cm-negative {color: #d44;}
114 | .cm-positive {color: #292;}
115 | .cm-header, .cm-strong {font-weight: bold;}
116 | .cm-em {font-style: italic;}
117 | .cm-link {text-decoration: underline;}
118 | .cm-strikethrough {text-decoration: line-through;}
119 |
120 | .cm-s-default .cm-keyword {color: #708;}
121 | .cm-s-default .cm-atom {color: #219;}
122 | .cm-s-default .cm-number {color: #164;}
123 | .cm-s-default .cm-def {color: #00f;}
124 | .cm-s-default .cm-variable,
125 | .cm-s-default .cm-punctuation,
126 | .cm-s-default .cm-property,
127 | .cm-s-default .cm-operator {}
128 | .cm-s-default .cm-variable-2 {color: #05a;}
129 | .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
130 | .cm-s-default .cm-comment {color: #a50;}
131 | .cm-s-default .cm-string {color: #a11;}
132 | .cm-s-default .cm-string-2 {color: #f50;}
133 | .cm-s-default .cm-meta {color: #555;}
134 | .cm-s-default .cm-qualifier {color: #555;}
135 | .cm-s-default .cm-builtin {color: #30a;}
136 | .cm-s-default .cm-bracket {color: #997;}
137 | .cm-s-default .cm-tag {color: #170;}
138 | .cm-s-default .cm-attribute {color: #00c;}
139 | .cm-s-default .cm-hr {color: #999;}
140 | .cm-s-default .cm-link {color: #00c;}
141 |
142 | .cm-s-default .cm-error {color: #f00;}
143 | .cm-invalidchar {color: #f00;}
144 |
145 | .CodeMirror-composing { border-bottom: 2px solid; }
146 |
147 | /* Default styles for common addons */
148 |
149 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
150 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
151 | .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
152 | .CodeMirror-activeline-background {background: #e8f2ff;}
153 |
154 | /* STOP */
155 |
156 | /* The rest of this file contains styles related to the mechanics of
157 | the editor. You probably shouldn't touch them. */
158 |
159 | .CodeMirror {
160 | position: relative;
161 | overflow: hidden;
162 | background: white;
163 | }
164 |
165 | .CodeMirror-scroll {
166 | overflow: scroll !important; /* Things will break if this is overridden */
167 | /* 50px is the magic margin used to hide the element's real scrollbars */
168 | /* See overflow: hidden in .CodeMirror */
169 | margin-bottom: -50px; margin-right: -50px;
170 | padding-bottom: 50px;
171 | height: 100%;
172 | outline: none; /* Prevent dragging from highlighting the element */
173 | position: relative;
174 | }
175 | .CodeMirror-sizer {
176 | position: relative;
177 | border-right: 50px solid transparent;
178 | }
179 |
180 | /* The fake, visible scrollbars. Used to force redraw during scrolling
181 | before actual scrolling happens, thus preventing shaking and
182 | flickering artifacts. */
183 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
184 | position: absolute;
185 | z-index: 6;
186 | display: none;
187 | outline: none;
188 | }
189 | .CodeMirror-vscrollbar {
190 | right: 0; top: 0;
191 | overflow-x: hidden;
192 | overflow-y: scroll;
193 | }
194 | .CodeMirror-hscrollbar {
195 | bottom: 0; left: 0;
196 | overflow-y: hidden;
197 | overflow-x: scroll;
198 | }
199 | .CodeMirror-scrollbar-filler {
200 | right: 0; bottom: 0;
201 | }
202 | .CodeMirror-gutter-filler {
203 | left: 0; bottom: 0;
204 | }
205 |
206 | .CodeMirror-gutters {
207 | position: absolute; left: 0; top: 0;
208 | min-height: 100%;
209 | z-index: 3;
210 | }
211 | .CodeMirror-gutter {
212 | white-space: normal;
213 | height: 100%;
214 | display: inline-block;
215 | vertical-align: top;
216 | margin-bottom: -50px;
217 | }
218 | .CodeMirror-gutter-wrapper {
219 | position: absolute;
220 | z-index: 4;
221 | background: none !important;
222 | border: none !important;
223 | }
224 | .CodeMirror-gutter-background {
225 | position: absolute;
226 | top: 0; bottom: 0;
227 | z-index: 4;
228 | }
229 | .CodeMirror-gutter-elt {
230 | position: absolute;
231 | cursor: default;
232 | z-index: 4;
233 | }
234 | .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
235 | .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
236 |
237 | .CodeMirror-lines {
238 | cursor: text;
239 | min-height: 1px; /* prevents collapsing before first draw */
240 | }
241 | .CodeMirror pre.CodeMirror-line,
242 | .CodeMirror pre.CodeMirror-line-like {
243 | /* Reset some styles that the rest of the page might have set */
244 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
245 | border-width: 0;
246 | background: transparent;
247 | font-family: inherit;
248 | font-size: inherit;
249 | margin: 0;
250 | white-space: pre;
251 | word-wrap: normal;
252 | line-height: inherit;
253 | color: inherit;
254 | z-index: 2;
255 | position: relative;
256 | overflow: visible;
257 | -webkit-tap-highlight-color: transparent;
258 | -webkit-font-variant-ligatures: contextual;
259 | font-variant-ligatures: contextual;
260 | }
261 | .CodeMirror-wrap pre.CodeMirror-line,
262 | .CodeMirror-wrap pre.CodeMirror-line-like {
263 | word-wrap: break-word;
264 | white-space: pre-wrap;
265 | word-break: normal;
266 | }
267 |
268 | .CodeMirror-linebackground {
269 | position: absolute;
270 | left: 0; right: 0; top: 0; bottom: 0;
271 | z-index: 0;
272 | }
273 |
274 | .CodeMirror-linewidget {
275 | position: relative;
276 | z-index: 2;
277 | padding: 0.1px; /* Force widget margins to stay inside of the container */
278 | }
279 |
280 | .CodeMirror-widget {}
281 |
282 | .CodeMirror-rtl pre { direction: rtl; }
283 |
284 | .CodeMirror-code {
285 | outline: none;
286 | }
287 |
288 | /* Force content-box sizing for the elements where we expect it */
289 | .CodeMirror-scroll,
290 | .CodeMirror-sizer,
291 | .CodeMirror-gutter,
292 | .CodeMirror-gutters,
293 | .CodeMirror-linenumber {
294 | -moz-box-sizing: content-box;
295 | box-sizing: content-box;
296 | }
297 |
298 | .CodeMirror-measure {
299 | position: absolute;
300 | width: 100%;
301 | height: 0;
302 | overflow: hidden;
303 | visibility: hidden;
304 | }
305 |
306 | .CodeMirror-cursor {
307 | position: absolute;
308 | pointer-events: none;
309 | }
310 | .CodeMirror-measure pre { position: static; }
311 |
312 | div.CodeMirror-cursors {
313 | visibility: hidden;
314 | position: relative;
315 | z-index: 3;
316 | }
317 | div.CodeMirror-dragcursors {
318 | visibility: visible;
319 | }
320 |
321 | .CodeMirror-focused div.CodeMirror-cursors {
322 | visibility: visible;
323 | }
324 |
325 | .CodeMirror-selected { background: #d9d9d9; }
326 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
327 | .CodeMirror-crosshair { cursor: crosshair; }
328 | .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
329 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
330 |
331 | .cm-searching {
332 | background-color: #ffa;
333 | background-color: rgba(255, 255, 0, .4);
334 | }
335 |
336 | /* Used to force a border model for a node */
337 | .cm-force-border { padding-right: .1px; }
338 |
339 | @media print {
340 | /* Hide the cursor when printing */
341 | .CodeMirror div.CodeMirror-cursors {
342 | visibility: hidden;
343 | }
344 | }
345 |
346 | /* See issue #2901 */
347 | .cm-tab-wrap-hack:after { content: ''; }
348 |
349 | /* Help users use markselection to safely style text background */
350 | span.CodeMirror-selectedtext { background: none; }
351 | :root{--sn-stylekit-base-font-size: 13px;--sn-stylekit-font-size-p: 1.0rem;--sn-stylekit-font-size-editor: 1.21rem;--sn-stylekit-font-size-h6: 0.8rem;--sn-stylekit-font-size-h5: 0.9rem;--sn-stylekit-font-size-h4: 1.0rem;--sn-stylekit-font-size-h3: 1.1rem;--sn-stylekit-font-size-h2: 1.2rem;--sn-stylekit-font-size-h1: 1.3rem;--sn-stylekit-neutral-color: #989898;--sn-stylekit-neutral-contrast-color: white;--sn-stylekit-info-color: #086DD6;--sn-stylekit-info-contrast-color: white;--sn-stylekit-success-color: #2B9612;--sn-stylekit-success-contrast-color: white;--sn-stylekit-warning-color: #f6a200;--sn-stylekit-warning-contrast-color: white;--sn-stylekit-danger-color: #F80324;--sn-stylekit-danger-contrast-color: white;--sn-stylekit-shadow-color: #C8C8C8;--sn-stylekit-background-color: white;--sn-stylekit-border-color: #e3e3e3;--sn-stylekit-foreground-color: black;--sn-stylekit-contrast-background-color: #F6F6F6;--sn-stylekit-contrast-foreground-color: #2e2e2e;--sn-stylekit-contrast-border-color: #e3e3e3;--sn-stylekit-secondary-background-color: #F6F6F6;--sn-stylekit-secondary-foreground-color: #2e2e2e;--sn-stylekit-secondary-border-color: #e3e3e3;--sn-stylekit-secondary-contrast-background-color: #e3e3e3;--sn-stylekit-secondary-contrast-foreground-color: #2e2e2e;--sn-styleki--secondary-contrast-border-color: #a2a2a2;--sn-stylekit-editor-background-color: var(--sn-stylekit-background-color);--sn-stylekit-editor-foreground-color: var(--sn-stylekit-foreground-color);--sn-stylekit-paragraph-text-color: #454545;--sn-stylekit-input-placeholder-color: rgb(168, 168, 168);--sn-stylekit-input-border-color: #e3e3e3;--sn-stylekit-scrollbar-thumb-color: #dfdfdf;--sn-stylekit-scrollbar-track-border-color: #E7E7E7;--sn-stylekit-general-border-radius: 2px;--sn-stylekit-simplified-chinese-font: "Microsoft Yahei", "微软雅黑体";--sn-stylekit-monospace-font: "Ubuntu Mono", courier, monospace;--sn-stylekit-sans-serif-font: -apple-system, BlinkMacSystemFont, "Segoe UI",
352 | "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
353 | "Helvetica Neue", var(--sn-stylekit-simplified-chinese-font), sans-serif}.sn-component{font-family:var(--sn-stylekit-sans-serif-font);-webkit-font-smoothing:antialiased;color:var(--sn-stylekit-foreground-color)}.sn-component .sk-panel{box-shadow:0px 2px 5px var(--sn-stylekit-shadow-color);background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-border-color);border-radius:var(--sn-stylekit-general-border-radius);display:flex;flex-direction:column;overflow:auto;flex-grow:1}.sn-component .sk-panel a:hover{text-decoration:underline}.sn-component .sk-panel.static{box-shadow:none;border:none;border-radius:0}.sn-component .sk-panel .sk-panel-header{flex-shrink:0;display:flex;justify-content:space-between;padding:1.1rem 2rem;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);align-items:center}.sn-component .sk-panel .sk-panel-header .sk-panel-header-title{font-size:var(--sn-stylekit-font-size-h1);font-weight:500}.sn-component .sk-panel .sk-panel-header .close-button{font-weight:bold}.sn-component .sk-panel .sk-footer,.sn-component .sk-panel .sk-panel-footer{padding:1rem 2rem;border-top:1px solid var(--sn-stylekit-border-color);box-sizing:border-box}.sn-component .sk-panel .sk-footer.extra-padding,.sn-component .sk-panel .sk-panel-footer.extra-padding{padding:2rem 2rem}.sn-component .sk-panel .sk-footer .left,.sn-component .sk-panel .sk-panel-footer .left{text-align:left;display:block}.sn-component .sk-panel .sk-footer .right,.sn-component .sk-panel .sk-panel-footer .right{text-align:right;display:block}.sn-component .sk-panel .sk-panel-content{padding:1.6rem 2rem;padding-bottom:0;flex-grow:1;overflow:scroll;height:100%;overflow-y:auto !important;overflow-x:auto !important}.sn-component .sk-panel .sk-panel-content .sk-p,.sn-component .sk-panel .sk-panel-content .sk-li{color:var(--sn-stylekit-paragraph-text-color);line-height:1.3}.sn-component .sk-panel-section{padding-bottom:1.6rem;display:flex;flex-direction:column}.sn-component .sk-panel-section.sk-panel-hero{text-align:center}.sn-component .sk-panel-section .sk-p:last-child{margin-bottom:0}.sn-component .sk-panel-section:not(:last-child){margin-bottom:1.5rem;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-panel-section:not(:last-child).no-border{border-bottom:none}.sn-component .sk-panel-section:last-child{margin-bottom:0.5rem}.sn-component .sk-panel-section.no-bottom-pad{padding-bottom:0;margin-bottom:0}.sn-component .sk-panel-section .sk-panel-section-title{margin-bottom:0.5rem;font-weight:bold;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-outer-title{border-bottom:1px solid var(--sn-stylekit-border-color);padding-bottom:0.9rem;margin-top:2.1rem;margin-bottom:15px;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-panel-section .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-h5);margin-bottom:2px}.sn-component .sk-panel-section .sk-panel-section-subtitle.subtle{font-weight:normal;opacity:0.6}.sn-component .sk-panel-section .text-content .sk-p{margin-bottom:1rem}.sn-component .sk-panel-section .text-content p:first-child{margin-top:0.3rem}.sn-component .sk-panel-row{display:flex;justify-content:space-between;align-items:center;padding-top:0.4rem}.sn-component .sk-panel-row.centered{justify-content:center}.sn-component .sk-panel-row.justify-right{justify-content:flex-end}.sn-component .sk-panel-row.justify-left{justify-content:flex-start}.sn-component .sk-panel-row.align-top{align-items:flex-start}.sn-component .sk-panel-row .sk-panel-column.stretch{width:100%}.sn-component .sk-panel-row.default-padding,.sn-component .sk-panel-row:not(:last-child){padding-bottom:0.4rem}.sn-component .sk-panel-row.condensed{padding-top:0.2rem;padding-bottom:0.2rem}.sn-component .sk-panel-row .sk-p{margin:0;padding:0}.sn-component .vertical-rule{background-color:var(--sn-stylekit-border-color);height:1.5rem;width:1px}.sn-component .sk-panel-form{width:100%}.sn-component .sk-panel-form.half{width:50%}.sn-component .sk-panel-form .form-submit{margin-top:0.15rem}.sn-component .right-aligned{justify-content:flex-end;text-align:right}.sn-component .sk-menu-panel{background-color:var(--sn-stylekit-background-color);border:1px solid var(--sn-stylekit-contrast-border-color);border-radius:var(--sn-stylekit-general-border-radius);overflow:scroll;user-select:none;overflow-y:auto !important;overflow-x:auto !important}.sn-component .sk-menu-panel .sk-menu-panel-header{padding:0.8rem 1rem;border-bottom:1px solid var(--sn-stylekit-contrast-border-color);background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);display:flex;justify-content:space-between;align-items:center}.sn-component .sk-menu-panel .sk-menu-panel-header-title{font-weight:bold;font-size:var(--sn-stylekit-font-size-h4)}.sn-component .sk-menu-panel .sk-menu-panel-header-subtitle{margin-top:0.2rem;opacity:0.6}.sn-component .sk-menu-panel .sk-menu-panel-row{padding:1rem 1rem;cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row:hover{background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column{display:flex;justify-content:center;flex-direction:column}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column:not(:first-child){padding-left:1.0rem;padding-right:0.15rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column.stretch{width:100%}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrows{margin-top:1rem}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow{border:1px solid var(--sn-stylekit-contrast-border-color);margin-top:-1px}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-row:hover,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .sk-menu-panel-subrow:hover{background-color:var(--sn-stylekit-background-color)}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-menu-panel-column .left{display:flex}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-button .sk-panel-section-subtitle,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-box .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-h6);font-weight:normal}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-label,.sn-component .sk-menu-panel .sk-menu-panel-row .sk-panel-section .sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-menu-panel .sk-menu-panel-row .sk-panel-section-subtitle{font-size:var(--sn-stylekit-font-size-p);font-weight:bold}.sn-component .sk-menu-panel .sk-menu-panel-row .sk-sublabel{font-size:var(--sn-stylekit-font-size-h5);margin-top:0.2rem;opacity:0.6}.sn-component .red{color:var(--sn-stylekit-danger-color)}.sn-component .tinted{color:var(--sn-stylekit-info-color)}.sn-component .selectable{user-select:text !important;-ms-user-select:text !important;-moz-user-select:text !important;-webkit-user-select:text !important}.sn-component .sk-h1,.sn-component .sk-h2,.sn-component .sk-h3,.sn-component .sk-h4,.sn-component .sk-h5{margin:0;padding:0;font-weight:normal}.sn-component .sk-h1{font-weight:500;font-size:var(--sn-stylekit-font-size-h1);line-height:1.9rem}.sn-component .sk-h2{font-size:var(--sn-stylekit-font-size-h2);line-height:1.8rem}.sn-component .sk-h3{font-size:var(--sn-stylekit-font-size-h3);line-height:1.7rem}.sn-component .sk-h4{font-size:var(--sn-stylekit-font-size-p);line-height:1.4rem}.sn-component .sk-h5{font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-bold{font-weight:bold}.sn-component .sk-font-small{font-size:var(--sn-stylekit-font-size-h5)}.sn-component .sk-font-normal{font-size:var(--sn-stylekit-font-size-p)}.sn-component .sk-font-large{font-size:var(--sn-stylekit-font-size-h3)}.sn-component a.sk-a{cursor:pointer;user-select:none}.sn-component a.sk-a.disabled{color:var(--sn-stylekit-neutral-color);opacity:0.6}.sn-component a.sk-a.boxed{border-radius:var(--sn-stylekit-general-border-radius);padding:0.3rem 0.4rem}.sn-component a.sk-a.boxed:hover{text-decoration:none}.sn-component a.sk-a.boxed.neutral{background-color:var(--sn-stylekit-neutral-color);color:var(--sn-stylekit-neutral-contrast-color)}.sn-component a.sk-a.boxed.info{background-color:var(--sn-stylekit-info-color);color:var(--sn-stylekit-info-contrast-color)}.sn-component a.sk-a.boxed.warning{background-color:var(--sn-stylekit-warning-color);color:var(--sn-stylekit-warning-contrast-color)}.sn-component a.sk-a.boxed.danger{background-color:var(--sn-stylekit-danger-color);color:var(--sn-stylekit-danger-contrast-color)}.sn-component a.sk-a.boxed.success{background-color:var(--sn-stylekit-success-color);color:var(--sn-stylekit-success-contrast-color)}.sn-component .wrap{word-wrap:break-word}.sn-component *.sk-base{color:var(--sn-stylekit-foreground-color)}.sn-component *.contrast{color:var(--sn-stylekit-contrast-foreground-color)}.sn-component *.neutral{color:var(--sn-stylekit-neutral-color)}.sn-component *.info{color:var(--sn-stylekit-info-color)}.sn-component *.info-contrast{color:var(--sn-stylekit-info-contrast-color)}.sn-component *.warning{color:var(--sn-stylekit-warning-color)}.sn-component *.danger{color:var(--sn-stylekit-danger-color)}.sn-component *.success{color:var(--sn-stylekit-success-color)}.sn-component *.info-i{color:var(--sn-stylekit-info-color) !important}.sn-component *.warning-i{color:var(--sn-stylekit-warning-color) !important}.sn-component *.danger-i{color:var(--sn-stylekit-danger-color) !important}.sn-component *.success-i{color:var(--sn-stylekit-success-color) !important}.sn-component *.clear{background-color:transparent;border:none}.sn-component .center-text{text-align:center !important;justify-content:center !important}.sn-component p.sk-p{margin:0.5rem 0}.sn-component input.sk-input{box-sizing:border-box;padding:0.7rem 0.8rem;margin:0.30rem 0;border:none;font-size:var(--sn-stylekit-font-size-h3);width:100%;outline:0;resize:none}.sn-component input.sk-input.clear{color:var(--sn-stylekit-foreground-color);background-color:transparent;border:none}.sn-component input.sk-input.no-border{border:none}.sn-component .sk-label,.sn-component .sk-panel-section .sk-panel-section-subtitle{font-weight:bold}.sn-component .sk-label.no-bold,.sn-component .sk-panel-section .no-bold.sk-panel-section-subtitle{font-weight:normal}.sn-component label.sk-label,.sn-component .sk-panel-section label.sk-panel-section-subtitle{margin:0.7rem 0;display:block}.sn-component label.sk-label input[type='checkbox'],.sn-component .sk-panel-section label.sk-panel-section-subtitle input[type='checkbox'],.sn-component input[type='radio']{width:auto;margin-right:0.45rem;vertical-align:middle}.sn-component .sk-horizontal-group>*,.sn-component .sk-input-group>*{display:inline-block;vertical-align:middle}.sn-component .sk-horizontal-group>*:not(:first-child),.sn-component .sk-input-group>*:not(:first-child){margin-left:0.9rem}.sn-component .sk-border-bottom{border-bottom:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-checkbox-group{padding-top:0.5rem;padding-bottom:0.3rem}.sn-component ::placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component :-ms-input-placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component ::-ms-input-placeholder{color:var(--sn-stylekit-input-placeholder-color)}.sn-component .sk-button-group.stretch{display:flex;width:100%}.sn-component .sk-button-group.stretch .sk-button,.sn-component .sk-button-group.stretch .sk-box{display:block;flex-grow:1;text-align:center}.sn-component .sk-button-group .sk-button,.sn-component .sk-button-group .sk-box{display:inline-block;vertical-align:middle}.sn-component .sk-button-group .sk-button:not(:last-child),.sn-component .sk-button-group .sk-box:not(:last-child){margin-right:5px}.sn-component .sk-button-group .sk-button:not(:last-child).featured,.sn-component .sk-button-group .sk-box:not(:last-child).featured{margin-right:8px}.sn-component .sk-segmented-buttons{display:flex;flex-direction:row}.sn-component .sk-segmented-buttons .sk-button,.sn-component .sk-segmented-buttons .sk-box{border-radius:0;white-space:nowrap;margin:0;margin-left:0 !important;margin-right:0 !important}.sn-component .sk-segmented-buttons .sk-button:not(:last-child),.sn-component .sk-segmented-buttons .sk-box:not(:last-child){border-right:none;border-radius:0}.sn-component .sk-segmented-buttons .sk-button:first-child,.sn-component .sk-segmented-buttons .sk-box:first-child{border-top-left-radius:var(--sn-stylekit-general-border-radius);border-bottom-left-radius:var(--sn-stylekit-general-border-radius);border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.sn-component .sk-segmented-buttons .sk-button:last-child,.sn-component .sk-segmented-buttons .sk-box:last-child{border-top-right-radius:var(--sn-stylekit-general-border-radius);border-bottom-right-radius:var(--sn-stylekit-general-border-radius);border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.sn-component .sk-box-group .sk-box{display:inline-block}.sn-component .sk-box-group .sk-box:not(:last-child){margin-right:5px}.sn-component .sk-a.button{text-decoration:none}.sn-component .sk-button,.sn-component .sk-box{display:table;padding:0.5rem 0.7rem;font-size:var(--sn-stylekit-font-size-h5);cursor:pointer;text-align:center;user-select:none}.sn-component .sk-button.no-hover-border:after,.sn-component .no-hover-border.sk-box:after{color:transparent !important}.sn-component .sk-button.wide,.sn-component .wide.sk-box{padding:0.3rem 1.7rem}.sn-component .sk-button>.sk-label,.sn-component .sk-box>.sk-label,.sn-component .sk-panel-section .sk-button>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-box>.sk-panel-section-subtitle{font-weight:bold;display:block;text-align:center}.sn-component .sk-button.big,.sn-component .big.sk-box{font-size:var(--sn-stylekit-font-size-h3);padding:0.7rem 2.5rem}.sn-component .sk-box{padding:2.5rem 1.5rem}.sn-component .sk-button.sk-base,.sn-component .sk-base.sk-box,.sn-component .sk-box.sk-base,.sn-component .sk-circle.sk-base{color:var(--sn-stylekit-foreground-color);position:relative;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-background-color)}.sn-component .sk-button.sk-base *,.sn-component .sk-base.sk-box *,.sn-component .sk-box.sk-base *,.sn-component .sk-circle.sk-base *{position:relative}.sn-component .sk-button.sk-base:before,.sn-component .sk-base.sk-box:before,.sn-component .sk-box.sk-base:before,.sn-component .sk-circle.sk-base:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-base:after,.sn-component .sk-base.sk-box:after,.sn-component .sk-box.sk-base:after,.sn-component .sk-circle.sk-base:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-background-color)}.sn-component .sk-button.sk-base:hover:before,.sn-component .sk-base.sk-box:hover:before,.sn-component .sk-box.sk-base:hover:before,.sn-component .sk-circle.sk-base:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-base.no-bg,.sn-component .sk-base.no-bg.sk-box,.sn-component .sk-box.sk-base.no-bg,.sn-component .sk-circle.sk-base.no-bg{background-color:transparent}.sn-component .sk-button.sk-base.no-bg:before,.sn-component .sk-base.no-bg.sk-box:before,.sn-component .sk-box.sk-base.no-bg:before,.sn-component .sk-circle.sk-base.no-bg:before{content:none}.sn-component .sk-button.sk-base.featured,.sn-component .sk-base.featured.sk-box,.sn-component .sk-box.sk-base.featured,.sn-component .sk-circle.sk-base.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-base.featured:before,.sn-component .sk-base.featured.sk-box:before,.sn-component .sk-box.sk-base.featured:before,.sn-component .sk-circle.sk-base.featured:before{opacity:1.0}.sn-component .sk-button.contrast,.sn-component .contrast.sk-box,.sn-component .sk-box.contrast,.sn-component .sk-circle.contrast{color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-contrast-background-color)}.sn-component .sk-button.contrast *,.sn-component .contrast.sk-box *,.sn-component .sk-box.contrast *,.sn-component .sk-circle.contrast *{position:relative}.sn-component .sk-button.contrast:before,.sn-component .contrast.sk-box:before,.sn-component .sk-box.contrast:before,.sn-component .sk-circle.contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.contrast:after,.sn-component .contrast.sk-box:after,.sn-component .sk-box.contrast:after,.sn-component .sk-circle.contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-contrast-background-color)}.sn-component .sk-button.contrast:hover:before,.sn-component .contrast.sk-box:hover:before,.sn-component .sk-box.contrast:hover:before,.sn-component .sk-circle.contrast:hover:before{filter:brightness(130%)}.sn-component .sk-button.contrast.no-bg,.sn-component .contrast.no-bg.sk-box,.sn-component .sk-box.contrast.no-bg,.sn-component .sk-circle.contrast.no-bg{background-color:transparent}.sn-component .sk-button.contrast.no-bg:before,.sn-component .contrast.no-bg.sk-box:before,.sn-component .sk-box.contrast.no-bg:before,.sn-component .sk-circle.contrast.no-bg:before{content:none}.sn-component .sk-button.contrast.featured,.sn-component .contrast.featured.sk-box,.sn-component .sk-box.contrast.featured,.sn-component .sk-circle.contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.contrast.featured:before,.sn-component .contrast.featured.sk-box:before,.sn-component .sk-box.contrast.featured:before,.sn-component .sk-circle.contrast.featured:before{opacity:1.0}.sn-component .sk-button.sk-secondary,.sn-component .sk-secondary.sk-box,.sn-component .sk-box.sk-secondary,.sn-component .sk-circle.sk-secondary{color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-button.sk-secondary *,.sn-component .sk-secondary.sk-box *,.sn-component .sk-box.sk-secondary *,.sn-component .sk-circle.sk-secondary *{position:relative}.sn-component .sk-button.sk-secondary:before,.sn-component .sk-secondary.sk-box:before,.sn-component .sk-box.sk-secondary:before,.sn-component .sk-circle.sk-secondary:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-secondary:after,.sn-component .sk-secondary.sk-box:after,.sn-component .sk-box.sk-secondary:after,.sn-component .sk-circle.sk-secondary:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-secondary-background-color)}.sn-component .sk-button.sk-secondary:hover:before,.sn-component .sk-secondary.sk-box:hover:before,.sn-component .sk-box.sk-secondary:hover:before,.sn-component .sk-circle.sk-secondary:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-secondary.no-bg,.sn-component .sk-secondary.no-bg.sk-box,.sn-component .sk-box.sk-secondary.no-bg,.sn-component .sk-circle.sk-secondary.no-bg{background-color:transparent}.sn-component .sk-button.sk-secondary.no-bg:before,.sn-component .sk-secondary.no-bg.sk-box:before,.sn-component .sk-box.sk-secondary.no-bg:before,.sn-component .sk-circle.sk-secondary.no-bg:before{content:none}.sn-component .sk-button.sk-secondary.featured,.sn-component .sk-secondary.featured.sk-box,.sn-component .sk-box.sk-secondary.featured,.sn-component .sk-circle.sk-secondary.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-secondary.featured:before,.sn-component .sk-secondary.featured.sk-box:before,.sn-component .sk-box.sk-secondary.featured:before,.sn-component .sk-circle.sk-secondary.featured:before{opacity:1.0}.sn-component .sk-button.sk-secondary-contrast,.sn-component .sk-secondary-contrast.sk-box,.sn-component .sk-box.sk-secondary-contrast,.sn-component .sk-circle.sk-secondary-contrast{color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-button.sk-secondary-contrast *,.sn-component .sk-secondary-contrast.sk-box *,.sn-component .sk-box.sk-secondary-contrast *,.sn-component .sk-circle.sk-secondary-contrast *{position:relative}.sn-component .sk-button.sk-secondary-contrast:before,.sn-component .sk-secondary-contrast.sk-box:before,.sn-component .sk-box.sk-secondary-contrast:before,.sn-component .sk-circle.sk-secondary-contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.sk-secondary-contrast:after,.sn-component .sk-secondary-contrast.sk-box:after,.sn-component .sk-box.sk-secondary-contrast:after,.sn-component .sk-circle.sk-secondary-contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-secondary-contrast-background-color)}.sn-component .sk-button.sk-secondary-contrast:hover:before,.sn-component .sk-secondary-contrast.sk-box:hover:before,.sn-component .sk-box.sk-secondary-contrast:hover:before,.sn-component .sk-circle.sk-secondary-contrast:hover:before{filter:brightness(130%)}.sn-component .sk-button.sk-secondary-contrast.no-bg,.sn-component .sk-secondary-contrast.no-bg.sk-box,.sn-component .sk-box.sk-secondary-contrast.no-bg,.sn-component .sk-circle.sk-secondary-contrast.no-bg{background-color:transparent}.sn-component .sk-button.sk-secondary-contrast.no-bg:before,.sn-component .sk-secondary-contrast.no-bg.sk-box:before,.sn-component .sk-box.sk-secondary-contrast.no-bg:before,.sn-component .sk-circle.sk-secondary-contrast.no-bg:before{content:none}.sn-component .sk-button.sk-secondary-contrast.featured,.sn-component .sk-secondary-contrast.featured.sk-box,.sn-component .sk-box.sk-secondary-contrast.featured,.sn-component .sk-circle.sk-secondary-contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.sk-secondary-contrast.featured:before,.sn-component .sk-secondary-contrast.featured.sk-box:before,.sn-component .sk-box.sk-secondary-contrast.featured:before,.sn-component .sk-circle.sk-secondary-contrast.featured:before{opacity:1.0}.sn-component .sk-button.neutral,.sn-component .neutral.sk-box,.sn-component .sk-box.neutral,.sn-component .sk-circle.neutral{color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-neutral-color)}.sn-component .sk-button.neutral *,.sn-component .neutral.sk-box *,.sn-component .sk-box.neutral *,.sn-component .sk-circle.neutral *{position:relative}.sn-component .sk-button.neutral:before,.sn-component .neutral.sk-box:before,.sn-component .sk-box.neutral:before,.sn-component .sk-circle.neutral:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-neutral-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.neutral:after,.sn-component .neutral.sk-box:after,.sn-component .sk-box.neutral:after,.sn-component .sk-circle.neutral:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-neutral-color)}.sn-component .sk-button.neutral:hover:before,.sn-component .neutral.sk-box:hover:before,.sn-component .sk-box.neutral:hover:before,.sn-component .sk-circle.neutral:hover:before{filter:brightness(130%)}.sn-component .sk-button.neutral.no-bg,.sn-component .neutral.no-bg.sk-box,.sn-component .sk-box.neutral.no-bg,.sn-component .sk-circle.neutral.no-bg{background-color:transparent}.sn-component .sk-button.neutral.no-bg:before,.sn-component .neutral.no-bg.sk-box:before,.sn-component .sk-box.neutral.no-bg:before,.sn-component .sk-circle.neutral.no-bg:before{content:none}.sn-component .sk-button.neutral.featured,.sn-component .neutral.featured.sk-box,.sn-component .sk-box.neutral.featured,.sn-component .sk-circle.neutral.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.neutral.featured:before,.sn-component .neutral.featured.sk-box:before,.sn-component .sk-box.neutral.featured:before,.sn-component .sk-circle.neutral.featured:before{opacity:1.0}.sn-component .sk-button.info,.sn-component .info.sk-box,.sn-component .sk-box.info,.sn-component .sk-circle.info{color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-info-color)}.sn-component .sk-button.info *,.sn-component .info.sk-box *,.sn-component .sk-box.info *,.sn-component .sk-circle.info *{position:relative}.sn-component .sk-button.info:before,.sn-component .info.sk-box:before,.sn-component .sk-box.info:before,.sn-component .sk-circle.info:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-info-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.info:after,.sn-component .info.sk-box:after,.sn-component .sk-box.info:after,.sn-component .sk-circle.info:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-info-color)}.sn-component .sk-button.info:hover:before,.sn-component .info.sk-box:hover:before,.sn-component .sk-box.info:hover:before,.sn-component .sk-circle.info:hover:before{filter:brightness(130%)}.sn-component .sk-button.info.no-bg,.sn-component .info.no-bg.sk-box,.sn-component .sk-box.info.no-bg,.sn-component .sk-circle.info.no-bg{background-color:transparent}.sn-component .sk-button.info.no-bg:before,.sn-component .info.no-bg.sk-box:before,.sn-component .sk-box.info.no-bg:before,.sn-component .sk-circle.info.no-bg:before{content:none}.sn-component .sk-button.info.featured,.sn-component .info.featured.sk-box,.sn-component .sk-box.info.featured,.sn-component .sk-circle.info.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.info.featured:before,.sn-component .info.featured.sk-box:before,.sn-component .sk-box.info.featured:before,.sn-component .sk-circle.info.featured:before{opacity:1.0}.sn-component .sk-button.warning,.sn-component .warning.sk-box,.sn-component .sk-box.warning,.sn-component .sk-circle.warning{color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-button.warning *,.sn-component .warning.sk-box *,.sn-component .sk-box.warning *,.sn-component .sk-circle.warning *{position:relative}.sn-component .sk-button.warning:before,.sn-component .warning.sk-box:before,.sn-component .sk-box.warning:before,.sn-component .sk-circle.warning:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-warning-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.warning:after,.sn-component .warning.sk-box:after,.sn-component .sk-box.warning:after,.sn-component .sk-circle.warning:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-warning-color)}.sn-component .sk-button.warning:hover:before,.sn-component .warning.sk-box:hover:before,.sn-component .sk-box.warning:hover:before,.sn-component .sk-circle.warning:hover:before{filter:brightness(130%)}.sn-component .sk-button.warning.no-bg,.sn-component .warning.no-bg.sk-box,.sn-component .sk-box.warning.no-bg,.sn-component .sk-circle.warning.no-bg{background-color:transparent}.sn-component .sk-button.warning.no-bg:before,.sn-component .warning.no-bg.sk-box:before,.sn-component .sk-box.warning.no-bg:before,.sn-component .sk-circle.warning.no-bg:before{content:none}.sn-component .sk-button.warning.featured,.sn-component .warning.featured.sk-box,.sn-component .sk-box.warning.featured,.sn-component .sk-circle.warning.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.warning.featured:before,.sn-component .warning.featured.sk-box:before,.sn-component .sk-box.warning.featured:before,.sn-component .sk-circle.warning.featured:before{opacity:1.0}.sn-component .sk-button.danger,.sn-component .danger.sk-box,.sn-component .sk-box.danger,.sn-component .sk-circle.danger{color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-danger-color)}.sn-component .sk-button.danger *,.sn-component .danger.sk-box *,.sn-component .sk-box.danger *,.sn-component .sk-circle.danger *{position:relative}.sn-component .sk-button.danger:before,.sn-component .danger.sk-box:before,.sn-component .sk-box.danger:before,.sn-component .sk-circle.danger:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-danger-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.danger:after,.sn-component .danger.sk-box:after,.sn-component .sk-box.danger:after,.sn-component .sk-circle.danger:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-danger-color)}.sn-component .sk-button.danger:hover:before,.sn-component .danger.sk-box:hover:before,.sn-component .sk-box.danger:hover:before,.sn-component .sk-circle.danger:hover:before{filter:brightness(130%)}.sn-component .sk-button.danger.no-bg,.sn-component .danger.no-bg.sk-box,.sn-component .sk-box.danger.no-bg,.sn-component .sk-circle.danger.no-bg{background-color:transparent}.sn-component .sk-button.danger.no-bg:before,.sn-component .danger.no-bg.sk-box:before,.sn-component .sk-box.danger.no-bg:before,.sn-component .sk-circle.danger.no-bg:before{content:none}.sn-component .sk-button.danger.featured,.sn-component .danger.featured.sk-box,.sn-component .sk-box.danger.featured,.sn-component .sk-circle.danger.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.danger.featured:before,.sn-component .danger.featured.sk-box:before,.sn-component .sk-box.danger.featured:before,.sn-component .sk-circle.danger.featured:before{opacity:1.0}.sn-component .sk-button.success,.sn-component .success.sk-box,.sn-component .sk-box.success,.sn-component .sk-circle.success{color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-success-color)}.sn-component .sk-button.success *,.sn-component .success.sk-box *,.sn-component .sk-box.success *,.sn-component .sk-circle.success *{position:relative}.sn-component .sk-button.success:before,.sn-component .success.sk-box:before,.sn-component .sk-box.success:before,.sn-component .sk-circle.success:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-success-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-button.success:after,.sn-component .success.sk-box:after,.sn-component .sk-box.success:after,.sn-component .sk-circle.success:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-success-color)}.sn-component .sk-button.success:hover:before,.sn-component .success.sk-box:hover:before,.sn-component .sk-box.success:hover:before,.sn-component .sk-circle.success:hover:before{filter:brightness(130%)}.sn-component .sk-button.success.no-bg,.sn-component .success.no-bg.sk-box,.sn-component .sk-box.success.no-bg,.sn-component .sk-circle.success.no-bg{background-color:transparent}.sn-component .sk-button.success.no-bg:before,.sn-component .success.no-bg.sk-box:before,.sn-component .sk-box.success.no-bg:before,.sn-component .sk-circle.success.no-bg:before{content:none}.sn-component .sk-button.success.featured,.sn-component .success.featured.sk-box,.sn-component .sk-box.success.featured,.sn-component .sk-circle.success.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-button.success.featured:before,.sn-component .success.featured.sk-box:before,.sn-component .sk-box.success.featured:before,.sn-component .sk-circle.success.featured:before{opacity:1.0}.sn-component .sk-notification.contrast,.sn-component .sk-input.contrast{color:var(--sn-stylekit-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-contrast-border-color);border:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-notification.contrast *,.sn-component .sk-input.contrast *{position:relative}.sn-component .sk-notification.contrast:before,.sn-component .sk-input.contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.contrast:after,.sn-component .sk-input.contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-contrast-border-color);border-color:var(--sn-stylekit-contrast-border-color)}.sn-component .sk-notification.contrast.no-bg,.sn-component .sk-input.contrast.no-bg{background-color:transparent}.sn-component .sk-notification.contrast.no-bg:before,.sn-component .sk-input.contrast.no-bg:before{content:none}.sn-component .sk-notification.contrast.featured,.sn-component .sk-input.contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.contrast.featured:before,.sn-component .sk-input.contrast.featured:before{opacity:1.0}.sn-component .sk-notification.sk-secondary,.sn-component .sk-input.sk-secondary{color:var(--sn-stylekit-secondary-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-border-color);border:1px solid var(--sn-stylekit-secondary-border-color)}.sn-component .sk-notification.sk-secondary *,.sn-component .sk-input.sk-secondary *{position:relative}.sn-component .sk-notification.sk-secondary:before,.sn-component .sk-input.sk-secondary:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-secondary:after,.sn-component .sk-input.sk-secondary:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-secondary-border-color);border-color:var(--sn-stylekit-secondary-border-color)}.sn-component .sk-notification.sk-secondary.no-bg,.sn-component .sk-input.sk-secondary.no-bg{background-color:transparent}.sn-component .sk-notification.sk-secondary.no-bg:before,.sn-component .sk-input.sk-secondary.no-bg:before{content:none}.sn-component .sk-notification.sk-secondary.featured,.sn-component .sk-input.sk-secondary.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-secondary.featured:before,.sn-component .sk-input.sk-secondary.featured:before{opacity:1.0}.sn-component .sk-notification.sk-secondary-contrast,.sn-component .sk-input.sk-secondary-contrast{color:var(--sn-stylekit-secondary-contrast-foreground-color);position:relative;background-color:var(--sn-stylekit-secondary-contrast-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-secondary-contrast-border-color);border:1px solid var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-notification.sk-secondary-contrast *,.sn-component .sk-input.sk-secondary-contrast *{position:relative}.sn-component .sk-notification.sk-secondary-contrast:before,.sn-component .sk-input.sk-secondary-contrast:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-secondary-contrast-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-secondary-contrast:after,.sn-component .sk-input.sk-secondary-contrast:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-secondary-contrast-border-color);border-color:var(--sn-stylekit-secondary-contrast-border-color)}.sn-component .sk-notification.sk-secondary-contrast.no-bg,.sn-component .sk-input.sk-secondary-contrast.no-bg{background-color:transparent}.sn-component .sk-notification.sk-secondary-contrast.no-bg:before,.sn-component .sk-input.sk-secondary-contrast.no-bg:before{content:none}.sn-component .sk-notification.sk-secondary-contrast.featured,.sn-component .sk-input.sk-secondary-contrast.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-secondary-contrast.featured:before,.sn-component .sk-input.sk-secondary-contrast.featured:before{opacity:1.0}.sn-component .sk-notification.sk-base,.sn-component .sk-input.sk-base{color:var(--sn-stylekit-foreground-color);position:relative;background-color:var(--sn-stylekit-background-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-border-color);border:1px solid var(--sn-stylekit-border-color)}.sn-component .sk-notification.sk-base *,.sn-component .sk-input.sk-base *{position:relative}.sn-component .sk-notification.sk-base:before,.sn-component .sk-input.sk-base:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-background-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.sk-base:after,.sn-component .sk-input.sk-base:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;color:var(--sn-stylekit-border-color);border-color:var(--sn-stylekit-border-color)}.sn-component .sk-notification.sk-base.no-bg,.sn-component .sk-input.sk-base.no-bg{background-color:transparent}.sn-component .sk-notification.sk-base.no-bg:before,.sn-component .sk-input.sk-base.no-bg:before{content:none}.sn-component .sk-notification.sk-base.featured,.sn-component .sk-input.sk-base.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.sk-base.featured:before,.sn-component .sk-input.sk-base.featured:before{opacity:1.0}.sn-component .sk-notification.neutral,.sn-component .sk-input.neutral{color:var(--sn-stylekit-neutral-contrast-color);position:relative;background-color:var(--sn-stylekit-neutral-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-neutral-color)}.sn-component .sk-notification.neutral *,.sn-component .sk-input.neutral *{position:relative}.sn-component .sk-notification.neutral:before,.sn-component .sk-input.neutral:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-neutral-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.neutral:after,.sn-component .sk-input.neutral:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-neutral-color)}.sn-component .sk-notification.neutral.no-bg,.sn-component .sk-input.neutral.no-bg{background-color:transparent}.sn-component .sk-notification.neutral.no-bg:before,.sn-component .sk-input.neutral.no-bg:before{content:none}.sn-component .sk-notification.neutral.featured,.sn-component .sk-input.neutral.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.neutral.featured:before,.sn-component .sk-input.neutral.featured:before{opacity:1.0}.sn-component .sk-notification.info,.sn-component .sk-input.info{color:var(--sn-stylekit-info-contrast-color);position:relative;background-color:var(--sn-stylekit-info-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-info-color)}.sn-component .sk-notification.info *,.sn-component .sk-input.info *{position:relative}.sn-component .sk-notification.info:before,.sn-component .sk-input.info:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-info-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.info:after,.sn-component .sk-input.info:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-info-color)}.sn-component .sk-notification.info.no-bg,.sn-component .sk-input.info.no-bg{background-color:transparent}.sn-component .sk-notification.info.no-bg:before,.sn-component .sk-input.info.no-bg:before{content:none}.sn-component .sk-notification.info.featured,.sn-component .sk-input.info.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.info.featured:before,.sn-component .sk-input.info.featured:before{opacity:1.0}.sn-component .sk-notification.warning,.sn-component .sk-input.warning{color:var(--sn-stylekit-warning-contrast-color);position:relative;background-color:var(--sn-stylekit-warning-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-warning-color)}.sn-component .sk-notification.warning *,.sn-component .sk-input.warning *{position:relative}.sn-component .sk-notification.warning:before,.sn-component .sk-input.warning:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-warning-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.warning:after,.sn-component .sk-input.warning:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-warning-color)}.sn-component .sk-notification.warning.no-bg,.sn-component .sk-input.warning.no-bg{background-color:transparent}.sn-component .sk-notification.warning.no-bg:before,.sn-component .sk-input.warning.no-bg:before{content:none}.sn-component .sk-notification.warning.featured,.sn-component .sk-input.warning.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.warning.featured:before,.sn-component .sk-input.warning.featured:before{opacity:1.0}.sn-component .sk-notification.danger,.sn-component .sk-input.danger{color:var(--sn-stylekit-danger-contrast-color);position:relative;background-color:var(--sn-stylekit-danger-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-danger-color)}.sn-component .sk-notification.danger *,.sn-component .sk-input.danger *{position:relative}.sn-component .sk-notification.danger:before,.sn-component .sk-input.danger:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-danger-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.danger:after,.sn-component .sk-input.danger:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-danger-color)}.sn-component .sk-notification.danger.no-bg,.sn-component .sk-input.danger.no-bg{background-color:transparent}.sn-component .sk-notification.danger.no-bg:before,.sn-component .sk-input.danger.no-bg:before{content:none}.sn-component .sk-notification.danger.featured,.sn-component .sk-input.danger.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.danger.featured:before,.sn-component .sk-input.danger.featured:before{opacity:1.0}.sn-component .sk-notification.success,.sn-component .sk-input.success{color:var(--sn-stylekit-success-contrast-color);position:relative;background-color:var(--sn-stylekit-success-color);overflow:hidden;border-radius:var(--sn-stylekit-general-border-radius);border-color:var(--sn-stylekit-success-color)}.sn-component .sk-notification.success *,.sn-component .sk-input.success *{position:relative}.sn-component .sk-notification.success:before,.sn-component .sk-input.success:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sn-stylekit-success-color);opacity:1.0;border-radius:var(--sn-stylekit-general-border-radius)}.sn-component .sk-notification.success:after,.sn-component .sk-input.success:after{content:'';display:block;height:100%;position:absolute;top:0;left:0;width:100%;border-radius:var(--sn-stylekit-general-border-radius);pointer-events:none;box-shadow:inset 0 0 0 1px;color:var(--sn-stylekit-success-color)}.sn-component .sk-notification.success.no-bg,.sn-component .sk-input.success.no-bg{background-color:transparent}.sn-component .sk-notification.success.no-bg:before,.sn-component .sk-input.success.no-bg:before{content:none}.sn-component .sk-notification.success.featured,.sn-component .sk-input.success.featured{border:none;padding:0.75rem 1.25rem;font-size:var(--sn-stylekit-font-size-h3)}.sn-component .sk-notification.success.featured:before,.sn-component .sk-input.success.featured:before{opacity:1.0}.sn-component .sk-notification{padding:1.1rem 1rem;margin:1.4rem 0;text-align:left;cursor:default}.sn-component .sk-notification.one-line{padding:0rem 0.4rem}.sn-component .sk-notification.stretch{width:100%}.sn-component .sk-notification.dashed{border-style:dashed;border-width:2px}.sn-component .sk-notification.dashed:after{box-shadow:none}.sn-component .sk-notification .sk-notification-title{font-size:var(--sn-stylekit-font-size-h1);font-weight:bold;line-height:1.9rem}.sn-component .sk-notification .sk-notification-text{line-height:1.5rem;font-size:var(--sn-stylekit-font-size-p);text-align:left;font-weight:normal}.sn-component .sk-circle{border:1px solid;cursor:pointer;border-color:var(--sn-stylekit-contrast-foreground-color);background-color:var(--sn-stylekit-contrast-background-color);padding:0;border-radius:50% !important;flex-shrink:0}.sn-component .sk-circle:before{border-radius:50% !important}.sn-component .sk-circle:after{border-radius:50% !important}.sn-component .sk-circle.small{width:11px;height:11px}.sn-component .sk-spinner{border:1px solid var(--sn-stylekit-neutral-color);border-radius:50%;animation:rotate 0.8s infinite linear;border-right-color:transparent}.sn-component .sk-spinner.small{width:12px;height:12px}.sn-component .sk-spinner.info-contrast{border-color:var(--sn-stylekit-info-contrast-color);border-right-color:transparent}.sn-component .sk-spinner.info{border-color:var(--sn-stylekit-info-color);border-right-color:transparent}.sn-component .sk-spinner.warning{border-color:var(--sn-stylekit-warning-color);border-right-color:transparent}.sn-component .sk-spinner.danger{border-color:var(--sn-stylekit-danger-color);border-right-color:transparent}.sn-component .sk-spinner.success{border-color:var(--sn-stylekit-success-color);border-right-color:transparent}@keyframes rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.sn-component .sk-app-bar{display:flex;width:100%;height:2rem;padding:0.0rem 0.8rem;background-color:var(--sn-stylekit-contrast-background-color);color:var(--sn-stylekit-contrast-foreground-color);justify-content:space-between;align-items:center;border:1px solid var(--sn-stylekit-contrast-border-color);user-select:none}.sn-component .sk-app-bar.no-edges{border-left:0;border-right:0}.sn-component .sk-app-bar.no-bottom-edge{border-bottom:0}.sn-component .sk-app-bar .left,.sn-component .sk-app-bar .right{display:flex;height:100%}.sn-component .sk-app-bar .sk-app-bar-item{flex-grow:1;cursor:pointer;display:flex;align-items:center;justify-content:center}.sn-component .sk-app-bar .sk-app-bar-item:not(:first-child){margin-left:1rem}.sn-component .sk-app-bar .sk-app-bar-item.border{border-left:1px solid var(--sn-stylekit-contrast-border-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column{height:100%;display:flex;align-items:center}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column:not(:first-child){margin-left:0.5rem}.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column.underline{border-bottom:2px solid var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item.no-pointer{cursor:default}.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-sublabel:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-label:not(.subtle),.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-panel-section-subtitle:not(.subtle),.sn-component .sk-app-bar .sk-app-bar-item:hover>.sk-app-bar-item-column>.sk-sublabel:not(.subtle){color:var(--sn-stylekit-info-color)}.sn-component .sk-app-bar .sk-app-bar-item>.sk-label,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-panel-section-subtitle,.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-label,.sn-component .sk-app-bar .sk-panel-section .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle,.sn-component .sk-panel-section .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-panel-section-subtitle{font-weight:bold;font-size:var(--sn-stylekit-font-size-h5);white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item>.sk-sublabel,.sn-component .sk-app-bar .sk-app-bar-item>.sk-app-bar-item-column>.sk-sublabel{font-size:var(--sn-stylekit-font-size-h5);font-weight:normal;white-space:nowrap}.sn-component .sk-app-bar .sk-app-bar-item .subtle{font-weight:normal;opacity:0.6}.sn-component .sk-panel-table{display:flex;flex-wrap:wrap;padding-left:1px;padding-top:1px}.sn-component .sk-panel-table .sk-panel-table-item{flex:45%;flex-flow:wrap;border:1px solid var(--sn-stylekit-border-color);padding:1rem;margin-left:-1px;margin-top:-1px;display:flex;flex-direction:column;justify-content:space-between}.sn-component .sk-panel-table .sk-panel-table-item img{max-width:100%;margin-bottom:1rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-content{display:flex;flex-direction:row}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column{align-items:center}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.stretch{width:100%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column:not(:first-child){padding-left:0.75rem}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.quarter{flex-basis:25%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-column.three-quarters{flex-basis:75%}.sn-component .sk-panel-table .sk-panel-table-item .sk-panel-table-item-footer{margin-top:1.25rem}.sn-component .sk-panel-table .sk-panel-table-item.no-border{border:none}.sn-component .sk-modal{position:fixed;margin-left:auto;margin-right:auto;left:0;right:0;top:0;bottom:0;z-index:10000;width:100vw;height:100vh;background-color:transparent;color:var(--sn-stylekit-contrast-foreground-color);display:flex;align-items:center;justify-content:center}.sn-component .sk-modal .sn-component{height:100%}.sn-component .sk-modal .sn-component .sk-panel{height:100%}.sn-component .sk-modal.auto-height>.sk-modal-content{height:auto !important}.sn-component .sk-modal.large>.sk-modal-content{width:900px;height:600px}.sn-component .sk-modal.medium>.sk-modal-content{width:700px;height:500px}.sn-component .sk-modal.small>.sk-modal-content{width:700px;height:344px}.sn-component .sk-modal .sk-modal-background{position:absolute;z-index:-1;width:100%;height:100%;background-color:var(--sn-stylekit-contrast-background-color);opacity:0.7}.sn-component .sk-modal>.sk-modal-content{overflow-y:auto;width:auto;padding:0;padding-bottom:0;min-width:300px;-webkit-box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19);-moz-box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19);box-shadow:0px 2px 35px 0px rgba(0,0,0,0.19)}.sn-component.no-select{user-select:none}input,textarea,[contenteditable]{caret-color:var(--sn-stylekit-editor-foreground-color)}.windows-web,.windows-desktop,.linux-web,.linux-desktop{scrollbar-width:thin}.windows-web ::-webkit-scrollbar,.windows-desktop ::-webkit-scrollbar,.linux-web ::-webkit-scrollbar,.linux-desktop ::-webkit-scrollbar{width:17px;height:18px;border-left:0.5px solid var(--sn-stylekit-scrollbar-track-border-color-color)}.windows-web ::-webkit-scrollbar-thumb,.windows-desktop ::-webkit-scrollbar-thumb,.linux-web ::-webkit-scrollbar-thumb,.linux-desktop ::-webkit-scrollbar-thumb{border:4px solid rgba(0,0,0,0);background-clip:padding-box;-webkit-border-radius:10px;background-color:var(--sn-stylekit-scrollbar-thumb-color);-webkit-box-shadow:inset -1px -1px 0px rgba(0,0,0,0.05),inset 1px 1px 0px rgba(0,0,0,0.05)}.windows-web ::-webkit-scrollbar-button,.windows-desktop ::-webkit-scrollbar-button,.linux-web ::-webkit-scrollbar-button,.linux-desktop ::-webkit-scrollbar-button{width:0;height:0;display:none}.windows-web ::-webkit-scrollbar-corner,.windows-desktop ::-webkit-scrollbar-corner,.linux-web ::-webkit-scrollbar-corner,.linux-desktop ::-webkit-scrollbar-corner{background-color:transparent}
354 | body,
355 | html {
356 | font-family: sans-serif;
357 | font-size: var(--sn-stylekit-base-font-size);
358 | height: 100%;
359 | margin: 0;
360 | background-color: transparent;
361 | }
362 |
363 | * {
364 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
365 | }
366 |
367 | #wrapper {
368 | display: flex;
369 | flex-direction: column;
370 | position: relative;
371 | height: 100%;
372 | overflow: hidden;
373 | }
374 |
375 | .CodeMirror-scroll {
376 | padding: 8px;
377 | }
378 |
379 | .CodeMirror {
380 | background-color: var(--sn-stylekit-editor-background-color) !important;
381 | color: var(--sn-stylekit-editor-foreground-color) !important;
382 | border: 0 !important;
383 | font-family: sans-serif;
384 | -webkit-overflow-scrolling: touch;
385 | flex: 1 1 auto;
386 | height: 100%;
387 | resize: none;
388 | font-size: var(--sn-stylekit-font-size-editor);
389 | padding: 0;
390 | }
391 | .CodeMirror .CodeMirror-code .cm-comment {
392 | background: var(--sn-stylekit-contrast-background-color);
393 | color: var(--sn-stylekit-info-color);
394 | font-family: Consolas, monaco, "Ubuntu Mono", courier, monospace !important;
395 | font-size: 90%;
396 | }
397 | .CodeMirror .CodeMirror-code .cm-comment.CodeMirror-selectedtext {
398 | color: var(--sn-stylekit-info-contrast-color) !important;
399 | background: var(--sn-stylekit-info-color) !important;
400 | }
401 | .CodeMirror .cm-header {
402 | color: var(--sn-stylekit-editor-foreground-color);
403 | }
404 | .CodeMirror .cm-header.CodeMirror-selectedtext {
405 | color: var(--sn-stylekit-info-contrast-color) !important;
406 | background: var(--sn-stylekit-info-color) !important;
407 | }
408 | .CodeMirror .cm-formatting-header,
409 | .CodeMirror .cm-formatting-strong,
410 | .CodeMirror .cm-formatting-em {
411 | opacity: 0.2;
412 | }
413 | .CodeMirror .cm-variable-2, .CodeMirror .cm-variable-3 {
414 | color: var(--sn-stylekit-editor-foreground-color) !important;
415 | }
416 | .CodeMirror .cm-variable-2.CodeMirror-selectedtext, .CodeMirror .cm-variable-3.CodeMirror-selectedtext {
417 | color: var(--sn-stylekit-info-contrast-color) !important;
418 | background: transparent;
419 | }
420 | .CodeMirror .cm-variable-3 {
421 | color: var(--sn-stylekit-editor-foreground-color) !important;
422 | }
423 | .CodeMirror .cm-variable-3.CodeMirror-selectedtext {
424 | color: var(--sn-stylekit-info-contrast-color) !important;
425 | background: transparent;
426 | }
427 | .CodeMirror .cm-link,
428 | .CodeMirror .cm-string {
429 | color: var(--sn-stylekit-info-color) !important;
430 | }
431 | .CodeMirror .cm-link.CodeMirror-selectedtext,
432 | .CodeMirror .cm-string.CodeMirror-selectedtext {
433 | color: var(--sn-stylekit-info-contrast-color) !important;
434 | background: var(--sn-stylekit-info-color) !important;
435 | }
436 | .CodeMirror .CodeMirror-linenumber {
437 | color: gray !important;
438 | }
439 |
440 | .CodeMirror-cursor {
441 | border-color: var(--sn-stylekit-editor-foreground-color);
442 | }
443 |
444 | .CodeMirror-selected {
445 | background: var(--sn-stylekit-info-color) !important;
446 | }
447 |
448 | .CodeMirror-selectedtext {
449 | color: var(--sn-stylekit-info-contrast-color) !important;
450 | background: var(--sn-stylekit-info-color) !important;
451 | }
452 |
453 | .CodeMirror-gutters {
454 | background-color: var(--sn-stylekit-background-color) !important;
455 | color: var(--sn-stylekit-editor-foreground-color) !important;
456 | border-color: var(--sn-stylekit-border-color) !important;
457 | }
458 |
459 | .cm-header-1 {
460 | font-size: 150%;
461 | }
462 |
463 | .cm-header-2 {
464 | font-size: 130%;
465 | }
466 |
467 | .cm-header-3 {
468 | font-size: 120%;
469 | }
470 |
471 | .cm-header-4 {
472 | font-size: 110%;
473 | }
474 |
475 | .cm-header-5 {
476 | font-size: 100%;
477 | }
478 |
479 | .cm-header-6 {
480 | font-size: 90%;
481 | }
482 |
483 | .CodeMirror .cm-quote {
484 | color: var(--sn-stylekit-foreground-color);
485 | opacity: 0.6;
486 | }
487 |
488 | .cm-s-default .cm-variable-3, .cm-s-default .cm-type {
489 | color: var(--sn-stylekit-success-color) !important;
490 | }
491 |
492 | .CodeMirror .cm-link, .CodeMirror .cm-string, .CodeMirror .cm-keyword {
493 | color: var(--sn-stylekit-info-color);
494 | }
495 |
496 | /*# sourceMappingURL=app.css.map */
497 |
--------------------------------------------------------------------------------