umberto 4.2.6 → 4.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +2 -2
  3. package/scripts/filter/before-post-render/code-switcher.js +16 -0
  4. package/scripts/utils/execute-and-insert-function-results.js +1 -1
  5. package/scripts/utils/transformcodeswitcher.js +93 -0
  6. package/src/helpers/import-module.js +31 -0
  7. package/src/index.js +19 -17
  8. package/src/tasks/build-documentation.js +27 -15
  9. package/src/tasks/create-sym-links.js +7 -4
  10. package/src/tasks/execute-hooks.js +35 -29
  11. package/src/tasks/get-project-config.js +9 -8
  12. package/themes/nova/source/assets/_img/arrows.svg +1 -0
  13. package/themes/nova/source/assets/_img/book.svg +1 -0
  14. package/themes/nova/source/assets/_img/box-brown.svg +1 -0
  15. package/themes/nova/source/assets/_img/box-orange.svg +1 -0
  16. package/themes/nova/source/assets/_img/box-red.svg +1 -0
  17. package/themes/nova/source/assets/_img/bulb.svg +1 -0
  18. package/themes/nova/source/assets/_img/clipboard.svg +1 -0
  19. package/themes/nova/source/assets/_img/cog.svg +1 -0
  20. package/themes/nova/source/assets/_img/data.svg +1 -0
  21. package/themes/nova/source/assets/_img/documentation.svg +1 -0
  22. package/themes/nova/source/assets/_img/download.svg +1 -0
  23. package/themes/nova/source/assets/_img/edit.svg +2 -0
  24. package/themes/nova/source/assets/_img/exclamation-circle.svg +2 -0
  25. package/themes/nova/source/assets/_img/eye.svg +1 -0
  26. package/themes/nova/source/assets/_img/filter.svg +1 -0
  27. package/themes/nova/source/assets/_img/filtering.svg +1 -0
  28. package/themes/nova/source/assets/_img/folder.svg +1 -0
  29. package/themes/nova/source/assets/_img/github.svg +6 -0
  30. package/themes/nova/source/assets/_img/header-info-configs.svg +1 -0
  31. package/themes/nova/source/assets/_img/header-info-events.svg +1 -0
  32. package/themes/nova/source/assets/_img/header-info-methods.svg +1 -0
  33. package/themes/nova/source/assets/_img/header-info-properties.svg +1 -0
  34. package/themes/nova/source/assets/_img/heart.svg +1 -0
  35. package/themes/nova/source/assets/_img/info.svg +1 -0
  36. package/themes/nova/source/assets/_img/list-nest.svg +1 -0
  37. package/themes/nova/source/assets/_img/loupe.svg +1 -0
  38. package/themes/nova/source/assets/_img/menu.svg +4 -0
  39. package/themes/nova/source/assets/_img/plug.svg +1 -0
  40. package/themes/nova/source/assets/_img/star-in-circle.svg +1 -0
  41. package/themes/nova/source/assets/_img/tick.svg +1 -0
  42. package/themes/nova/source/assets/_img/triangle-down.svg +1 -0
  43. package/themes/umberto/source/assets/_img/info-circle.svg +4 -0
  44. package/themes/umberto/src/css/_code-switcher.scss +54 -0
  45. package/themes/umberto/src/css/helpers/_color.scss +4 -1
  46. package/themes/umberto/src/css/helpers/_font.scss +1 -0
  47. package/themes/umberto/src/css/styles.scss +3 -0
  48. package/themes/umberto/src/js/_codeswitcherbuttons.js +135 -0
  49. package/themes/umberto/src/js/app.js +5 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [4.4.0-alpha.0](https://github.com/cksource/umberto/compare/v4.3.0...v4.4.0-alpha.0) (2024-09-20)
5
+
6
+ ### Features
7
+
8
+ * Added support for loading hooks (`beforeHexo` and `afterHexo`) and `scripts` in ESM format in Umberto. Closes [#1214](https://github.com/cksource/umberto/issues/1214). ([commit](https://github.com/cksource/umberto/commit/2849bef1e59108f863ea0a64314ab980a7f543b6))
9
+
10
+
11
+ ## [4.3.0](https://github.com/cksource/umberto/compare/v4.2.6...v4.3.0) (2024-09-16)
12
+
13
+ ### Features
14
+
15
+ * Added code switcher for Self-hosted and Cloud snippets. ([commit](https://github.com/cksource/umberto/commit/a8fc9e470d3b671dc5c960da35c2bdacbe10fb8d))
16
+
17
+
4
18
  ## [4.2.6](https://github.com/cksource/umberto/compare/v4.2.5...v4.2.6) (2024-08-12)
5
19
 
6
20
  ### Bug fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umberto",
3
- "version": "4.2.6",
3
+ "version": "4.4.0-alpha.0",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -68,7 +68,7 @@
68
68
  "url": "https://github.com/cksource/umberto.git"
69
69
  },
70
70
  "lint-staged": {
71
- "**/*.js": [
71
+ "**/*.{js,mjs,cjs}": [
72
72
  "eslint --quiet"
73
73
  ]
74
74
  },
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ const transformCodeSwitcher = require( '../../utils/transformcodeswitcher' );
9
+
10
+ /**
11
+ * Replaces <code-switcher> tags with the switchable code.
12
+ * Tag syntax is <code-switcher>```js ```</code-switcher>.
13
+ */
14
+ hexo.extend.filter.register( 'before_post_render', data => {
15
+ return transformCodeSwitcher( data, hexo );
16
+ } );
@@ -9,7 +9,7 @@ const upath = require( 'upath' );
9
9
  const fs = require( 'fs' );
10
10
 
11
11
  const EXEC_REGEXP = /\\?{@exec ([^}]+)\\?}/g;
12
- const PATH_REGEXP = /[\w.\\/-]+\.js$/;
12
+ const PATH_REGEXP = /[\w.\\/-]+\.c?js$/;
13
13
 
14
14
  /**
15
15
  * Replaces the `{@exec path/to/function.js}` expression with the module results.
@@ -0,0 +1,93 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ const CODE_SWITCHER_REGEXP = /<code-switcher[^>]*>([\s\S]*?)<\/code-switcher>/g;
9
+ const CODE_SWITCHER_TYPE_REGEXP = /<code-switcher\s*(\w*)[^>]*>/;
10
+ const CODEBLOCK_REGEXP_STRING = /```(\S+)?(\n[\s\S]*?)```/g;
11
+
12
+ const textEncoder = new TextEncoder();
13
+
14
+ /**
15
+ * Replaces the `<code-switcher>` element with the HTML structure. E.g.:
16
+ *
17
+ * <code-switcher>
18
+ * ```js
19
+ * Content
20
+ * ```
21
+ * </code-switcher>
22
+ *
23
+ * will be transformed into:
24
+ * <div class="code-switcher selfhosted">
25
+ * <div class="code-switcher__toolbar">
26
+ * <button class="code-switcher__button code-switcher__button--active">Self-hosted (NPM)</button>
27
+ * <button class="code-switcher__button">Cloud (CDN)</button>
28
+ * </div>
29
+ * <div class="code-toolbar">
30
+ * <pre>
31
+ * <code>Content</code>
32
+ * </pre>
33
+ * <div class="toolbar">...</div>
34
+ * </div>
35
+ * </div>
36
+ *
37
+ *
38
+ * @protected
39
+ * @param {Object} page
40
+ * @param {Object} hexo
41
+ * @return {Object} page
42
+ */
43
+ module.exports = function transformCodeSwitcher( page, hexo ) {
44
+ page.content = processCodeSwitcher( page.content, hexo );
45
+
46
+ return page;
47
+ };
48
+
49
+ function processCodeSwitcher( content, hexo ) {
50
+ return content.replace( CODE_SWITCHER_REGEXP, ( match, content ) => {
51
+ const classSwitcher = 'code-switcher';
52
+ const type = CODE_SWITCHER_TYPE_REGEXP.exec( match )[ 1 ];
53
+ const classSnippet = type ? type : 'selfhosted';
54
+
55
+ // Remove unwanted indentation.
56
+ const lines = content.split( /\n/ );
57
+ const indentation = lines.length > 1 ? lines[ 1 ].match( /^\s*/ )[ 0 ] : '';
58
+
59
+ let pattern;
60
+
61
+ // When using spaces as indentation, some editors may mix them with tabs.
62
+ // In such case, let's try to remove tabs as well. 4 spaces are treat as a single tab character.
63
+ if ( indentation[ 0 ] === ' ' ) {
64
+ pattern = new RegExp( `^${ indentation }|${ '\\t'.repeat( Math.ceil( indentation.length / 4 ) ) }` );
65
+ } else {
66
+ pattern = new RegExp( `^${ indentation }` );
67
+ }
68
+
69
+ content = lines.map( line => line.replace( pattern, '' ) ).join( '\n' );
70
+
71
+ // Remove first linebreak and last linebreak.
72
+ content = content.replace( /^\n/, '' );
73
+ content = content.replace( /\n$/, '' );
74
+
75
+ // Encoding codeblocks inside infobox into UTF-8. See #1122.
76
+ content = content.replace( CODEBLOCK_REGEXP_STRING, ( match, language, content ) => {
77
+ // Angle brackets were missing after encoding. And we need them, for example, in strings like '<YOUR_LICENSE_KEY>'.
78
+ // That's why we replace them with HTML entities.
79
+ const encodedContent = textEncoder.encode( content.replace( /</g, '&lt;' ).replace( />/g, '&gt;' ) );
80
+
81
+ return language ?
82
+ `<pre class="highlight"><code class="${ language }">utf8_encoded_content:${ encodedContent }</code></pre>` :
83
+ `<pre class="highlight"><code>utf8_encoded_content:${ encodedContent }</code></pre>`;
84
+ } );
85
+
86
+ let markdownOutput = hexo.render.renderSync( { text: content, engine: 'markdown' } );
87
+
88
+ markdownOutput = markdownOutput.replace( /<\/p>\n/g, '</p>' );
89
+ markdownOutput = markdownOutput.replace( /\n<p>/g, '<p>' );
90
+
91
+ return `<div class="${ classSwitcher } ${ classSnippet }"><div class="code-switcher__toolbar"></div>${ markdownOutput }</div>`;
92
+ } );
93
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ const upath = require( 'upath' );
9
+ const { pathToFileURL } = require( 'url' );
10
+
11
+ /**
12
+ * Loads the specified module using `import()` call.
13
+ *
14
+ * @param {String} modulePath
15
+ * @returns {Promise.<Function>}
16
+ */
17
+ module.exports = async function importModule( modulePath ) {
18
+ const modulePathAsFileURL = getPathAsFileURL( modulePath );
19
+
20
+ return ( await import( modulePathAsFileURL ) ).default;
21
+ };
22
+
23
+ function getPathAsFileURL( modulePath ) {
24
+ const extension = upath.extname( modulePath );
25
+
26
+ if ( extension === '.js' || extension === '.mjs' || extension === '.cjs' ) {
27
+ return pathToFileURL( modulePath );
28
+ }
29
+
30
+ return pathToFileURL( modulePath + '.js' );
31
+ }
package/src/index.js CHANGED
@@ -47,25 +47,27 @@ module.exports = {
47
47
  * @returns {Promise}
48
48
  */
49
49
  buildSingleProject( options ) {
50
- const pConfig = getProjectConfig( process.cwd(), options );
51
50
  const timer = process.hrtime();
52
51
 
53
- return buildDocumentation( Object.assign(
54
- options,
55
- {
56
- mainConfig: {
57
- projects: [ '.' ],
58
- docsearch: pConfig.docsearch,
59
- googleoptimize: pConfig.googleoptimize,
60
- googletagmanager: pConfig.googletagmanager,
61
- googleanalytics: pConfig.googleanalytics,
62
- feedbackWidget: pConfig.feedbackWidget,
63
- isSingleProject: true,
64
- canonicalUrlBeginning: pConfig.canonicalUrlBeginning,
65
- vwo: pConfig.vwo
66
- }
67
- }
68
- ) )
52
+ return getProjectConfig( process.cwd(), options )
53
+ .then( pConfig => {
54
+ return buildDocumentation( Object.assign(
55
+ options,
56
+ {
57
+ mainConfig: {
58
+ projects: [ '.' ],
59
+ docsearch: pConfig.docsearch,
60
+ googleoptimize: pConfig.googleoptimize,
61
+ googletagmanager: pConfig.googletagmanager,
62
+ googleanalytics: pConfig.googleanalytics,
63
+ feedbackWidget: pConfig.feedbackWidget,
64
+ isSingleProject: true,
65
+ canonicalUrlBeginning: pConfig.canonicalUrlBeginning,
66
+ vwo: pConfig.vwo
67
+ }
68
+ }
69
+ ) );
70
+ } )
69
71
  .then( hexoManager => postBuild( options, hexoManager ) )
70
72
  .then( hexoManager => {
71
73
  const time = process.hrtime( timer );
@@ -127,7 +127,11 @@ module.exports = options => {
127
127
  variables: mainConfig.variables
128
128
  } );
129
129
  } )
130
- .then( () => executeHooks( getProjectConfigs( rootPath, projectPaths ), 'beforeHexo' ) )
130
+ .then( async () => {
131
+ const configs = await getProjectConfigs( rootPath, projectPaths );
132
+
133
+ return executeHooks( configs, 'beforeHexo' );
134
+ } )
131
135
  .then( () => {
132
136
  return buildProjects( rootPath, projectPaths, {
133
137
  skipApi,
@@ -155,12 +159,12 @@ module.exports = options => {
155
159
  .then( () => copyProjectIcons( hexoManager.hexo.projectGlobals, hexoManager.getPublicDir() ) )
156
160
  // A workaround for API guides when API generation is skipped.
157
161
  // Used for a local build (dev==true) to reuse existing API doc files.
158
- .then( () => {
162
+ .then( async () => {
159
163
  if ( !dev ) {
160
164
  return Promise.resolve();
161
165
  }
162
166
 
163
- const projectConfigs = getProjectConfigs( rootPath, projectPaths, {
167
+ const projectConfigs = await getProjectConfigs( rootPath, projectPaths, {
164
168
  skipLiveSnippets
165
169
  } );
166
170
  const buildDir = hexoManager.getPublicDir();
@@ -192,8 +196,8 @@ module.exports = options => {
192
196
  return Promise.resolve();
193
197
  } )
194
198
  // Links validation.
195
- .then( () => {
196
- const projectConfigs = getProjectConfigs( rootPath, projectPaths, {
199
+ .then( async () => {
200
+ const projectConfigs = await getProjectConfigs( rootPath, projectPaths, {
197
201
  skipLiveSnippets
198
202
  } );
199
203
 
@@ -219,10 +223,10 @@ module.exports = options => {
219
223
  } );
220
224
  } )
221
225
  // Create sitemap.xml file.
222
- .then( () => {
226
+ .then( async () => {
223
227
  let hostname;
224
228
  let dst = '';
225
- const projectConfigs = getProjectConfigs( rootPath, projectPaths );
229
+ const projectConfigs = await getProjectConfigs( rootPath, projectPaths );
226
230
  const config = mainConfig.isSingleProject && projectConfigs && projectConfigs.length > 0 ?
227
231
  projectConfigs[ 0 ] : {};
228
232
  const sitemapConfig = mainConfig.sitemap ? mainConfig.sitemap : config.sitemap;
@@ -275,7 +279,12 @@ module.exports = options => {
275
279
  extraUrlSettings
276
280
  } );
277
281
  } )
278
- .then( () => executeHooks( getProjectConfigs( rootPath, projectPaths ), 'afterHexo' ) )
282
+
283
+ .then( async () => {
284
+ const configs = await getProjectConfigs( rootPath, projectPaths );
285
+
286
+ return executeHooks( configs, 'afterHexo' );
287
+ } )
279
288
  .then( () => hexoManager );
280
289
  };
281
290
 
@@ -291,8 +300,8 @@ module.exports = options => {
291
300
  * @param {Boolean} options.skipGuides Whether to skip processing guides.
292
301
  * @return {Promise}
293
302
  */
294
- function buildProjects( rootPath, projectPaths, options = {} ) {
295
- const projectConfigs = getProjectConfigs( rootPath, projectPaths, options );
303
+ async function buildProjects( rootPath, projectPaths, options = {} ) {
304
+ const projectConfigs = await getProjectConfigs( rootPath, projectPaths, options );
296
305
  const promises = [];
297
306
 
298
307
  // If the `guides` (non-empty array) or `skipGuides` options are specified, disable the `{@link...}` validator.
@@ -416,19 +425,22 @@ function buildProjects( rootPath, projectPaths, options = {} ) {
416
425
  }
417
426
 
418
427
  // Gets every project's umberto.json config file.
419
- function getProjectConfigs( rootPath, projectPaths, options = {} ) {
420
- return projectPaths.map( pPath => {
428
+ async function getProjectConfigs( rootPath, projectPaths, options = {} ) {
429
+ const promises = projectPaths.map( async pPath => {
421
430
  const projectRootPath = upath.join( rootPath, pPath );
422
431
 
423
432
  return Object.assign(
424
- getProjectConfig( projectRootPath, {
425
- skipLiveSnippets: options.skipLiveSnippets
426
- } ),
433
+ {},
427
434
  {
435
+ ...await getProjectConfig( projectRootPath, {
436
+ skipLiveSnippets: options.skipLiveSnippets
437
+ } ),
428
438
  projectRootPath
429
439
  }
430
440
  );
431
441
  } );
442
+
443
+ return Promise.all( promises );
432
444
  }
433
445
 
434
446
  // Renders API docs HTML. API docs are rendered separate from hexo so hexo filters and helpers are not available.
@@ -11,19 +11,20 @@ const upath = require( 'upath' );
11
11
  const fs = require( 'fs' );
12
12
  const chalk = require( 'chalk' );
13
13
 
14
- module.exports = ( {
14
+ module.exports = async ( {
15
15
  rootPath,
16
16
  isSingleProject = false
17
17
  } ) => {
18
18
  const configs = [];
19
19
 
20
20
  if ( isSingleProject ) {
21
- configs.push( getProjectConfig( rootPath, { skipLiveSnippets: true } ) );
21
+ configs.push( await getProjectConfig( rootPath, { skipLiveSnippets: true } ) );
22
22
  } else {
23
23
  const projectPaths = getMainConfig( rootPath ).projects;
24
- projectPaths.forEach( projectPath => {
25
- configs.push( getProjectConfig( upath.join( rootPath, projectPath ), { skipLiveSnippets: true } ) );
24
+ const promises = projectPaths.map( projectPath => {
25
+ return getProjectConfig( upath.join( rootPath, projectPath ), { skipLiveSnippets: true } );
26
26
  } );
27
+ configs.push( ...await Promise.all( promises ) );
27
28
  }
28
29
 
29
30
  configs
@@ -32,6 +33,8 @@ module.exports = ( {
32
33
  createSymbolicLink( config );
33
34
  } );
34
35
 
36
+ return Promise.resolve();
37
+
35
38
  function createSymbolicLink( config ) {
36
39
  const destinationPath = upath.join( rootPath, 'build', 'docs', config.slug, 'latest' );
37
40
 
@@ -6,6 +6,7 @@
6
6
  'use strict';
7
7
 
8
8
  const upath = require( 'upath' );
9
+ const importModule = require( '../helpers/import-module' );
9
10
 
10
11
  /**
11
12
  * This function executes all hooks of the specified type for each config passed in the configs array.
@@ -22,42 +23,47 @@ const upath = require( 'upath' );
22
23
  * }
23
24
  *
24
25
  * @param {Array} configs Array of all the configurations that might contain hooks to execute.
25
- * @param {String} hookName Name of a hook to execute, either 'beforeHexo' or 'afterHexo'.
26
+ * @param {'beforeHexo'|'afterHexo'} hookName Name of a hook to execute.
26
27
  * @returns {Promise}
27
28
  */
28
- module.exports = function executeHooks( configs, hookName ) {
29
- let promise = Promise.resolve();
29
+ module.exports = async function executeHooks( configs, hookName ) {
30
+ try {
31
+ for ( const config of configs ) {
32
+ if ( !config.hooks || !config.hooks[ hookName ] ) {
33
+ continue;
34
+ }
30
35
 
31
- for ( const config of configs ) {
32
- if ( !config.hooks || !config.hooks[ hookName ] ) {
33
- continue;
36
+ for ( const scriptPath of config.hooks[ hookName ] ) {
37
+ await processSingleHook( upath.dirname( config.__configPath ), scriptPath );
38
+ }
34
39
  }
35
40
 
36
- for ( const scriptPath of config.hooks[ hookName ] ) {
37
- const callbackAbsolutePath = upath.join( upath.dirname( config.__configPath ), scriptPath );
38
-
39
- promise = promise
40
- .then( () => {
41
- // The `callback` may be synchronous function. Let's wrap it in the promise chain.
42
- return new Promise( resolve => {
43
- const callback = require( callbackAbsolutePath );
44
-
45
- return resolve( callback() );
46
- } ).catch( error => {
47
- // Store a path to the executed file.
48
- error._filePath = scriptPath;
49
-
50
- // Rejecting the promise allows catching it later.
51
- return Promise.reject( error );
52
- } );
53
- } );
54
- }
55
- }
56
-
57
- return promise.catch( error => {
41
+ return Promise.resolve();
42
+ } catch ( error ) {
58
43
  console.error( `The "${ hookName }" hook pointing to the "${ error._filePath }" file ended with an error.`, error.message );
59
44
 
60
45
  // Re-throwing the error as we want to break the build process.
61
46
  throw error;
62
- } );
47
+ }
63
48
  };
49
+
50
+ /**
51
+ * @param {String} configPath
52
+ * @param {String} scriptPath
53
+ * @return {Promise}
54
+ */
55
+ async function processSingleHook( configPath, scriptPath ) {
56
+ const callbackAbsolutePath = upath.join( configPath, scriptPath );
57
+
58
+ try {
59
+ const callback = await importModule( callbackAbsolutePath );
60
+
61
+ await callback();
62
+ } catch ( error ) {
63
+ // Store a path to the executed file.
64
+ error._filePath = scriptPath;
65
+
66
+ // Rejecting the promise allows catching it later.
67
+ return Promise.reject( error );
68
+ }
69
+ }
@@ -8,6 +8,7 @@
8
8
  const upath = require( 'upath' );
9
9
  const fs = require( 'fs' );
10
10
  const glob = require( 'glob' );
11
+ const importModule = require( '../helpers/import-module' );
11
12
 
12
13
  const cache = new Map();
13
14
 
@@ -17,9 +18,9 @@ const cache = new Map();
17
18
  * @param {String} rootPath
18
19
  * @param {Object} [options={}]
19
20
  * @param {Boolean} [options.skipLiveSnippets=false] If set to `true`, the `snippetAdapter` module will not be added to the configuration.
20
- * @returns {Object}
21
+ * @returns {Promise}
21
22
  */
22
- module.exports = ( rootPath, options = {} ) => {
23
+ module.exports = async ( rootPath, options = {} ) => {
23
24
  // Let's normalize the root path to fix mixed slashes and backslashes. Root path should contain only slashes.
24
25
  rootPath = rootPath.split( /[\\/]/g ).join( '/' );
25
26
 
@@ -35,7 +36,7 @@ module.exports = ( rootPath, options = {} ) => {
35
36
 
36
37
  // Get the `realImportPath()` function. It displays an import path of a class below the class title.
37
38
  // See: https://ckeditor.com/docs/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html.
38
- loadScriptToConfig( config, {
39
+ await loadScriptToConfig( config, {
39
40
  scriptKey: 'import-path',
40
41
  configKey: 'getRealImportPath',
41
42
  configPath,
@@ -47,7 +48,7 @@ module.exports = ( rootPath, options = {} ) => {
47
48
  } );
48
49
 
49
50
  // Load the `insertChangelog()` script that allows inserting a changelog to a guide.
50
- loadScriptToConfig( config, {
51
+ await loadScriptToConfig( config, {
51
52
  scriptKey: 'insert-changelog',
52
53
  configKey: 'insertChangelog',
53
54
  configPath,
@@ -58,7 +59,7 @@ module.exports = ( rootPath, options = {} ) => {
58
59
 
59
60
  // Load the snippet adapter only if snippets will be built.
60
61
  if ( !options.skipLiveSnippets ) {
61
- loadScriptToConfig( config, {
62
+ await loadScriptToConfig( config, {
62
63
  scriptKey: 'snippet-adapter',
63
64
  configKey: 'snippetAdapter',
64
65
  configPath,
@@ -146,7 +147,7 @@ function getConfigurationFile( configPath ) {
146
147
  * @param {String} options.configPath An absolute path to the configuration file. It is used to obtain a path of the function to load.
147
148
  * @param {Function} options.onError A callback will be executed if the function could not be load.
148
149
  */
149
- function loadScriptToConfig( config, options ) {
150
+ async function loadScriptToConfig( config, options ) {
150
151
  if ( !config.scripts ) {
151
152
  return;
152
153
  }
@@ -160,13 +161,13 @@ function loadScriptToConfig( config, options ) {
160
161
 
161
162
  try {
162
163
  // Tries to load the function from the current working directory.
163
- config[ configKey ] = require( config.scripts[ scriptKey ] );
164
+ config[ configKey ] = await importModule( config.scripts[ scriptKey ] );
164
165
  } catch ( err ) {
165
166
  // If failed, let's resolve the path from the directory where the configuration file is located.
166
167
  const fnPath = upath.join( upath.dirname( options.configPath ), config.scripts[ scriptKey ] );
167
168
 
168
169
  try {
169
- config[ configKey ] = require( fnPath );
170
+ config[ configKey ] = await importModule( fnPath );
170
171
  } catch ( nestedErr ) {
171
172
  // If still fails, let's call the callback and throw an error.
172
173
  options.onError( err );
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><path d="M10.376,1l-8.876,6.34l8.648,6.34" style="fill:none;stroke:#e436fa;stroke-width:1.5px;"/><path d="M28.128,7.34l-26.628,0" style="fill:none;stroke:#e436fa;stroke-width:1.5px;"/><path d="M24.592,15.216l7.908,6.34l-7.705,6.34" style="fill:none;stroke:#e436fa;stroke-width:1.5px;"/><path d="M6.334,21.556l24.666,0" style="fill:none;stroke:#e436fa;stroke-width:1.5px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"><g stroke="#E59E00" stroke-width="1.5" fill="none" fill-rule="evenodd"><path d="M6.529.98C5.134.473 3.233.832 2.282 1.783c-.951.951-.592 2.134.803 2.642M3.085 4.425l15.51 5.645M6.529.98l18.365 6.685M18.851 10.606L.75 3.613l.007 26.258 18.094 6.669V10.606z"/><path d="M5.842 12.128l9.766 3.351M5.842 18.128l9.766 3.351M5.842 24.128l9.766 3.351" stroke-linecap="round"/><path d="M24.305 7.231v24.544"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><g><path d="M33,26.6l-16,6.4l-16,-6.4" style="fill:none;stroke:#8b4513;stroke-width:1.5px;"/><path d="M33,7.4l-16,6.4l-16,-6.4" style="fill:none;stroke:#8b4513;stroke-width:1.5px;"/><path d="M1,7.4l16,-6.4l16,6.4" style="fill:none;stroke:#8b4513;stroke-width:1.5px;"/><path d="M1,7.4l0,19.2" style="fill:none;stroke:#8b4513;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M17,13.8l0,19.2" style="fill:none;stroke:#8b4513;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M33,7.4l0,19.2" style="fill:none;stroke:#8b4513;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><g><path d="M33,26.6l-16,6.4l-16,-6.4" style="fill:none;stroke:#e59e00;stroke-width:1.5px;"/><path d="M33,7.4l-16,6.4l-16,-6.4" style="fill:none;stroke:#e59e00;stroke-width:1.5px;"/><path d="M1,7.4l16,-6.4l16,6.4" style="fill:none;stroke:#e59e00;stroke-width:1.5px;"/><path d="M1,7.4l0,19.2" style="fill:none;stroke:#e59e00;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M17,13.8l0,19.2" style="fill:none;stroke:#e59e00;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M33,7.4l0,19.2" style="fill:none;stroke:#e59e00;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><g><path d="M33,27.18l-16,6.4l-16,-6.4" style="fill:none;stroke:#e50037;stroke-width:1.5px;"/><path d="M33,7.98l-16,6.4l-16,-6.4" style="fill:none;stroke:#e50037;stroke-width:1.5px;"/><path d="M1,7.98l16,-6.4l16,6.4" style="fill:none;stroke:#e50037;stroke-width:1.5px;"/><path d="M1,7.98l0,19.2" style="fill:none;stroke:#e50037;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M17,14.38l0,19.2" style="fill:none;stroke:#e50037;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/><path d="M33,7.98l0,19.2" style="fill:none;stroke:#e50037;stroke-width:1.5px;stroke-linecap:butt;stroke-linejoin:bevel;"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g id="bulb"><circle cx="15" cy="15" r="15" style="fill:#4fa800;"/><g><path d="M11.411,20.725l7.55,0" style="fill:none;stroke:#fff;stroke-width:1px;"/><path d="M11.411,22.612l7.55,0" style="fill:none;stroke:#fff;stroke-width:1px;"/><path d="M13.298,24.5l3.776,0" style="fill:none;stroke:#fff;stroke-width:1px;"/><path d="M15.098,4.001l0.098,0.001l0.098,0.004l0.098,0.004l0.097,0.005l0.096,0.007l0.097,0.008l0.097,0.009l0.096,0.011l0.095,0.011l0.096,0.013l0.095,0.014l0.094,0.015l0.094,0.016l0.095,0.018l0.093,0.018l0.093,0.02l0.093,0.021l0.091,0.022l0.093,0.023l0.091,0.024l0.09,0.025l0.092,0.026l0.089,0.028l0.09,0.028l0.089,0.03l0.088,0.03l0.088,0.032l0.089,0.033l0.086,0.034l0.087,0.034l0.086,0.036l0.085,0.037l0.085,0.038l0.084,0.038l0.084,0.04l0.084,0.041l0.082,0.042l0.082,0.042l0.082,0.044l0.081,0.045l0.079,0.045l0.08,0.047l0.079,0.047l0.078,0.048l0.079,0.05l0.077,0.05l0.076,0.05l0.076,0.052l0.075,0.053l0.074,0.054l0.074,0.054l0.073,0.055l0.072,0.057l0.072,0.057l0.071,0.057l0.071,0.059l0.069,0.06l0.069,0.06l0.068,0.062l0.068,0.062l0.066,0.062l0.065,0.063l0.066,0.065l0.064,0.065l0.063,0.066l0.063,0.066l0.062,0.068l0.062,0.068l0.06,0.069l0.059,0.069l0.059,0.07l0.058,0.072l0.057,0.071l0.056,0.072l0.056,0.074l0.054,0.074l0.053,0.073l0.053,0.076l0.052,0.076l0.051,0.076l0.051,0.078l0.048,0.077l0.049,0.079l0.047,0.079l0.046,0.079l0.046,0.08l0.045,0.081l0.043,0.082l0.043,0.082l0.042,0.083l0.04,0.082l0.04,0.085l0.039,0.084l0.038,0.084l0.037,0.086l0.036,0.086l0.034,0.086l0.034,0.088l0.033,0.087l0.031,0.088l0.031,0.089l0.029,0.089l0.029,0.089l0.027,0.091l0.027,0.09l0.025,0.091l0.024,0.091l0.023,0.092l0.022,0.093l0.021,0.092l0.02,0.093l0.018,0.094l0.017,0.093l0.017,0.094l0.015,0.095l0.014,0.095l0.012,0.095l0.012,0.096l0.01,0.097l0.009,0.095l0.008,0.097l0.007,0.097l0.006,0.098l0.004,0.097l0.003,0.098l0.002,0.097l0.001,0.1l-0.001,0.077l-0.002,0.076l-0.004,0.077l-0.004,0.076l-0.007,0.076l-0.007,0.073l-0.009,0.075l-0.01,0.075l-0.011,0.072l-0.012,0.072l-0.013,0.072l-0.015,0.072l-0.015,0.07l-0.018,0.075l-0.034,0.132l-0.04,0.134l-0.042,0.131l-0.045,0.128l-0.048,0.125l-0.051,0.123l-0.052,0.119l-0.054,0.116l-0.055,0.114l-0.057,0.112l-0.058,0.109l-0.059,0.106l-0.059,0.104l-0.061,0.103l-0.06,0.101l-0.061,0.098l-0.062,0.098l-0.119,0.186l-0.12,0.182l-0.232,0.35l-0.111,0.168l-0.107,0.166l-0.05,0.079l-0.049,0.079l-0.048,0.079l-0.047,0.078l-0.045,0.077l-0.042,0.076l-0.041,0.076l-0.04,0.075l-0.037,0.074l-0.036,0.073l-0.033,0.073l-0.032,0.072l-0.03,0.071l-0.028,0.071l-0.026,0.071l-0.023,0.07l-0.022,0.07l-0.02,0.07l-0.019,0.074l-0.007,0.03l-0.008,0.036l-0.008,0.035l-0.007,0.035l-0.006,0.035l-0.006,0.035l-0.005,0.036l-0.005,0.035l-0.004,0.037l-0.004,0.036l-0.003,0.035l-0.003,0.038l-0.002,0.037l-0.002,0.037l-0.001,0.038l-0.001,0.038l0,0.039l0.001,0.05l-0.002,0.084l-0.005,0.084l-0.011,0.083l-0.015,0.083l-0.02,0.081l-0.024,0.081l-0.029,0.079l-0.033,0.077l-0.038,0.075l-0.042,0.073l-0.045,0.07l-0.05,0.068l-0.053,0.065l-0.057,0.062l-0.06,0.059l-0.063,0.055l-0.067,0.051l-0.069,0.048l-0.071,0.044l-0.074,0.04l-0.077,0.035l-0.078,0.031l-0.079,0.027l-0.081,0.022l-0.082,0.018l-0.083,0.013l-0.084,0.009l-0.084,0.003l-0.538,0.009l-0.514,0.006l-0.49,0.002l-0.47,0.001l-0.452,-0.002l-0.439,-0.003l-0.428,-0.004l-0.422,-0.004l-0.841,-0.009l-0.425,-0.004l-0.435,-0.002l-0.447,-0.001l-0.465,0.001l-0.486,0.004l-0.515,0.006l-0.085,-0.001l-0.086,-0.006l-0.085,-0.011l-0.084,-0.016l-0.083,-0.021l-0.082,-0.026l-0.081,-0.03l-0.078,-0.034l-0.076,-0.04l-0.074,-0.043l-0.072,-0.047l-0.068,-0.052l-0.066,-0.055l-0.062,-0.059l-0.059,-0.063l-0.055,-0.066l-0.051,-0.068l-0.047,-0.072l-0.043,-0.074l-0.039,-0.077l-0.034,-0.078l-0.03,-0.081l-0.025,-0.082l-0.02,-0.083l-0.016,-0.084l-0.011,-0.085l-0.006,-0.086l-0.002,-0.058l-0.002,-0.048l-0.003,-0.047l-0.004,-0.047l-0.004,-0.047l-0.005,-0.046l-0.005,-0.044l-0.006,-0.045l-0.006,-0.045l-0.007,-0.044l-0.007,-0.042l-0.008,-0.043l-0.008,-0.044l-0.008,-0.037l-0.019,-0.088l-0.021,-0.083l-0.022,-0.081l-0.024,-0.08l-0.025,-0.079l-0.028,-0.079l-0.029,-0.079l-0.03,-0.077l-0.032,-0.078l-0.034,-0.077l-0.035,-0.078l-0.037,-0.077l-0.039,-0.077l-0.04,-0.077l-0.041,-0.077l-0.043,-0.078l-0.045,-0.078l-0.046,-0.078l-0.046,-0.078l-0.049,-0.08l-0.048,-0.077l-0.104,-0.164l-0.107,-0.163l-0.223,-0.338l-0.114,-0.175l-0.114,-0.178l-0.06,-0.094l-0.058,-0.095l-0.058,-0.096l-0.057,-0.098l-0.057,-0.1l-0.057,-0.102l-0.056,-0.105l-0.054,-0.107l-0.054,-0.109l-0.052,-0.113l-0.05,-0.114l-0.048,-0.118l-0.046,-0.121l-0.044,-0.123l-0.041,-0.127l-0.037,-0.129l-0.035,-0.133l-0.029,-0.129l-0.015,-0.076l-0.013,-0.069l-0.012,-0.07l-0.01,-0.07l-0.01,-0.071l-0.008,-0.073l-0.007,-0.072l-0.006,-0.072l-0.005,-0.074l-0.003,-0.074l-0.002,-0.075l-0.001,-0.073l0.001,-0.1l0.002,-0.097l0.003,-0.098l0.004,-0.098l0.006,-0.097l0.006,-0.097l0.008,-0.096l0.01,-0.097l0.01,-0.096l0.012,-0.095l0.012,-0.096l0.014,-0.095l0.015,-0.094l0.016,-0.094l0.018,-0.095l0.018,-0.093l0.02,-0.093l0.021,-0.093l0.022,-0.091l0.023,-0.093l0.024,-0.091l0.025,-0.091l0.027,-0.091l0.027,-0.09l0.029,-0.089l0.029,-0.089l0.031,-0.088l0.031,-0.089l0.033,-0.088l0.034,-0.087l0.034,-0.086l0.036,-0.086l0.037,-0.085l0.038,-0.086l0.039,-0.083l0.039,-0.084l0.041,-0.084l0.042,-0.083l0.042,-0.081l0.044,-0.082l0.045,-0.081l0.045,-0.08l0.047,-0.08l0.047,-0.078l0.048,-0.079l0.05,-0.078l0.05,-0.077l0.051,-0.076l0.052,-0.076l0.052,-0.075l0.054,-0.074l0.055,-0.075l0.055,-0.072l0.056,-0.073l0.057,-0.071l0.058,-0.071l0.059,-0.071l0.059,-0.069l0.061,-0.069l0.061,-0.068l0.062,-0.068l0.063,-0.066l0.063,-0.066l0.064,-0.065l0.066,-0.065l0.065,-0.063l0.066,-0.062l0.068,-0.062l0.068,-0.062l0.069,-0.06l0.07,-0.06l0.07,-0.059l0.071,-0.057l0.072,-0.057l0.072,-0.057l0.073,-0.055l0.074,-0.054l0.074,-0.054l0.075,-0.053l0.076,-0.052l0.076,-0.05l0.077,-0.051l0.079,-0.049l0.078,-0.048l0.079,-0.047l0.08,-0.047l0.08,-0.045l0.08,-0.045l0.082,-0.044l0.082,-0.042l0.082,-0.042l0.084,-0.041l0.084,-0.04l0.084,-0.038l0.085,-0.038l0.086,-0.037l0.085,-0.036l0.087,-0.034l0.086,-0.034l0.088,-0.033l0.089,-0.032l0.088,-0.03l0.089,-0.03l0.09,-0.028l0.089,-0.028l0.092,-0.026l0.09,-0.025l0.091,-0.024l0.093,-0.023l0.091,-0.022l0.093,-0.021l0.094,-0.02l0.092,-0.018l0.095,-0.018l0.094,-0.016l0.094,-0.015l0.095,-0.014l0.096,-0.013l0.095,-0.011l0.096,-0.011l0.097,-0.009l0.097,-0.008l0.096,-0.007l0.097,-0.005l0.098,-0.004l0.098,-0.004l0.098,-0.001l0.098,-0.001l0.098,0.001Zm-0.177,1.5l-0.079,0.001l-0.079,0.003l-0.078,0.003l-0.079,0.004l-0.078,0.006l-0.077,0.006l-0.078,0.008l-0.077,0.008l-0.077,0.009l-0.076,0.011l-0.077,0.011l-0.076,0.012l-0.075,0.013l-0.076,0.014l-0.075,0.015l-0.074,0.016l-0.075,0.016l-0.074,0.018l-0.073,0.018l-0.074,0.02l-0.073,0.02l-0.072,0.021l-0.072,0.022l-0.072,0.023l-0.072,0.024l-0.071,0.024l-0.07,0.026l-0.071,0.026l-0.07,0.027l-0.069,0.028l-0.069,0.028l-0.069,0.03l-0.068,0.03l-0.067,0.031l-0.068,0.032l-0.066,0.033l-0.067,0.034l-0.066,0.034l-0.065,0.035l-0.065,0.036l-0.065,0.036l-0.064,0.038l-0.063,0.038l-0.063,0.038l-0.063,0.04l-0.062,0.04l-0.061,0.041l-0.061,0.042l-0.06,0.042l-0.06,0.044l-0.06,0.043l-0.058,0.045l-0.059,0.045l-0.057,0.046l-0.057,0.047l-0.057,0.047l-0.056,0.048l-0.055,0.048l-0.055,0.049l-0.054,0.05l-0.054,0.051l-0.053,0.051l-0.052,0.052l-0.052,0.052l-0.051,0.053l-0.05,0.054l-0.05,0.054l-0.049,0.055l-0.049,0.055l-0.048,0.056l-0.047,0.056l-0.047,0.058l-0.046,0.057l-0.045,0.058l-0.044,0.059l-0.044,0.06l-0.043,0.059l-0.043,0.061l-0.041,0.061l-0.041,0.061l-0.041,0.062l-0.039,0.063l-0.039,0.063l-0.038,0.063l-0.037,0.064l-0.037,0.065l-0.036,0.065l-0.035,0.065l-0.034,0.066l-0.034,0.066l-0.032,0.067l-0.032,0.067l-0.031,0.068l-0.031,0.068l-0.029,0.069l-0.029,0.069l-0.028,0.069l-0.027,0.07l-0.026,0.07l-0.026,0.071l-0.024,0.071l-0.024,0.071l-0.023,0.072l-0.022,0.072l-0.021,0.073l-0.02,0.073l-0.019,0.073l-0.019,0.074l-0.018,0.074l-0.016,0.074l-0.016,0.075l-0.015,0.075l-0.014,0.075l-0.013,0.076l-0.012,0.076l-0.011,0.076l-0.01,0.077l-0.01,0.077l-0.008,0.077l-0.007,0.077l-0.007,0.078l-0.005,0.078l-0.005,0.078l-0.003,0.079l-0.003,0.078l-0.001,0.079l-0.001,0.08l0.001,0.048l0.001,0.047l0.002,0.047l0.003,0.047l0.004,0.047l0.004,0.046l0.006,0.047l0.006,0.046l0.007,0.045l0.007,0.046l0.009,0.045l0.009,0.045l0.02,0.089l0.023,0.088l0.025,0.088l0.028,0.086l0.031,0.087l0.032,0.085l0.035,0.085l0.037,0.085l0.039,0.084l0.041,0.083l0.043,0.084l0.044,0.083l0.046,0.083l0.047,0.083l0.048,0.082l0.05,0.083l0.051,0.083l0.052,0.082l0.107,0.166l0.109,0.168l0.224,0.339l0.113,0.173l0.112,0.176l0.055,0.089l0.056,0.091l0.054,0.091l0.054,0.092l0.053,0.093l0.053,0.095l0.051,0.095l0.05,0.097l0.049,0.098l0.048,0.1l0.046,0.101l0.045,0.102l0.043,0.104l0.041,0.106l0.04,0.107l0.038,0.109l0.035,0.111l0.034,0.112l0.031,0.115l0.029,0.116l0.026,0.119l0.012,0.06l0.012,0.06l0.011,0.061l0.01,0.062l0.01,0.062l0.009,0.063l0.008,0.063l0.007,0.064l0.007,0.064l0.006,0.065l0.005,0.066l0.004,0.066l0.003,0.067l0.003,0.067l0.519,-0.006l0.493,-0.004l0.472,-0.001l0.454,0.001l0.439,0.002l0.429,0.004l0.843,0.009l0.421,0.004l0.425,0.004l0.435,0.003l0.446,0.002l0.463,-0.001l0.483,-0.002l0.506,-0.006l0.534,-0.009l-0.001,-0.061l0,-0.061l0.001,-0.061l0.002,-0.06l0.003,-0.06l0.003,-0.059l0.005,-0.059l0.005,-0.059l0.006,-0.058l0.007,-0.057l0.008,-0.057l0.009,-0.057l0.009,-0.057l0.01,-0.056l0.011,-0.055l0.011,-0.055l0.012,-0.055l0.013,-0.055l0.028,-0.108l0.031,-0.106l0.033,-0.105l0.035,-0.104l0.037,-0.103l0.04,-0.101l0.042,-0.1l0.043,-0.099l0.046,-0.098l0.047,-0.097l0.048,-0.096l0.05,-0.095l0.052,-0.094l0.052,-0.094l0.054,-0.092l0.054,-0.092l0.056,-0.091l0.056,-0.091l0.057,-0.09l0.115,-0.178l0.116,-0.176l0.232,-0.349l0.113,-0.173l0.112,-0.173l0.054,-0.086l0.053,-0.086l0.052,-0.087l0.051,-0.087l0.05,-0.087l0.048,-0.087l0.047,-0.087l0.044,-0.088l0.043,-0.089l0.042,-0.088l0.039,-0.089l0.036,-0.09l0.035,-0.091l0.032,-0.09l0.03,-0.092l0.027,-0.092l0.024,-0.094l0.011,-0.046l0.011,-0.048l0.009,-0.047l0.009,-0.047l0.008,-0.048l0.008,-0.048l0.006,-0.048l0.006,-0.049l0.005,-0.049l0.004,-0.049l0.003,-0.049l0.002,-0.049l0.001,-0.05l0.001,-0.05l-0.001,-0.08l-0.001,-0.079l-0.003,-0.078l-0.003,-0.079l-0.005,-0.078l-0.005,-0.078l-0.007,-0.078l-0.007,-0.077l-0.008,-0.077l-0.01,-0.077l-0.01,-0.077l-0.011,-0.076l-0.012,-0.076l-0.013,-0.076l-0.014,-0.075l-0.015,-0.075l-0.016,-0.075l-0.016,-0.074l-0.018,-0.074l-0.019,-0.074l-0.019,-0.073l-0.02,-0.073l-0.021,-0.073l-0.022,-0.072l-0.023,-0.072l-0.024,-0.071l-0.024,-0.071l-0.026,-0.071l-0.026,-0.07l-0.027,-0.07l-0.028,-0.069l-0.029,-0.069l-0.029,-0.069l-0.031,-0.068l-0.031,-0.068l-0.032,-0.067l-0.032,-0.067l-0.034,-0.066l-0.034,-0.066l-0.035,-0.065l-0.036,-0.065l-0.037,-0.065l-0.037,-0.064l-0.038,-0.063l-0.039,-0.063l-0.039,-0.063l-0.041,-0.062l-0.041,-0.061l-0.041,-0.061l-0.043,-0.061l-0.043,-0.059l-0.044,-0.06l-0.044,-0.059l-0.045,-0.058l-0.046,-0.057l-0.047,-0.058l-0.047,-0.056l-0.048,-0.056l-0.049,-0.055l-0.049,-0.055l-0.05,-0.054l-0.05,-0.054l-0.051,-0.053l-0.052,-0.052l-0.052,-0.052l-0.053,-0.051l-0.054,-0.051l-0.054,-0.05l-0.055,-0.049l-0.055,-0.048l-0.056,-0.048l-0.057,-0.047l-0.057,-0.047l-0.057,-0.046l-0.059,-0.045l-0.058,-0.045l-0.06,-0.043l-0.06,-0.044l-0.06,-0.042l-0.061,-0.042l-0.061,-0.041l-0.062,-0.04l-0.063,-0.04l-0.063,-0.038l-0.063,-0.038l-0.064,-0.038l-0.065,-0.036l-0.065,-0.036l-0.065,-0.035l-0.066,-0.034l-0.067,-0.034l-0.066,-0.033l-0.068,-0.032l-0.067,-0.031l-0.068,-0.03l-0.069,-0.03l-0.069,-0.028l-0.069,-0.028l-0.07,-0.027l-0.071,-0.026l-0.07,-0.026l-0.071,-0.024l-0.072,-0.024l-0.072,-0.023l-0.072,-0.022l-0.072,-0.021l-0.073,-0.02l-0.074,-0.02l-0.073,-0.018l-0.074,-0.018l-0.075,-0.016l-0.074,-0.016l-0.075,-0.015l-0.076,-0.014l-0.075,-0.013l-0.076,-0.012l-0.077,-0.011l-0.076,-0.011l-0.077,-0.009l-0.077,-0.008l-0.078,-0.008l-0.077,-0.006l-0.078,-0.006l-0.079,-0.004l-0.078,-0.003l-0.079,-0.003l-0.079,-0.001l-0.079,-0.001l-0.079,0.001Z" style="fill:#fff;"/><path d="M15.472,7.419c-2.606,0 -4.719,2.113 -4.719,4.719" style="fill:none;stroke:#fff;stroke-width:1px;"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.284 2.498c-.239.266-.184.617-.184 1.002V4H2a.5.5 0 0 0-.492.41L1.5 4.5V17a1 1 0 0 0 .883.993L2.5 18h10a1 1 0 0 0 .97-.752l-.081-.062c.438.368.976.54 1.507.526a2.5 2.5 0 0 1-2.232 1.783l-.164.005h-10a2.5 2.5 0 0 1-2.495-2.336L0 17V4.5a2 2 0 0 1 1.85-1.995L2 2.5l.284-.002zm10.532 0L13 2.5a2 2 0 0 1 1.995 1.85L15 4.5v2.28a2.243 2.243 0 0 0-1.5.404V4.5a.5.5 0 0 0-.41-.492L13 4v-.5l-.007-.144c-.031-.329.032-.626-.177-.858z"/><path d="m6 .49-.144.006a1.75 1.75 0 0 0-1.41.94l-.029.058.083-.004c-.69 0-1.25.56-1.25 1.25v1c0 .69.56 1.25 1.25 1.25h6c.69 0 1.25-.56 1.25-1.25v-1l-.006-.128a1.25 1.25 0 0 0-1.116-1.116l-.046-.002-.027-.058A1.75 1.75 0 0 0 9 .49H6zm0 1.5h3a.25.25 0 0 1 .25.25l.007.102A.75.75 0 0 0 10 2.99h.25v.5h-5.5v-.5H5a.75.75 0 0 0 .743-.648l.007-.102A.25.25 0 0 1 6 1.99zM15.374 8.54a.75.75 0 0 1-.093 1.056l-2.33 1.954h6.127a.75.75 0 0 1 0 1.501h-5.949l2.19 1.837a.75.75 0 1 1-.966 1.15l-3.788-3.18a.747.747 0 0 1-.21-.285.75.75 0 0 1 .17-.945l3.792-3.182a.75.75 0 0 1 1.057.093z"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 35" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:1.5;"><g><path d="M20.505,1.722c-2.308,-0.518 -4.702,-0.518 -7.01,0c-0.563,1.641 -0.846,3.33 -0.849,5.065c-0.93,0.384 -1.805,0.889 -2.603,1.503c-1.504,-0.866 -3.107,-1.465 -4.811,-1.798c-1.602,1.74 -2.799,3.813 -3.504,6.071c1.139,1.308 2.46,2.398 3.962,3.268c-0.133,0.997 -0.133,2.008 0,3.005c-1.502,0.87 -2.823,1.959 -3.962,3.268c0.705,2.258 1.902,4.331 3.504,6.07c1.704,-0.333 3.307,-0.932 4.811,-1.797c0.798,0.613 1.673,1.119 2.603,1.503c0.003,1.735 0.286,3.423 0.849,5.065c2.308,0.518 4.702,0.518 7.01,0c0.563,-1.642 0.846,-3.33 0.849,-5.065c0.93,-0.384 1.805,-0.89 2.603,-1.503c1.504,0.865 3.107,1.464 4.811,1.797c1.602,-1.739 2.799,-3.812 3.504,-6.07c-1.139,-1.309 -2.46,-2.398 -3.962,-3.268c0.133,-0.997 0.133,-2.008 0,-3.005c1.502,-0.87 2.823,-1.96 3.962,-3.268c-0.705,-2.258 -1.902,-4.331 -3.504,-6.071c-1.704,0.333 -3.307,0.932 -4.811,1.798c-0.798,-0.614 -1.673,-1.119 -2.603,-1.503c-0.003,-1.735 -0.286,-3.424 -0.849,-5.065Zm-3.505,9.388c3.435,0 6.223,2.789 6.223,6.223c0,3.435 -2.788,6.223 -6.223,6.223c-3.435,0 -6.223,-2.788 -6.223,-6.223c0,-3.434 2.788,-6.223 6.223,-6.223Z" style="fill:none;stroke:#02c7cd;stroke-width:1.5px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:1.5;"><g><path d="M26.661,0.217l0.076,0.003l0.075,0.005l0.074,0.006l0.075,0.009l0.073,0.01l0.073,0.012l0.073,0.014l0.071,0.016l0.071,0.017l0.071,0.019l0.07,0.021l0.069,0.022l0.068,0.024l0.067,0.026l0.067,0.027l0.066,0.029l0.065,0.03l0.064,0.032l0.063,0.034l0.062,0.035l0.062,0.036l0.06,0.038l0.06,0.039l0.058,0.04l0.058,0.042l0.056,0.043l0.055,0.045l0.054,0.046l0.053,0.047l0.052,0.048l0.051,0.05l0.049,0.05l0.049,0.052l0.047,0.053l0.046,0.054l0.044,0.056l0.043,0.056l0.042,0.057l0.041,0.059l0.039,0.059l0.038,0.061l0.036,0.061l0.035,0.062l0.033,0.064l0.032,0.064l0.03,0.065l0.029,0.065l0.027,0.067l0.026,0.068l0.024,0.068l0.023,0.069l0.02,0.07l0.019,0.07l0.018,0.071l0.015,0.072l0.014,0.072l0.012,0.073l0.011,0.074l0.008,0.074l0.007,0.075l0.005,0.075l0.002,0.076l0.001,0.076l0,26.092l-0.001,0.076l-0.002,0.076l-0.005,0.075l-0.007,0.075l-0.008,0.074l-0.011,0.074l-0.012,0.073l-0.014,0.072l-0.015,0.072l-0.018,0.071l-0.019,0.07l-0.02,0.07l-0.023,0.069l-0.024,0.068l-0.026,0.068l-0.027,0.066l-0.029,0.066l-0.03,0.065l-0.032,0.064l-0.033,0.064l-0.035,0.062l-0.036,0.061l-0.038,0.061l-0.039,0.059l-0.041,0.059l-0.042,0.057l-0.043,0.056l-0.044,0.056l-0.046,0.054l-0.047,0.053l-0.049,0.052l-0.049,0.05l-0.051,0.05l-0.052,0.048l-0.053,0.047l-0.054,0.046l-0.055,0.045l-0.057,0.043l-0.057,0.042l-0.058,0.04l-0.06,0.039l-0.06,0.038l-0.062,0.036l-0.062,0.035l-0.063,0.034l-0.064,0.031l-0.065,0.031l-0.066,0.029l-0.067,0.027l-0.067,0.026l-0.068,0.024l-0.069,0.022l-0.07,0.021l-0.071,0.019l-0.071,0.017l-0.071,0.016l-0.073,0.014l-0.073,0.012l-0.073,0.01l-0.075,0.009l-0.074,0.006l-0.075,0.005l-0.076,0.003l-0.076,0.001l-23.631,0l-0.076,-0.001l-0.076,-0.003l-0.075,-0.005l-0.075,-0.006l-0.074,-0.009l-0.074,-0.01l-0.073,-0.012l-0.072,-0.014l-0.072,-0.016l-0.071,-0.017l-0.07,-0.019l-0.07,-0.021l-0.069,-0.022l-0.068,-0.024l-0.068,-0.026l-0.066,-0.027l-0.066,-0.029l-0.065,-0.031l-0.064,-0.031l-0.064,-0.034l-0.062,-0.035l-0.061,-0.036l-0.061,-0.038l-0.059,-0.039l-0.059,-0.04l-0.057,-0.042l-0.056,-0.043l-0.056,-0.045l-0.054,-0.046l-0.053,-0.047l-0.052,-0.048l-0.05,-0.05l-0.05,-0.05l-0.048,-0.052l-0.047,-0.053l-0.046,-0.054l-0.045,-0.056l-0.043,-0.056l-0.042,-0.057l-0.04,-0.059l-0.039,-0.059l-0.038,-0.061l-0.036,-0.061l-0.035,-0.062l-0.034,-0.064l-0.032,-0.064l-0.03,-0.065l-0.029,-0.066l-0.027,-0.066l-0.026,-0.068l-0.024,-0.068l-0.022,-0.069l-0.021,-0.07l-0.019,-0.07l-0.017,-0.071l-0.016,-0.072l-0.014,-0.072l-0.012,-0.073l-0.01,-0.074l-0.009,-0.074l-0.006,-0.075l-0.005,-0.075l-0.003,-0.076l-0.001,-0.076l0,-26.092l0.001,-0.076l0.003,-0.076l0.005,-0.075l0.006,-0.075l0.009,-0.074l0.01,-0.074l0.012,-0.073l0.014,-0.072l0.016,-0.072l0.017,-0.071l0.019,-0.07l0.021,-0.07l0.022,-0.069l0.024,-0.068l0.026,-0.068l0.027,-0.067l0.029,-0.065l0.03,-0.065l0.032,-0.064l0.034,-0.064l0.035,-0.062l0.036,-0.061l0.038,-0.061l0.039,-0.059l0.04,-0.059l0.042,-0.057l0.043,-0.056l0.045,-0.056l0.046,-0.054l0.047,-0.053l0.048,-0.052l0.05,-0.05l0.05,-0.05l0.052,-0.048l0.053,-0.047l0.054,-0.046l0.056,-0.045l0.056,-0.043l0.057,-0.042l0.059,-0.04l0.059,-0.039l0.061,-0.038l0.061,-0.036l0.062,-0.035l0.064,-0.034l0.064,-0.032l0.065,-0.03l0.065,-0.029l0.067,-0.027l0.068,-0.026l0.068,-0.024l0.069,-0.022l0.07,-0.021l0.07,-0.019l0.071,-0.017l0.072,-0.016l0.072,-0.014l0.073,-0.012l0.074,-0.01l0.074,-0.009l0.075,-0.006l0.075,-0.005l0.076,-0.003l0.076,-0.001l23.631,0l0.076,0.001Zm-23.698,1.499l-0.047,0.001l-0.038,0.001l-0.037,0.002l-0.037,0.004l-0.037,0.004l-0.036,0.005l-0.036,0.006l-0.035,0.007l-0.035,0.007l-0.035,0.009l-0.034,0.009l-0.034,0.01l-0.034,0.011l-0.033,0.012l-0.033,0.012l-0.033,0.014l-0.032,0.014l-0.032,0.015l-0.031,0.015l-0.031,0.017l-0.031,0.017l-0.03,0.018l-0.03,0.018l-0.029,0.02l-0.029,0.02l-0.029,0.02l-0.027,0.022l-0.028,0.022l-0.027,0.022l-0.026,0.024l-0.026,0.024l-0.025,0.024l-0.024,0.026l-0.024,0.025l-0.023,0.026l-0.023,0.027l-0.022,0.028l-0.022,0.027l-0.02,0.029l-0.02,0.029l-0.02,0.029l-0.018,0.03l-0.018,0.03l-0.017,0.03l-0.017,0.032l-0.015,0.031l-0.015,0.032l-0.014,0.032l-0.014,0.033l-0.012,0.033l-0.012,0.033l-0.011,0.033l-0.01,0.035l-0.009,0.034l-0.009,0.035l-0.007,0.035l-0.007,0.035l-0.006,0.036l-0.005,0.036l-0.004,0.037l-0.004,0.036l-0.002,0.038l-0.001,0.038l-0.001,0.047l0,26.074l0.001,0.047l0.001,0.038l0.002,0.037l0.004,0.037l0.004,0.037l0.005,0.036l0.006,0.036l0.007,0.035l0.007,0.035l0.009,0.035l0.009,0.034l0.01,0.034l0.011,0.034l0.012,0.033l0.012,0.033l0.014,0.033l0.014,0.032l0.015,0.032l0.015,0.031l0.017,0.031l0.017,0.031l0.018,0.03l0.018,0.03l0.02,0.029l0.02,0.029l0.02,0.028l0.022,0.028l0.022,0.028l0.022,0.026l0.024,0.027l0.024,0.026l0.024,0.025l0.025,0.024l0.026,0.024l0.026,0.023l0.027,0.023l0.028,0.022l0.027,0.021l0.029,0.021l0.029,0.02l0.029,0.02l0.03,0.018l0.03,0.018l0.031,0.017l0.031,0.017l0.031,0.015l0.032,0.015l0.032,0.014l0.033,0.014l0.033,0.012l0.033,0.012l0.034,0.011l0.034,0.01l0.034,0.009l0.035,0.009l0.035,0.007l0.035,0.007l0.036,0.006l0.036,0.005l0.037,0.004l0.037,0.004l0.037,0.002l0.038,0.001l0.047,0.001l23.612,0l0.048,-0.001l0.037,-0.001l0.038,-0.002l0.037,-0.004l0.036,-0.004l0.036,-0.005l0.036,-0.006l0.036,-0.007l0.035,-0.007l0.034,-0.009l0.035,-0.009l0.034,-0.01l0.033,-0.011l0.034,-0.012l0.033,-0.012l0.032,-0.014l0.032,-0.014l0.032,-0.015l0.032,-0.015l0.031,-0.017l0.03,-0.017l0.031,-0.018l0.029,-0.018l0.03,-0.02l0.029,-0.02l0.028,-0.02l0.028,-0.022l0.027,-0.022l0.027,-0.023l0.026,-0.023l0.026,-0.024l0.025,-0.024l0.025,-0.025l0.024,-0.026l0.023,-0.027l0.023,-0.026l0.022,-0.028l0.021,-0.028l0.021,-0.028l0.02,-0.029l0.019,-0.029l0.019,-0.03l0.018,-0.03l0.017,-0.031l0.016,-0.031l0.016,-0.031l0.015,-0.032l0.014,-0.033l0.013,-0.032l0.013,-0.033l0.011,-0.033l0.011,-0.034l0.01,-0.034l0.01,-0.034l0.008,-0.035l0.008,-0.035l0.007,-0.035l0.005,-0.036l0.006,-0.036l0.004,-0.037l0.003,-0.037l0.002,-0.037l0.002,-0.038l0,-0.047l0,-26.074l0,-0.047l-0.002,-0.038l-0.002,-0.038l-0.003,-0.036l-0.004,-0.037l-0.006,-0.036l-0.005,-0.036l-0.007,-0.035l-0.008,-0.035l-0.008,-0.035l-0.01,-0.035l-0.01,-0.033l-0.011,-0.034l-0.011,-0.033l-0.013,-0.033l-0.013,-0.033l-0.014,-0.032l-0.015,-0.032l-0.016,-0.031l-0.016,-0.031l-0.017,-0.031l-0.018,-0.03l-0.019,-0.03l-0.019,-0.029l-0.02,-0.029l-0.021,-0.029l-0.021,-0.027l-0.022,-0.028l-0.023,-0.027l-0.023,-0.026l-0.024,-0.025l-0.025,-0.026l-0.025,-0.024l-0.026,-0.024l-0.026,-0.024l-0.027,-0.022l-0.027,-0.022l-0.028,-0.022l-0.029,-0.02l-0.028,-0.02l-0.03,-0.02l-0.029,-0.018l-0.031,-0.018l-0.03,-0.017l-0.031,-0.017l-0.032,-0.015l-0.031,-0.015l-0.033,-0.014l-0.032,-0.014l-0.033,-0.012l-0.034,-0.012l-0.033,-0.011l-0.034,-0.01l-0.035,-0.009l-0.034,-0.009l-0.035,-0.007l-0.036,-0.007l-0.036,-0.006l-0.036,-0.005l-0.036,-0.004l-0.037,-0.004l-0.038,-0.002l-0.037,-0.001l-0.048,-0.001l-23.612,0Z" style="fill:#8bc34a;"/><path d="M14,9l9,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/><path d="M7,9l2,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/><path d="M14,17l9,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/><path d="M7,17l2,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/><path d="M14,25l9,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/><path d="M7,25l2,0" style="fill:none;stroke:#8bc34a;stroke-width:1.5px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M14.873 3.35L11.527.123A.444.444 0 0 0 11.218 0H1.922c-.508 0-.92.398-.92.887v16.226c0 .489.412.887.92.887h12.16c.507 0 .92-.398.92-.887V3.648a.42.42 0 0 0-.129-.298zM11 1.5l2.297 2.176h-2.24A.056.056 0 0 1 11 3.622V1.5zM2.38 16.665V1.622c0-.01 2.54-.003 7.62.02v1.741c0 .48.494 1.244 1 1.244h2.626v12.081s-11.247-.03-11.247-.043z"/><path d="M10.645 6h-6.29C4.16 6 4 6.336 4 6.75s.16.75.355.75h6.29c.196 0 .355-.336.355-.75S10.84 6 10.645 6zM10.645 9h-6.29C4.16 9 4 9.336 4 9.75s.16.75.355.75h6.29c.196 0 .355-.336.355-.75S10.84 9 10.645 9zM8.54 12H4.46c-.254 0-.46.336-.46.75s.206.75.46.75h4.08c.254 0 .46-.336.46-.75S8.794 12 8.54 12z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g><path d="m11.024 12.655 2.837-3.189a.75.75 0 0 1 1.15.965l-4.18 4.788a.747.747 0 0 1-.285.21.75.75 0 0 1-.945-.17L5.42 10.467a.75.75 0 1 1 1.15-.964l2.954 3.331V2.707a.75.75 0 1 1 1.501 0v9.948z"/><path d="M17.3 15.54a.75.75 0 0 1 .743.648l.007.102v.96a1.75 1.75 0 0 1-1.606 1.745l-.144.006h-12a1.75 1.75 0 0 1-1.744-1.607l-.006-.143v-.961a.75.75 0 0 1 1.493-.102l.007.102v.96a.25.25 0 0 0 .193.244l.057.007h12a.25.25 0 0 0 .243-.193l.007-.057v-.961a.75.75 0 0 1 .75-.75z"/></g></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M888 1184l116-116-152-152-116 116v56h96v96h56zm440-720q-16-16-33 1l-350 350q-17 17-1 33t33-1l350-350q17-17 1-33zm80 594v190q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-14 14-32 8-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-126q0-13 9-22l64-64q15-15 35-7t20 29zm-96-738l288 288-672 672h-288v-288zm444 132l-92 92-288-288 92-92q28-28 68-28t68 28l152 152q28 28 28 68t-28 68z"/></svg>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M896 128q209 0 385.5 103t279.5 279.5 103 385.5-103 385.5-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103zm128 1247v-190q0-14-9-23.5t-22-9.5h-192q-13 0-23 10t-10 23v190q0 13 10 23t23 10h192q13 0 22-9.5t9-23.5zm-2-344l18-621q0-12-10-18-10-8-24-8h-220q-14 0-24 8-10 6-10 18l17 621q0 10 10 17.5t24 7.5h185q14 0 23.5-7.5t10.5-17.5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="512" height="512"><path fill="#808080" d="M256 96C144.341 96 47.559 161.021 0 256c47.559 94.979 144.341 160 256 160 111.656 0 208.439-65.021 256-160-47.559-94.979-144.344-160-256-160zm126.225 84.852c30.082 19.187 55.572 44.887 74.719 75.148-19.146 30.261-44.639 55.961-74.719 75.148C344.428 355.257 300.779 368 256 368c-44.78 0-88.428-12.743-126.225-36.852C99.695 311.96 74.205 286.26 55.058 256c19.146-30.262 44.637-55.962 74.717-75.148a235.143 235.143 0 0 1 5.929-3.65C130.725 190.866 128 205.613 128 221c0 70.691 57.308 128 128 128 70.691 0 128-57.309 128-128 0-15.387-2.725-30.134-7.703-43.799a240.633 240.633 0 0 1 5.928 3.651zM256 205c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48z"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 14 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><path d="M10.468,0.601l2.133,0l-4.594,6.656l0,4.65l-2.577,1.622l0,-6.272l-4.829,-6.656l7.951,0" style="fill:none;stroke:#4d4d4d;stroke-width:1.2px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g id="info"><circle cx="15" cy="15" r="15" style="fill:#2d2d2d;"/><path d="M19.935,8.601l2.666,0l-5.743,8.32l0.001,5.813l-3.222,2.027l0,-7.84l-6.036,-8.32l9.939,0" style="fill:none;stroke:#fff;stroke-width:1.5px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 34 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g><path d="M15.769,1.447l4.901,4.923l9.868,0c1.359,0 2.462,1.103 2.462,2.461l0,19.693c0,1.358 -1.103,2.461 -2.462,2.461l-27.076,0c-1.359,0 -2.462,-1.103 -2.462,-2.461l0,-19.693c0,0 0,-4.923 0,-4.923c0,-1.358 1.103,-2.461 2.462,-2.461l12.307,0Z" style="fill:none;stroke:#54acf2;stroke-width:1.5px;"/><path d="M2,12l30,0" style="fill:none;stroke:#54acf2;stroke-width:1.5px;stroke-linejoin:bevel;"/></g></svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg">
2
+ <svg id="github" viewBox="0 0 24 24">
3
+ <title id="simpleicons-github-icon">GitHub</title>
4
+ <path fill="#ffffff" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
5
+ </svg>
6
+ </svg>
@@ -0,0 +1 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M11.549.674L8.526 3.697a1 1 0 0 0 0 1.414l2.121 2.122a1 1 0 0 0 1.414 0l3.023-3.023a5.5 5.5 0 0 1-6.152 7.12L5.33 14.932a2 2 0 0 1-2.829 0L.826 13.257a2 2 0 0 1 0-2.828l3.602-3.602a5.5 5.5 0 0 1 7.12-6.153z" fill="#2F3945" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="12" height="17" viewBox="0 0 12 17" xmlns="http://www.w3.org/2000/svg"><path d="M8.788 11.08c1.011-1.382 1.137-3.004.378-4.866 2.426 1.506 3.156 3.66 2.19 6.462l-.017-.004c-.626 2.638-3.435 4.269-6.333 3.653C2.07 15.7.154 13.005.728 10.304l.06.012c.721-1.963.524-3.667-.59-5.113 2.055.545 3.272 2.194 3.65 4.947.85-2.654.33-5.733-1.558-9.238 4.778 1.48 6.944 4.87 6.498 10.168z" fill="#F3800F" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M7 14A7 7 0 1 1 7 0a7 7 0 0 1 0 14zM4.828 3.615v6.77l6-3.383-6-3.387z" fill="#65B20D" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="14" height="10" viewBox="0 0 14 10" xmlns="http://www.w3.org/2000/svg"><path d="M4 0h10v2H4V0zM0 0h2v2H0V0zm4 4h10v2H4V4zm0 4h10v2H4V8zM0 4h2v2H0V4zm0 4h2v2H0V8z" fill="#4384CF" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g id="bulb"><circle cx="15" cy="15" r="15" style="fill:#32c1b1;"/><path d="M15,11.921c1.947,-3.701 5.842,-3.701 7.789,-2.197c1.948,1.505 1.948,4.513 0,7.522c-1.363,2.257 -4.868,4.514 -7.789,6.018c-2.921,-1.504 -6.426,-3.761 -7.79,-6.018c-1.947,-3.009 -1.947,-6.017 0,-7.522c1.948,-1.504 5.843,-1.504 7.79,2.197Z" style="fill:none;stroke:#fff;stroke-width:1.5px;"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="info"><circle cx="15" cy="15" r="15" style="fill:#3f51b5;"/><path d="M15.127,12.503l0.127,0.009l0.126,0.016l0.123,0.023l0.121,0.027l0.12,0.034l0.115,0.04l0.114,0.044l0.112,0.051l0.109,0.056l0.104,0.06l0.101,0.064l0.098,0.07l0.094,0.074l0.09,0.078l0.087,0.083l0.082,0.086l0.079,0.091l0.074,0.094l0.069,0.097l0.066,0.103l0.06,0.104l0.055,0.108l0.05,0.111l0.045,0.115l0.04,0.116l0.034,0.119l0.028,0.121l0.022,0.124l0.016,0.126l0.009,0.126l0.003,0.108l0,8.038l-0.003,0.108l-0.009,0.126l-0.016,0.126l-0.022,0.124l-0.028,0.121l-0.034,0.119l-0.04,0.116l-0.045,0.115l-0.05,0.111l-0.055,0.108l-0.06,0.104l-0.066,0.103l-0.069,0.097l-0.074,0.094l-0.079,0.091l-0.082,0.086l-0.087,0.083l-0.09,0.078l-0.094,0.074l-0.098,0.07l-0.101,0.064l-0.104,0.06l-0.109,0.056l-0.112,0.051l-0.114,0.044l-0.115,0.04l-0.12,0.034l-0.121,0.027l-0.123,0.023l-0.126,0.016l-0.127,0.009l-0.127,0.003l-0.127,-0.003l-0.127,-0.009l-0.126,-0.016l-0.123,-0.023l-0.121,-0.027l-0.12,-0.034l-0.115,-0.04l-0.114,-0.044l-0.112,-0.051l-0.109,-0.056l-0.104,-0.06l-0.101,-0.064l-0.098,-0.07l-0.094,-0.074l-0.09,-0.078l-0.087,-0.083l-0.082,-0.086l-0.079,-0.091l-0.074,-0.094l-0.069,-0.097l-0.066,-0.103l-0.06,-0.104l-0.055,-0.108l-0.05,-0.111l-0.045,-0.115l-0.04,-0.116l-0.034,-0.119l-0.028,-0.121l-0.022,-0.124l-0.016,-0.126l-0.009,-0.126l-0.003,-0.108l0,-8.038l0.003,-0.108l0.009,-0.126l0.016,-0.126l0.022,-0.124l0.028,-0.121l0.034,-0.119l0.04,-0.116l0.045,-0.115l0.05,-0.111l0.055,-0.108l0.06,-0.104l0.066,-0.103l0.069,-0.097l0.074,-0.094l0.079,-0.091l0.082,-0.086l0.087,-0.083l0.09,-0.078l0.094,-0.074l0.098,-0.07l0.101,-0.064l0.104,-0.06l0.109,-0.056l0.112,-0.051l0.114,-0.044l0.115,-0.04l0.12,-0.034l0.121,-0.027l0.123,-0.023l0.126,-0.016l0.127,-0.009l0.127,-0.003l0.127,0.003Zm-0.178,1.498l-0.051,0.004l-0.05,0.007l-0.049,0.008l-0.049,0.012l-0.047,0.013l-0.047,0.016l-0.045,0.018l-0.044,0.02l-0.043,0.022l-0.042,0.024l-0.041,0.026l-0.039,0.028l-0.038,0.029l-0.036,0.032l-0.035,0.033l-0.033,0.035l-0.032,0.036l-0.029,0.038l-0.028,0.039l-0.026,0.041l-0.024,0.042l-0.022,0.043l-0.02,0.044l-0.018,0.045l-0.016,0.047l-0.013,0.047l-0.012,0.049l-0.008,0.049l-0.007,0.05l-0.004,0.051l-0.001,0.051l0,8l0.001,0.051l0.004,0.051l0.007,0.05l0.008,0.049l0.012,0.049l0.013,0.047l0.016,0.047l0.018,0.045l0.02,0.044l0.022,0.043l0.024,0.042l0.026,0.041l0.028,0.039l0.029,0.038l0.032,0.036l0.033,0.035l0.035,0.033l0.036,0.032l0.038,0.029l0.039,0.028l0.041,0.026l0.042,0.024l0.043,0.022l0.044,0.02l0.045,0.018l0.047,0.016l0.047,0.013l0.049,0.012l0.049,0.008l0.05,0.007l0.051,0.004l0.051,0.001l0.051,-0.001l0.051,-0.004l0.05,-0.007l0.049,-0.008l0.049,-0.012l0.047,-0.013l0.047,-0.016l0.045,-0.018l0.044,-0.02l0.043,-0.022l0.042,-0.024l0.041,-0.026l0.039,-0.028l0.038,-0.029l0.036,-0.032l0.035,-0.033l0.033,-0.035l0.032,-0.036l0.029,-0.038l0.028,-0.039l0.026,-0.041l0.024,-0.042l0.022,-0.043l0.02,-0.044l0.018,-0.045l0.016,-0.047l0.013,-0.047l0.012,-0.049l0.008,-0.049l0.007,-0.05l0.004,-0.051l0.001,-0.051l0,-8l-0.001,-0.051l-0.004,-0.051l-0.007,-0.05l-0.008,-0.049l-0.012,-0.049l-0.013,-0.047l-0.016,-0.047l-0.018,-0.045l-0.02,-0.044l-0.022,-0.043l-0.024,-0.042l-0.026,-0.041l-0.028,-0.039l-0.029,-0.038l-0.032,-0.036l-0.033,-0.035l-0.035,-0.033l-0.036,-0.032l-0.038,-0.029l-0.039,-0.028l-0.041,-0.026l-0.042,-0.024l-0.043,-0.022l-0.044,-0.02l-0.045,-0.018l-0.047,-0.016l-0.047,-0.013l-0.049,-0.012l-0.049,-0.008l-0.05,-0.007l-0.051,-0.004l-0.051,-0.001l-0.051,0.001Z" style="fill:#fff;"/><path d="M15.128,5.503l0.126,0.009l0.124,0.016l0.125,0.022l0.122,0.029l0.118,0.033l0.116,0.04l0.115,0.045l0.112,0.051l0.107,0.055l0.105,0.06l0.101,0.065l0.098,0.069l0.094,0.074l0.09,0.078l0.087,0.083l0.083,0.087l0.077,0.089l0.075,0.095l0.069,0.098l0.065,0.1l0.061,0.106l0.055,0.108l0.05,0.111l0.045,0.114l0.04,0.117l0.034,0.119l0.028,0.122l0.022,0.122l0.016,0.126l0.009,0.127l0.003,0.127l-0.003,0.127l-0.009,0.127l-0.016,0.126l-0.022,0.122l-0.028,0.122l-0.034,0.119l-0.04,0.117l-0.045,0.114l-0.05,0.111l-0.055,0.108l-0.061,0.106l-0.065,0.1l-0.069,0.098l-0.075,0.095l-0.077,0.089l-0.083,0.087l-0.087,0.083l-0.09,0.078l-0.094,0.074l-0.098,0.069l-0.101,0.065l-0.105,0.06l-0.107,0.055l-0.112,0.051l-0.115,0.045l-0.116,0.04l-0.118,0.033l-0.122,0.029l-0.125,0.022l-0.124,0.016l-0.126,0.009l-0.128,0.003l-0.128,-0.003l-0.126,-0.009l-0.124,-0.016l-0.125,-0.022l-0.122,-0.029l-0.118,-0.033l-0.116,-0.04l-0.115,-0.045l-0.112,-0.051l-0.107,-0.055l-0.105,-0.06l-0.101,-0.065l-0.098,-0.069l-0.094,-0.074l-0.09,-0.078l-0.087,-0.083l-0.083,-0.087l-0.077,-0.089l-0.075,-0.095l-0.069,-0.098l-0.065,-0.1l-0.061,-0.106l-0.055,-0.108l-0.05,-0.111l-0.045,-0.114l-0.04,-0.117l-0.034,-0.119l-0.028,-0.122l-0.022,-0.122l-0.016,-0.126l-0.009,-0.127l-0.003,-0.127l0.003,-0.127l0.009,-0.127l0.016,-0.126l0.022,-0.122l0.028,-0.122l0.034,-0.119l0.04,-0.117l0.045,-0.114l0.05,-0.111l0.055,-0.108l0.061,-0.106l0.065,-0.1l0.069,-0.098l0.075,-0.095l0.077,-0.089l0.083,-0.087l0.087,-0.083l0.09,-0.078l0.094,-0.074l0.098,-0.069l0.101,-0.065l0.105,-0.06l0.107,-0.055l0.112,-0.051l0.115,-0.045l0.116,-0.04l0.118,-0.033l0.122,-0.029l0.125,-0.022l0.124,-0.016l0.126,-0.009l0.128,-0.003l0.128,0.003Zm-0.179,1.498l-0.051,0.004l-0.05,0.007l-0.049,0.008l-0.049,0.012l-0.047,0.013l-0.047,0.016l-0.045,0.018l-0.044,0.02l-0.043,0.022l-0.042,0.024l-0.041,0.026l-0.039,0.028l-0.038,0.029l-0.036,0.032l-0.035,0.033l-0.033,0.035l-0.032,0.036l-0.029,0.038l-0.028,0.039l-0.026,0.041l-0.024,0.042l-0.022,0.043l-0.02,0.044l-0.018,0.045l-0.016,0.047l-0.013,0.047l-0.012,0.049l-0.008,0.049l-0.007,0.05l-0.004,0.051l-0.001,0.051l0.001,0.051l0.004,0.051l0.007,0.05l0.008,0.049l0.012,0.049l0.013,0.047l0.016,0.047l0.018,0.045l0.02,0.044l0.022,0.043l0.024,0.042l0.026,0.041l0.028,0.039l0.029,0.038l0.032,0.036l0.033,0.035l0.035,0.033l0.036,0.032l0.038,0.029l0.039,0.028l0.041,0.026l0.042,0.024l0.043,0.022l0.044,0.02l0.045,0.018l0.047,0.016l0.047,0.013l0.049,0.012l0.049,0.008l0.05,0.007l0.051,0.004l0.051,0.001l0.051,-0.001l0.051,-0.004l0.05,-0.007l0.049,-0.008l0.049,-0.012l0.047,-0.013l0.047,-0.016l0.045,-0.018l0.044,-0.02l0.043,-0.022l0.042,-0.024l0.041,-0.026l0.039,-0.028l0.038,-0.029l0.036,-0.032l0.035,-0.033l0.033,-0.035l0.032,-0.036l0.029,-0.038l0.028,-0.039l0.026,-0.041l0.024,-0.042l0.022,-0.043l0.02,-0.044l0.018,-0.045l0.016,-0.047l0.013,-0.047l0.012,-0.049l0.008,-0.049l0.007,-0.05l0.004,-0.051l0.001,-0.051l-0.001,-0.051l-0.004,-0.051l-0.007,-0.05l-0.008,-0.049l-0.012,-0.049l-0.013,-0.047l-0.016,-0.047l-0.018,-0.045l-0.02,-0.044l-0.022,-0.043l-0.024,-0.042l-0.026,-0.041l-0.028,-0.039l-0.029,-0.038l-0.032,-0.036l-0.033,-0.035l-0.035,-0.033l-0.036,-0.032l-0.038,-0.029l-0.039,-0.028l-0.041,-0.026l-0.042,-0.024l-0.043,-0.022l-0.044,-0.02l-0.045,-0.018l-0.047,-0.016l-0.047,-0.013l-0.049,-0.012l-0.049,-0.008l-0.05,-0.007l-0.051,-0.004l-0.051,-0.001l-0.051,0.001Z" style="fill:#fff;"/></g></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:bevel;stroke-miterlimit:1.5;"><path d="M1,1l0,10l10,0.151" style="fill:none;stroke:#d2d2d2;stroke-width:1px;stroke-dasharray:2,1,0,0;"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g><path d="M5.703,0c3.148,0 5.704,2.556 5.704,5.703c0,3.148 -2.556,5.704 -5.704,5.704c-3.147,0 -5.703,-2.556 -5.703,-5.704c0,-3.147 2.556,-5.703 5.703,-5.703Zm0,1.202c2.485,0 4.502,2.017 4.502,4.501c0,2.485 -2.017,4.502 -4.502,4.502c-2.484,0 -4.501,-2.017 -4.501,-4.502c0,-2.484 2.017,-4.501 4.501,-4.501Z" style="fill:#b4b4b4;"/><path d="M9.331,7.985l-1.518,1.517l5.498,5.498l1.517,-1.518l-5.497,-5.497Z" style="fill:#b4b4b4;"/></g></svg>
@@ -0,0 +1,4 @@
1
+ <svg fill="#fff" height="48" viewBox="0 0 24 24" width="48" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0h24v24H0z" fill="none"/>
3
+ <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
4
+ </svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 30 31" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g id="plug"><circle cx="15" cy="15" r="15" style="fill:#2d2d2d;"/><path d="M21.084,14.002l0.085,0.008l0.083,0.011l0.083,0.017l0.082,0.021l0.081,0.026l0.078,0.03l0.077,0.035l0.075,0.039l0.073,0.043l0.07,0.047l0.068,0.051l0.064,0.055l0.061,0.058l0.058,0.062l0.054,0.064l0.051,0.068l0.047,0.071l0.042,0.073l0.039,0.075l0.034,0.077l0.029,0.079l0.026,0.081l0.02,0.082l0.016,0.083l0.012,0.084l0.006,0.084l0.002,0.084l-0.001,0.082l-0.002,0.092l-0.003,0.091l-0.004,0.091l-0.006,0.09l-0.007,0.091l-0.008,0.09l-0.009,0.091l-0.011,0.089l-0.011,0.09l-0.013,0.088l-0.015,0.089l-0.015,0.088l-0.016,0.088l-0.018,0.088l-0.019,0.087l-0.02,0.087l-0.021,0.087l-0.022,0.086l-0.024,0.085l-0.024,0.085l-0.026,0.085l-0.027,0.084l-0.027,0.083l-0.029,0.084l-0.03,0.083l-0.031,0.082l-0.032,0.081l-0.033,0.082l-0.034,0.081l-0.035,0.08l-0.036,0.079l-0.038,0.079l-0.038,0.079l-0.039,0.078l-0.04,0.078l-0.041,0.076l-0.042,0.076l-0.043,0.076l-0.044,0.076l-0.045,0.074l-0.045,0.074l-0.047,0.073l-0.047,0.073l-0.049,0.072l-0.049,0.071l-0.05,0.071l-0.051,0.07l-0.052,0.069l-0.053,0.069l-0.053,0.069l-0.055,0.067l-0.055,0.067l-0.056,0.066l-0.057,0.066l-0.057,0.064l-0.058,0.064l-0.06,0.063l-0.06,0.063l-0.061,0.062l-0.061,0.061l-0.062,0.061l-0.063,0.06l-0.063,0.059l-0.065,0.058l-0.065,0.058l-0.066,0.057l-0.067,0.056l-0.067,0.055l-0.067,0.054l-0.069,0.054l-0.07,0.053l-0.069,0.053l-0.071,0.051l-0.071,0.051l-0.072,0.049l-0.072,0.05l-0.074,0.048l-0.073,0.047l-0.074,0.047l-0.076,0.046l-0.075,0.045l-0.076,0.044l-0.077,0.043l-0.077,0.043l-0.078,0.041l-0.078,0.041l-0.079,0.04l-0.08,0.039l-0.08,0.038l-0.08,0.037l-0.082,0.037l-0.081,0.035l-0.083,0.035l-0.082,0.034l-0.083,0.032l-0.084,0.032l-0.084,0.031l-0.085,0.03l-0.085,0.029l-0.085,0.028l-0.087,0.028l-0.086,0.026l-0.086,0.025l-0.088,0.025l-0.088,0.023l-0.088,0.022l-0.088,0.022l-0.089,0.02l-0.089,0.02l-0.09,0.018l-0.09,0.018l-0.09,0.016l-0.092,0.016l-0.091,0.014l-0.091,0.013l-0.092,0.012l-0.092,0.012l-0.093,0.01l-0.092,0.009l-0.093,0.008l-0.094,0.007l-0.093,0.006l-0.095,0.005l-0.094,0.004l-0.094,0.003l-0.095,0.001l-0.095,0.001l-0.095,-0.001l-0.095,-0.001l-0.094,-0.003l-0.094,-0.004l-0.095,-0.005l-0.093,-0.006l-0.094,-0.007l-0.093,-0.008l-0.092,-0.009l-0.093,-0.01l-0.092,-0.012l-0.092,-0.012l-0.091,-0.013l-0.091,-0.014l-0.092,-0.016l-0.09,-0.016l-0.09,-0.018l-0.09,-0.018l-0.089,-0.02l-0.089,-0.02l-0.088,-0.022l-0.088,-0.022l-0.088,-0.023l-0.088,-0.025l-0.086,-0.025l-0.086,-0.026l-0.087,-0.028l-0.086,-0.028l-0.085,-0.029l-0.084,-0.03l-0.084,-0.031l-0.084,-0.032l-0.083,-0.032l-0.082,-0.034l-0.082,-0.035l-0.082,-0.035l-0.082,-0.037l-0.08,-0.037l-0.08,-0.038l-0.08,-0.039l-0.079,-0.04l-0.078,-0.041l-0.078,-0.041l-0.077,-0.043l-0.077,-0.043l-0.076,-0.044l-0.075,-0.045l-0.076,-0.046l-0.074,-0.047l-0.073,-0.047l-0.073,-0.048l-0.073,-0.05l-0.072,-0.049l-0.071,-0.051l-0.071,-0.051l-0.07,-0.053l-0.069,-0.053l-0.069,-0.054l-0.067,-0.054l-0.067,-0.055l-0.067,-0.056l-0.066,-0.057l-0.065,-0.058l-0.065,-0.058l-0.063,-0.059l-0.063,-0.06l-0.062,-0.061l-0.061,-0.061l-0.061,-0.061l-0.06,-0.064l-0.06,-0.063l-0.058,-0.064l-0.057,-0.064l-0.057,-0.066l-0.056,-0.066l-0.055,-0.067l-0.055,-0.068l-0.053,-0.068l-0.053,-0.068l-0.052,-0.07l-0.051,-0.07l-0.05,-0.071l-0.049,-0.071l-0.049,-0.072l-0.047,-0.073l-0.047,-0.073l-0.045,-0.074l-0.045,-0.074l-0.044,-0.076l-0.043,-0.076l-0.042,-0.075l-0.041,-0.077l-0.04,-0.078l-0.039,-0.078l-0.038,-0.078l-0.038,-0.08l-0.036,-0.079l-0.035,-0.08l-0.034,-0.081l-0.033,-0.082l-0.032,-0.081l-0.031,-0.083l-0.03,-0.082l-0.029,-0.084l-0.027,-0.083l-0.027,-0.084l-0.026,-0.085l-0.024,-0.085l-0.024,-0.086l-0.022,-0.086l-0.021,-0.086l-0.02,-0.087l-0.019,-0.087l-0.018,-0.087l-0.016,-0.088l-0.016,-0.089l-0.014,-0.089l-0.013,-0.088l-0.011,-0.09l-0.011,-0.089l-0.009,-0.09l-0.008,-0.091l-0.007,-0.091l-0.006,-0.09l-0.004,-0.091l-0.004,-0.092l-0.001,-0.091l-0.001,-0.082l0.002,-0.084l0.006,-0.084l0.012,-0.084l0.016,-0.083l0.02,-0.082l0.026,-0.081l0.029,-0.079l0.034,-0.077l0.039,-0.075l0.042,-0.073l0.047,-0.071l0.051,-0.068l0.054,-0.064l0.058,-0.062l0.061,-0.058l0.064,-0.055l0.068,-0.051l0.07,-0.047l0.073,-0.043l0.075,-0.039l0.077,-0.035l0.079,-0.03l0.08,-0.026l0.082,-0.021l0.083,-0.017l0.083,-0.011l0.085,-0.008l0.084,-0.002l12,0l0.084,0.002Zm-6.084,1.498l-6,0l0,0.071l0.002,0.071l0.002,0.071l0.004,0.07l0.004,0.07l0.005,0.07l0.007,0.07l0.007,0.069l0.008,0.07l0.009,0.068l0.01,0.069l0.011,0.069l0.012,0.068l0.013,0.068l0.013,0.067l0.015,0.067l0.015,0.067l0.017,0.067l0.017,0.066l0.018,0.067l0.019,0.065l0.02,0.066l0.02,0.065l0.022,0.065l0.022,0.064l0.023,0.064l0.024,0.064l0.025,0.063l0.026,0.063l0.026,0.063l0.027,0.062l0.029,0.062l0.028,0.061l0.03,0.061l0.03,0.061l0.032,0.06l0.032,0.06l0.032,0.06l0.034,0.059l0.034,0.059l0.035,0.058l0.036,0.058l0.036,0.057l0.038,0.057l0.038,0.056l0.038,0.056l0.04,0.056l0.04,0.055l0.04,0.055l0.042,0.054l0.042,0.054l0.043,0.053l0.044,0.052l0.044,0.053l0.045,0.051l0.045,0.052l0.046,0.05l0.047,0.05l0.048,0.05l0.048,0.049l0.048,0.049l0.05,0.048l0.05,0.047l0.05,0.047l0.052,0.046l0.051,0.046l0.053,0.046l0.053,0.044l0.053,0.044l0.054,0.044l0.055,0.043l0.055,0.042l0.056,0.042l0.057,0.041l0.057,0.04l0.057,0.04l0.058,0.04l0.059,0.038l0.059,0.038l0.059,0.038l0.06,0.036l0.061,0.037l0.061,0.035l0.062,0.035l0.062,0.034l0.062,0.033l0.064,0.033l0.063,0.032l0.064,0.032l0.064,0.03l0.065,0.03l0.066,0.03l0.066,0.028l0.066,0.028l0.066,0.027l0.068,0.027l0.067,0.026l0.068,0.025l0.068,0.024l0.069,0.023l0.069,0.023l0.07,0.022l0.07,0.021l0.07,0.021l0.07,0.019l0.071,0.019l0.072,0.018l0.072,0.018l0.072,0.016l0.072,0.016l0.073,0.015l0.073,0.014l0.073,0.014l0.074,0.012l0.074,0.012l0.074,0.011l0.075,0.01l0.075,0.009l0.075,0.008l0.076,0.008l0.075,0.006l0.076,0.006l0.077,0.005l0.076,0.004l0.077,0.003l0.077,0.002l0.077,0.002l0.078,0l0.078,0l0.077,-0.002l0.077,-0.002l0.077,-0.003l0.076,-0.004l0.077,-0.005l0.076,-0.006l0.075,-0.006l0.076,-0.008l0.075,-0.008l0.075,-0.009l0.075,-0.01l0.074,-0.011l0.074,-0.012l0.074,-0.012l0.073,-0.014l0.073,-0.014l0.073,-0.015l0.072,-0.016l0.072,-0.016l0.072,-0.018l0.072,-0.018l0.071,-0.019l0.07,-0.019l0.07,-0.021l0.07,-0.021l0.07,-0.022l0.069,-0.023l0.069,-0.023l0.068,-0.024l0.068,-0.025l0.067,-0.026l0.068,-0.027l0.066,-0.027l0.066,-0.028l0.066,-0.028l0.066,-0.03l0.065,-0.03l0.064,-0.03l0.064,-0.032l0.063,-0.032l0.064,-0.033l0.062,-0.033l0.062,-0.034l0.062,-0.035l0.061,-0.035l0.061,-0.037l0.06,-0.036l0.059,-0.038l0.059,-0.038l0.059,-0.038l0.058,-0.04l0.057,-0.04l0.057,-0.04l0.057,-0.041l0.056,-0.042l0.055,-0.042l0.055,-0.043l0.054,-0.044l0.053,-0.044l0.053,-0.044l0.053,-0.046l0.051,-0.046l0.052,-0.046l0.05,-0.047l0.05,-0.047l0.05,-0.048l0.048,-0.049l0.048,-0.049l0.048,-0.05l0.047,-0.05l0.046,-0.05l0.045,-0.052l0.045,-0.051l0.044,-0.053l0.044,-0.052l0.043,-0.053l0.042,-0.054l0.042,-0.054l0.04,-0.055l0.04,-0.055l0.04,-0.056l0.038,-0.056l0.038,-0.056l0.038,-0.057l0.036,-0.057l0.036,-0.058l0.035,-0.058l0.034,-0.059l0.034,-0.059l0.032,-0.06l0.032,-0.06l0.032,-0.06l0.03,-0.061l0.03,-0.061l0.028,-0.061l0.029,-0.062l0.027,-0.062l0.026,-0.063l0.026,-0.063l0.025,-0.063l0.024,-0.064l0.023,-0.064l0.022,-0.064l0.022,-0.065l0.02,-0.065l0.02,-0.066l0.019,-0.065l0.018,-0.067l0.017,-0.066l0.017,-0.067l0.015,-0.067l0.015,-0.067l0.013,-0.067l0.013,-0.068l0.012,-0.068l0.011,-0.069l0.01,-0.069l0.009,-0.068l0.008,-0.07l0.007,-0.069l0.007,-0.07l0.005,-0.07l0.004,-0.07l0.004,-0.07l0.002,-0.071l0.002,-0.071l0,-0.071l-6,0Z" style="fill:#fff;"/><path d="M15,22l0,8" style="fill:none;stroke:#fff;stroke-width:1.5px;"/><path d="M11,5.75l0,5" style="fill:none;stroke:#fff;stroke-width:1.5px;"/><path d="M19,5.75l0,5" style="fill:none;stroke:#fff;stroke-width:1.5px;"/><path d="M22.091,10.503l0.09,0.008l0.089,0.014l0.089,0.019l0.087,0.024l0.086,0.029l0.084,0.035l0.081,0.04l0.079,0.044l0.076,0.049l0.073,0.054l0.07,0.058l0.066,0.062l0.062,0.066l0.058,0.07l0.053,0.073l0.05,0.076l0.044,0.079l0.04,0.081l0.035,0.084l0.029,0.086l0.024,0.087l0.019,0.089l0.014,0.089l0.008,0.09l0.003,0.091l0,2l-0.003,0.091l-0.008,0.09l-0.014,0.089l-0.019,0.089l-0.024,0.087l-0.029,0.086l-0.035,0.084l-0.04,0.081l-0.044,0.079l-0.05,0.076l-0.053,0.073l-0.058,0.07l-0.062,0.066l-0.066,0.062l-0.07,0.058l-0.073,0.053l-0.076,0.05l-0.079,0.044l-0.081,0.04l-0.084,0.034l-0.086,0.03l-0.087,0.024l-0.089,0.019l-0.089,0.014l-0.09,0.008l-0.091,0.003l-14,0l-0.091,-0.003l-0.09,-0.008l-0.089,-0.014l-0.089,-0.019l-0.087,-0.024l-0.086,-0.03l-0.084,-0.034l-0.081,-0.04l-0.079,-0.044l-0.076,-0.05l-0.073,-0.053l-0.07,-0.058l-0.066,-0.062l-0.062,-0.066l-0.058,-0.07l-0.053,-0.073l-0.05,-0.076l-0.044,-0.079l-0.04,-0.081l-0.035,-0.084l-0.029,-0.086l-0.024,-0.087l-0.019,-0.089l-0.014,-0.089l-0.008,-0.09l-0.003,-0.091l0,-2l0.003,-0.091l0.008,-0.09l0.014,-0.089l0.019,-0.089l0.024,-0.087l0.029,-0.086l0.035,-0.084l0.04,-0.081l0.044,-0.079l0.05,-0.076l0.053,-0.073l0.058,-0.07l0.062,-0.066l0.066,-0.062l0.07,-0.058l0.073,-0.054l0.076,-0.049l0.079,-0.044l0.081,-0.04l0.084,-0.035l0.086,-0.029l0.087,-0.024l0.089,-0.019l0.089,-0.014l0.09,-0.008l0.091,-0.003l14,0l0.091,0.003Zm-14.091,1.497l0,2l14,0l0,-2l-14,0Z" style="fill:#fff;"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter x="-11.8%" y="-7.1%" width="123.7%" height="119%" filterUnits="objectBoundingBox" id="c"><feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation=".5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0784203589 0" in="shadowBlurOuter1"/></filter><rect id="a" x="0" y="0" width="16" height="16" rx="8"/><path id="d" d="m8 11.12-4.114 2.543 1.147-4.699-3.69-3.127 4.823-.361L8 1l1.834 4.476 4.823.361-3.69 3.127 1.147 4.699z"/></defs><g fill="none" fill-rule="evenodd"><mask id="b" fill="#fff"><use xlink:href="#a"/></mask><use fill="#EAA930" xlink:href="#a"/><path fill-opacity=".243" fill="#FFF400" mask="url(#b)" d="M-4-3H8v21H-4z"/><g mask="url(#b)"><use fill="#000" filter="url(#c)" xlink:href="#d"/><use fill="#FFF" xlink:href="#d"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill="#4fa800" d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 9 7" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M4.5,7l-4.5,-7l9,0l-4.5,7Z" style="fill:#cbcbcb;"/></svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 0.75C3.10078 0.75 0.75 3.10078 0.75 6C0.75 8.89922 3.10078 11.25 6 11.25C8.89922 11.25 11.25 8.89922 11.25 6C11.25 3.10078 8.89922 0.75 6 0.75ZM6 10.3594C3.59297 10.3594 1.64063 8.40703 1.64063 6C1.64063 3.59297 3.59297 1.64063 6 1.64063C8.40703 1.64063 10.3594 3.59297 10.3594 6C10.3594 8.40703 8.40703 10.3594 6 10.3594Z" fill="white"/>
3
+ <path d="M5.43732 3.9375C5.43732 4.08668 5.49658 4.22976 5.60207 4.33525C5.70756 4.44074 5.85063 4.5 5.99982 4.5C6.149 4.5 6.29207 4.44074 6.39756 4.33525C6.50305 4.22976 6.56232 4.08668 6.56232 3.9375C6.56232 3.78832 6.50305 3.64524 6.39756 3.53975C6.29207 3.43426 6.149 3.375 5.99982 3.375C5.85063 3.375 5.70756 3.43426 5.60207 3.53975C5.49658 3.64524 5.43732 3.78832 5.43732 3.9375ZM6.28107 5.25H5.71857C5.667 5.25 5.62482 5.29219 5.62482 5.34375V8.53125C5.62482 8.58281 5.667 8.625 5.71857 8.625H6.28107C6.33263 8.625 6.37482 8.58281 6.37482 8.53125V5.34375C6.37482 5.29219 6.33263 5.25 6.28107 5.25Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,54 @@
1
+ .code-switcher {
2
+ margin-bottom: u-spacing( -1 );
3
+ padding-top: 4px;
4
+ border-radius: 4px;
5
+
6
+ background-color: u-color( 'snippet-background' );
7
+
8
+ pre.highlight[class*=language-] {
9
+ margin: 0;
10
+ }
11
+
12
+ &__toolbar {
13
+ display: flex;
14
+ align-items: flex-start;
15
+ gap: 16px;
16
+
17
+ height: 40px;
18
+ margin: 0px 4px;
19
+ padding: 4px 12px;
20
+ border-radius: 2px;
21
+
22
+ background-color: u-color( 'background-gray' );
23
+ }
24
+
25
+ &__button {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 4px;
29
+
30
+ padding: 2px;
31
+ border: none;
32
+
33
+ background-color: transparent;
34
+
35
+ font-size: u-font-size( 0 );
36
+ font-weight: 500;
37
+
38
+ color: u-color( 'text-invert-gray' );
39
+
40
+ cursor: pointer;
41
+
42
+ transition: 150ms ease color;
43
+
44
+ &:hover {
45
+ color: u-color( 'text-invert' );
46
+ }
47
+
48
+ &--active {
49
+ border-bottom: 2px solid u-color( 'text-invert' );
50
+
51
+ color: u-color( 'text-invert' );
52
+ }
53
+ }
54
+ }
@@ -10,14 +10,17 @@ $u-colors: (
10
10
  'background-hue': #F2F5F7,
11
11
  'background-dark': #f5f5f5,
12
12
  'background-bright': #fff,
13
+ 'background-gray': #474843,
13
14
  'text': #000000,
14
15
  'text-header': #000000,
15
- 'text-invert': #fff,
16
+ 'text-invert': #ffffff,
17
+ 'text-invert-gray': #ffffffb2,
16
18
  'text-gray': #555555,
17
19
  'separator': #E9E9E9,
18
20
  'toggler': #BDBDBD,
19
21
  'highlight': #FFEB3B,
20
22
  'selected': #4FA800,
23
+ 'snippet-background': #272822,
21
24
 
22
25
  // Badges
23
26
  'badge-gray': #808080,
@@ -10,6 +10,7 @@ $u-font-face-mono: Monaco, Menlo, Consolas, 'Roboto Mono', 'Courier New', 'Ubunt
10
10
  $u-font-sizes: (
11
11
  -2: 0.7,
12
12
  -1: 0.75,
13
+ -0.5: 0.8,
13
14
  0: 1,
14
15
  1: 1.166,
15
16
  2: 1.333,
@@ -111,3 +111,6 @@ a {
111
111
 
112
112
  // The warning banner feature (displayed in the header).
113
113
  @import "warning-banner";
114
+
115
+ // The code switcher component
116
+ @import "code-switcher";
@@ -0,0 +1,135 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
6
+ /* globals umberto */
7
+
8
+ const type = {
9
+ selfHosted: 'selfhosted',
10
+ cloud: 'cloud'
11
+ };
12
+ const storageSwitcherKey = 'code-switcher-type';
13
+ const buttonClass = 'code-switcher__button';
14
+ const buttonActiveClass = 'code-switcher__button--active';
15
+ const codeSwitcherClass = 'code-switcher';
16
+ const codeSwitcherToolbarClass = 'code-switcher__toolbar';
17
+
18
+ function switchSnippetContent( originalSnippetContent, newType ) {
19
+ let newSnippetContent;
20
+
21
+ if ( newType === type.cloud ) {
22
+ newSnippetContent = originalSnippetContent
23
+ .replace( /import {/g, 'const {' )
24
+ .replace( /} from/g, '} =' )
25
+ .replace( /'ckeditor5';/g, 'CKEDITOR;' )
26
+ .replace( /'ckeditor5-premium-features'/g, 'CKEDITOR_PREMIUM_FEATURES' );
27
+ } else if ( newType === type.selfHosted ) {
28
+ newSnippetContent = originalSnippetContent
29
+ .replace( /const {/g, 'import {' )
30
+ .replace( /} =/g, '} from' )
31
+ .replace( /CKEDITOR;/g, '\'ckeditor5\';' )
32
+ .replace( /CKEDITOR_PREMIUM_FEATURES/g, '\'ckeditor5-premium-features\'' );
33
+ }
34
+
35
+ return newSnippetContent;
36
+ }
37
+
38
+ function switchSnippet( switcher, newType ) {
39
+ const codeElement = switcher.querySelector( 'pre code' );
40
+
41
+ codeElement.textContent = switchSnippetContent( codeElement.textContent, newType );
42
+ window.Prism.highlightElement( codeElement );
43
+
44
+ const switcherClasses = switcher.classList;
45
+
46
+ switcher.classList.replace( switcherClasses[ switcherClasses.length - 1 ], newType );
47
+ }
48
+
49
+ function saveSnippetType( type ) {
50
+ if ( type === getSnippetType() ) {
51
+ return;
52
+ }
53
+
54
+ localStorage.setItem( storageSwitcherKey, type );
55
+ window.dispatchEvent( new Event( 'storage' ) );
56
+ }
57
+
58
+ function getSnippetType() {
59
+ return localStorage.getItem( storageSwitcherKey );
60
+ }
61
+
62
+ function createButton( label, isActive = false ) {
63
+ const button = document.createElement( 'button' );
64
+
65
+ button.textContent = label;
66
+ button.classList.add( buttonClass );
67
+
68
+ if ( isActive ) {
69
+ button.classList.add( buttonActiveClass );
70
+ }
71
+
72
+ return button;
73
+ }
74
+
75
+ export function createCodeSwitcherButtons() {
76
+ const switchers = document.querySelectorAll( `.${ codeSwitcherClass }` );
77
+
78
+ if ( switchers.lenght === 0 ) {
79
+ return;
80
+ }
81
+
82
+ const savedType = getSnippetType();
83
+
84
+ switchers.forEach( switcher => {
85
+ if ( savedType ) {
86
+ switchSnippet( switcher, savedType );
87
+ }
88
+
89
+ const activeType = switcher.classList[ switcher.classList.length - 1 ];
90
+
91
+ const infoCircle = document.createElement( 'img' );
92
+
93
+ infoCircle.setAttribute( 'src', `/assets/${ umberto.version }/img/info-circle.svg` );
94
+ infoCircle.classList.add( 'code-switcher__info' );
95
+
96
+ const selfHostedButton = createButton( 'Self-hosted (npm)', activeType === type.selfHosted );
97
+
98
+ selfHostedButton.setAttribute( 'title', 'Self-hosted shows imports for installations using npm or ZIP setups.' );
99
+ selfHostedButton.append( infoCircle.cloneNode( true ) );
100
+
101
+ const cloudButton = createButton( 'Cloud (CDN)', activeType === type.cloud );
102
+
103
+ cloudButton.setAttribute( 'title', 'Cloud shows imports for installations using CDN setups.' );
104
+ cloudButton.append( infoCircle.cloneNode( true ) );
105
+
106
+ const switcherToolbar = switcher.querySelector( `.${ codeSwitcherToolbarClass }` );
107
+
108
+ switcherToolbar.append( selfHostedButton );
109
+ switcherToolbar.append( cloudButton );
110
+ switcher.prepend( switcherToolbar );
111
+
112
+ window.addEventListener( 'storage', () => {
113
+ const savedType = getSnippetType();
114
+
115
+ if ( savedType ) {
116
+ switchSnippet( switcher, savedType );
117
+
118
+ if ( savedType === type.selfHosted ) {
119
+ selfHostedButton.classList.add( buttonActiveClass );
120
+ cloudButton.classList.remove( buttonActiveClass );
121
+ } else if ( savedType === type.cloud ) {
122
+ cloudButton.classList.add( buttonActiveClass );
123
+ selfHostedButton.classList.remove( buttonActiveClass );
124
+ }
125
+ }
126
+ } );
127
+
128
+ selfHostedButton.addEventListener( 'click', () => {
129
+ saveSnippetType( type.selfHosted );
130
+ } );
131
+ cloudButton.addEventListener( 'click', () => {
132
+ saveSnippetType( type.cloud );
133
+ } );
134
+ } );
135
+ }
@@ -27,6 +27,7 @@ import imageModal from './_imageModal';
27
27
  import showWarningBanner from './_warningbanner';
28
28
  import { enableBadgeTooltips, createTooltip } from './_tooltips';
29
29
  import attachPermalinkListener from './_attachpermalinklistener';
30
+ import { createCodeSwitcherButtons } from './_codeswitcherbuttons';
30
31
 
31
32
  // Changing documentation theme. To enable, type in the console: `localStorage.setItem( 'theme', 'theme-dark' )`.
32
33
  if ( localStorage.getItem( 'theme' ) === 'theme-dark' ) {
@@ -41,6 +42,9 @@ window.umberto = {
41
42
  createTooltip
42
43
  };
43
44
 
45
+ // Ask the SOS team before touching this 😛
46
+ window.open.closed = 1;
47
+
44
48
  $( document ).ready( () => {
45
49
  pageNavigation(); // pageNavigation - needs to be run before filtering initialization.
46
50
  copyMobileApiNavigation(); // copy API Tree into mobile navigation
@@ -62,4 +66,5 @@ $( document ).ready( () => {
62
66
  // `sampleCode()` must be called after the `setupPrism()` function.
63
67
  sampleCode(); // control accordion of sample code and buttons(copy/download)
64
68
  enableBadgeTooltips(); // attaches tippy.js tooltip for all elements with data-badge-tooltip
69
+ createCodeSwitcherButtons();
65
70
  } );