diff --git a/tests/e2e/__snapshots__/generate-map.spec.ts.snap b/tests/e2e/__snapshots__/generate-map.spec.ts.snap new file mode 100644 index 000000000..4e5d66371 --- /dev/null +++ b/tests/e2e/__snapshots__/generate-map.spec.ts.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Generate map for project with external links in toc 1`] = ` +"{ + "files": [ + "ru/folder1/folder2/a1", + "ru/folder1/a1", + "ru/", + "ru/settings", + "ru/plugins/", + "ru/project/" + ] +}" +`; + +exports[`Generate map for project with multiple language 1`] = ` +"{ + "files": [ + "en/", + "en/settings", + "en/plugins/", + "en/plugins/import", + "en/project/", + "en/project/config", + "ru/", + "ru/settings", + "ru/plugins/", + "ru/plugins/import", + "ru/project/", + "ru/project/config" + ] +}" +`; + +exports[`Generate map for project with single language and toc include - only md2html 1`] = ` +"{ + "files": [ + "ru/folder1/folder2/a1", + "ru/folder1/a1", + "ru/", + "ru/settings", + "ru/plugins/", + "ru/plugins/import", + "ru/project/", + "ru/project/config" + ] +}" +`; + +exports[`Generate map for project with single language and toc include 1`] = ` +"{ + "files": [ + "ru/folder1/folder2/a1", + "ru/folder1/a1", + "ru/", + "ru/settings", + "ru/plugins/", + "ru/plugins/import", + "ru/project/", + "ru/project/config" + ] +}" +`; diff --git a/tests/e2e/__snapshots__/include-toc.test.ts.snap b/tests/e2e/__snapshots__/include-toc.test.ts.snap new file mode 100644 index 000000000..f4a6da382 --- /dev/null +++ b/tests/e2e/__snapshots__/include-toc.test.ts.snap @@ -0,0 +1,288 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Include toc Nested toc inclusions with mixed including modes 1`] = `"["product1/_includes/inc.md","product1/article1.md","product1/toc.yaml","product2/overlay1/_includes/inc.md","product2/overlay1/article1.md","product2/overlay2/_includes/inc.md","product2/overlay2/article1.md","product2/overlay3/_includes/inc.md","product2/overlay3/article1.md","product2/p2.md","product2/toc.yaml"]"`; + +exports[`Include toc Nested toc inclusions with mixed including modes 2`] = ` +"--- +sourcePath: product1/core/_includes/inc.md +--- +This is the core include." +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 3`] = ` +"--- +sourcePath: product1/core/article1.md +--- +This is the core content of Article 1. + +{% include [x](_includes/inc.md) %} +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 4`] = ` +"title: Product 1 title +items: + - name: Article1 + href: article1.md +base: product1 +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 5`] = ` +"--- +sourcePath: product2/core/_includes/inc.md +--- +This is the core include. +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 6`] = ` +"--- +sourcePath: product2/overlay1/product/article1.md +--- +This is the overlay content of Article 1 for product 2. + +{% include [x](_includes/inc.md) %} +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 7`] = ` +"--- +sourcePath: product2/core/_includes/inc.md +--- +This is the core include. +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 8`] = ` +"--- +sourcePath: product2/overlay2/product/article1.md +--- +This is the overlay number #2 of Article 1 content for product 2. + +{% include [x](_includes/inc.md) %} +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 9`] = ` +"--- +sourcePath: product2/core/_includes/inc.md +--- +This is the core include. +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 10`] = ` +"--- +sourcePath: product2/core/article1.md +--- +This is the core content of Article 1. + +{% include [x](_includes/inc.md) %} +" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 11`] = ` +"This is the product 2 specific article. + +Check here link to [Article1 overlay 1](overlay1/article1.md) +Check here link to [Article1 overlay 2](overlay2/article1.md)" +`; + +exports[`Include toc Nested toc inclusions with mixed including modes 12`] = ` +"title: Product 2 title +items: + - name: P2 Article + href: p2.md + - name: Overlay1 + items: + - name: Article1 + href: overlay1/article1.md + - name: Overlay 2 + items: + - name: Article1 + href: overlay2/article1.md + - name: Overlay 3 + items: + - name: Article1 + href: overlay3/article1.md +base: product2 +" +`; + +exports[`Include toc Toc is included in link mode 1`] = `"["a1.md","folder1/a1.md","folder1/folder2/a1.md","toc.yaml"]"`; + +exports[`Include toc Toc is included in link mode 2`] = ` +"This is the /a1.md file content. +" +`; + +exports[`Include toc Toc is included in link mode 3`] = ` +"This is the /folder1/a1.md file content. +" +`; + +exports[`Include toc Toc is included in link mode 4`] = ` +"This is the /folder1/folder1/a1.md file content. +" +`; + +exports[`Include toc Toc is included in link mode 5`] = ` +"items: + - name: A1 + href: a1.md + - name: folder1 + items: + - name: A1 + href: folder1/a1.md + - name: folder1 + items: + - name: A1 + href: folder1/folder2/a1.md +base: . +" +`; + +exports[`Include toc Toc is included inline, not as a new section 1`] = `"[".yfm","file1.md","fileA.md","fileB.md","fileC.md","fileX.md","folder/fileA.md","folder/fileB.md","folder/fileC.md","folder/folder/fileC.md","toc.yaml"]"`; + +exports[`Include toc Toc is included inline, not as a new section 2`] = ` +"applyPresets: true +" +`; + +exports[`Include toc Toc is included inline, not as a new section 3`] = ` +"# File 1 +" +`; + +exports[`Include toc Toc is included inline, not as a new section 4`] = ` +"--- +title: File A +description: YFM description +sourcePath: folder/fileA.md +--- +# File A + +--- + +Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + +--- +" +`; + +exports[`Include toc Toc is included inline, not as a new section 5`] = ` +"--- +sourcePath: folder/fileB.md +--- +# File B + +Lorem Ipsum is simply dummy text of the printing and typesetting industry. + +--- + +Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + +--- +" +`; + +exports[`Include toc Toc is included inline, not as a new section 6`] = ` +"--- +sourcePath: folder/folder/fileC.md +--- +# File C +" +`; + +exports[`Include toc Toc is included inline, not as a new section 7`] = ` +"# File X +" +`; + +exports[`Include toc Toc is included inline, not as a new section 8`] = ` +"--- +title: File A +description: YFM description +--- +# File A + +--- + +Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + +--- +" +`; + +exports[`Include toc Toc is included inline, not as a new section 9`] = ` +"# File B + +Lorem Ipsum is simply dummy text of the printing and typesetting industry. + +--- + +Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + +--- +" +`; + +exports[`Include toc Toc is included inline, not as a new section 10`] = ` +"--- +sourcePath: folder/folder/fileC.md +--- +# File C +" +`; + +exports[`Include toc Toc is included inline, not as a new section 11`] = ` +"# File C +" +`; + +exports[`Include toc Toc is included inline, not as a new section 12`] = ` +"items: + - name: Name1 + href: file1.md + - name: NameA + href: fileA.md + - name: NameB + href: fileB.md + - name: NameC + href: fileC.md + - name: NameX + href: fileX.md +base: . +" +`; + +exports[`Include toc Toc with expressions 1`] = `"["a1.md","index.yaml","toc.yaml"]"`; + +exports[`Include toc Toc with expressions 2`] = ` +"This is the /a1.md file content. +" +`; + +exports[`Include toc Toc with expressions 3`] = ` +"title: Title A +description: + - Desc A +meta: + title: Meta A +links: + - title: A1 + description: A1 desc + href: a1 +" +`; + +exports[`Include toc Toc with expressions 4`] = ` +"title: Title A +href: index.yaml +items: + - name: A1 + href: a1.md +base: . +" +`; diff --git a/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap b/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap new file mode 100644 index 000000000..a5e0d3f2b --- /dev/null +++ b/tests/e2e/__snapshots__/load-custom-resources.spec.ts.snap @@ -0,0 +1,487 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Allow load custom resources md2html single page with custom resources 1`] = `"["_assets/script/test1.js","_assets/style/test.css","_bundle/app.css","_bundle/app.js","_bundle/react.js","_bundle/vendor.css","_bundle/vendor.js","index.html","page.html","project/config.html","single-page.html","single-page.json"]"`; + +exports[`Allow load custom resources md2html single page with custom resources 2`] = ` + + + + + + + + + Documentation | Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html single page with custom resources 3`] = ` + + + + + + + + Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html single page with custom resources 4`] = ` + + + + + + + Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html single page with custom resources 5`] = ` + + + + + + + Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html single page with custom resources 6`] = `"{"data":{"leading":false,"html":"

Lorem

/n/n/n
/n/n

Lorem

/n","headings":[],"meta":{"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"toc":{"title":"Documentation","href":"index.yaml","items":[{"name":"Documentation","href":"#_page","id":"Documentation-RANDOM"},{"name":"Config","href":"#_project_config","id":"Config-RANDOM"}],"base":".","singlePage":true}},"router":{"pathname":"single-page.html"},"lang":"ru"}"`; + +exports[`Allow load custom resources md2html with custom resources 1`] = `"["_assets/script/test1.js","_assets/style/test.css","_bundle/app.css","_bundle/app.js","_bundle/react.js","_bundle/vendor.css","_bundle/vendor.js","index.html","page.html","project/config.html"]"`; + +exports[`Allow load custom resources md2html with custom resources 2`] = ` + + + + + + + + + Documentation | Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html with custom resources 3`] = ` + + + + + + + + Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2html with custom resources 4`] = ` + + + + + + + Documentation + + + + + + + + +
+
+ + + + + + +`; + +exports[`Allow load custom resources md2md with custom resources 1`] = `"[".yfm","_assets/script/test1.js","_assets/style/test.css","index.yaml","page.md","project/config.md","toc.yaml"]"`; + +exports[`Allow load custom resources md2md with custom resources 2`] = ` +"resources: + style: + - _assets/style/test.css + script: + - _assets/script/test1.js +" +`; + +exports[`Allow load custom resources md2md with custom resources 3`] = ` +"title: Documentation +description: '' +meta: + title: Documentation + noIndex: true + style: + - _assets/style/test.css + script: + - _assets/script/test1.js +links: + - title: Getting started with Documentation + description: This guide will show you the basics of working with Documentation + href: page.md +" +`; + +exports[`Allow load custom resources md2md with custom resources 4`] = ` +"--- +meta: some meta +style: + - _assets/style/test.css +script: + - _assets/script/test1.js + +--- + +Lorem" +`; + +exports[`Allow load custom resources md2md with custom resources 5`] = ` +"--- +style: + - _assets/style/test.css +script: + - _assets/script/test1.js + +--- +Lorem" +`; + +exports[`Allow load custom resources md2md with custom resources 6`] = ` +"title: Documentation +href: index.yaml +items: + - name: Documentation + href: page.md + - name: Config + href: project/config.md +base: . +" +`; diff --git a/tests/e2e/generate-map.spec.ts b/tests/e2e/generate-map.spec.ts index 3029d49f0..a665f4f7d 100644 --- a/tests/e2e/generate-map.spec.ts +++ b/tests/e2e/generate-map.spec.ts @@ -1,17 +1,15 @@ import {getTestPaths, runYfmDocs, getFileContent} from '../utils'; +import { join } from 'path'; const geretateMapTestTemplate = (testTitle: string, testRootPath: string, md2md = true, md2html = true) => { test(testTitle, () => { - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths(testRootPath); runYfmDocs(inputPath, outputPath, {md2md, md2html, args: '--add-map-file'}); - const outputContent = getFileContent(outputPath + '/files.json'); - const expectedContent = getFileContent(expectedOutputPath + '/files.json'); + const content = getFileContent(join(outputPath, 'files.json')); - const prepareFileJsonToCompare = (file: string) => JSON.stringify(JSON.parse(file).files.sort()) - - expect(prepareFileJsonToCompare(outputContent)).toEqual(prepareFileJsonToCompare(expectedContent)); + expect(content).toMatchSnapshot(); }); } diff --git a/tests/e2e/include-toc.test.ts b/tests/e2e/include-toc.test.ts index f669a8ed7..afa96d2cf 100644 --- a/tests/e2e/include-toc.test.ts +++ b/tests/e2e/include-toc.test.ts @@ -2,58 +2,27 @@ import {compareDirectories, runYfmDocs, getTestPaths} from '../utils'; describe('Include toc', () => { test('Toc is included in link mode', () => { - const testRootPath = 'mocks/include-toc/test1'; - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths('mocks/include-toc/test1'); runYfmDocs(inputPath, outputPath); - - const compareResult = compareDirectories(outputPath, expectedOutputPath); - - if (typeof compareResult === 'boolean') { - expect(true).toEqual(compareResult); - } else { - const {expectedContent, outputContent} = compareResult; - - expect(expectedContent).toEqual(outputContent); - } + compareDirectories(outputPath); }); test('Toc is included inline, not as a new section', () => { - const testRootPath = 'mocks/include-toc/test2'; - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths('mocks/include-toc/test2'); runYfmDocs(inputPath, outputPath); - - const compareResult = compareDirectories(outputPath, expectedOutputPath); - - if (typeof compareResult === 'boolean') { - expect(true).toEqual(compareResult); - } else { - const {expectedContent, outputContent} = compareResult; - - expect(expectedContent).toEqual(outputContent); - } + compareDirectories(outputPath); }); test('Nested toc inclusions with mixed including modes', () => { - const testRootPath = 'mocks/include-toc/test3'; - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths('mocks/include-toc/test3'); runYfmDocs(inputPath, outputPath); - - const compareResult = compareDirectories(outputPath, expectedOutputPath); - - if (typeof compareResult === 'boolean') { - expect(true).toEqual(compareResult); - } else { - const {expectedContent, outputContent} = compareResult; - - expect(expectedContent).toEqual(outputContent); - } + compareDirectories(outputPath); }); test('Toc with expressions', () => { - const testRootPath = 'mocks/include-toc/test4'; - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths('mocks/include-toc/test4'); const vars = { type: 'a', @@ -64,15 +33,6 @@ describe('Include toc', () => { runYfmDocs(inputPath, outputPath, { args: `--vars="${JSON.stringify(vars).replace(/(")/g, '\\$1')}"`, }); - - const compareResult = compareDirectories(outputPath, expectedOutputPath); - - if (typeof compareResult === 'boolean') { - expect(true).toEqual(compareResult); - } else { - const {expectedContent, outputContent} = compareResult; - - expect(expectedContent).toEqual(outputContent); - } + compareDirectories(outputPath); }); }); diff --git a/tests/e2e/load-custom-resources.spec.ts b/tests/e2e/load-custom-resources.spec.ts index d4dfd34f3..859bdd906 100644 --- a/tests/e2e/load-custom-resources.spec.ts +++ b/tests/e2e/load-custom-resources.spec.ts @@ -2,29 +2,9 @@ import {getTestPaths, runYfmDocs, compareDirectories} from '../utils'; const geretateMapTestTemplate = (testTitle: string, testRootPath: string, {md2md = true, md2html = true, args = '--allow-custom-resources'}) => { test(testTitle, () => { - const {inputPath, outputPath, expectedOutputPath} = getTestPaths(testRootPath); + const {inputPath, outputPath} = getTestPaths(testRootPath); runYfmDocs(inputPath, outputPath, {md2md, md2html, args}); - - const unifyData = (text: string) => text - // Remove unique id's - .replace(/"id":"Documentation.+?"|Config.+?"/gm, '') - // Unify windows & mac data - .replace(/\\/gm, '/') - .replace(/\/r\/n|\/r|\/n/gm, '') - .replace(/\r\n|\r|\n/gm, '') - .replace(/\/|\\/gm, '') - .replace(/\s+/gm, ' ') - .trim() - - const compareResult = compareDirectories(expectedOutputPath, outputPath, unifyData) - - if (typeof compareResult === 'boolean') { - expect(true).toEqual(compareResult); - } else { - const {expectedContent, outputContent} = compareResult; - - expect(expectedContent).toEqual(outputContent); - } + compareDirectories(outputPath); }); } diff --git a/tests/jest.config.js b/tests/jest.config.js index fcc770c6f..d82e66804 100644 --- a/tests/jest.config.js +++ b/tests/jest.config.js @@ -12,4 +12,5 @@ module.exports = { coverageProvider: 'v8', coverageDirectory: '/coverage', moduleDirectories: ['node_modules', path.join(__dirname, '../src'), path.join(__dirname, '../tests')], + snapshotSerializers: ['jest-serializer-html'] }; diff --git a/tests/mocks/generate-map/test1/expected-output/files.json b/tests/mocks/generate-map/test1/expected-output/files.json deleted file mode 100644 index 3e5b33e4d..000000000 --- a/tests/mocks/generate-map/test1/expected-output/files.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "files": [ - "ru/folder1/folder2/a1", - "ru/folder1/a1", - "ru/", - "ru/settings", - "ru/plugins/", - "ru/plugins/import", - "ru/project/", - "ru/project/config" - ] -} diff --git a/tests/mocks/generate-map/test2/expected-output/files.json b/tests/mocks/generate-map/test2/expected-output/files.json deleted file mode 100644 index 0e399704e..000000000 --- a/tests/mocks/generate-map/test2/expected-output/files.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "files": [ - "en/", - "en/settings", - "en/plugins/", - "en/plugins/import", - "en/project/", - "en/project/config", - "ru/", - "ru/settings", - "ru/plugins/", - "ru/plugins/import", - "ru/project/", - "ru/project/config" - ] -} diff --git a/tests/mocks/generate-map/test3/expected-output/files.json b/tests/mocks/generate-map/test3/expected-output/files.json deleted file mode 100644 index be099793b..000000000 --- a/tests/mocks/generate-map/test3/expected-output/files.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "files": [ - "ru/folder1/folder2/a1", - "ru/folder1/a1", - "ru/", - "ru/settings", - "ru/plugins/", - "ru/project/" - ] -} diff --git a/tests/mocks/include-toc/test1/expected-output/_single_page/index.md b/tests/mocks/include-toc/test1/expected-output/_single_page/index.md deleted file mode 100644 index 7ac256f55..000000000 --- a/tests/mocks/include-toc/test1/expected-output/_single_page/index.md +++ /dev/null @@ -1,26 +0,0 @@ -This is the /folder1/folder1/a1.md file content. - - -
- -This is the /folder1/a1.md file content. - - -
- -This is the /folder1/folder1/a1.md file content. - - -
- -This is the /a1.md file content. - - -
- -This is the /folder1/a1.md file content. - - -
- -This is the /folder1/folder1/a1.md file content. diff --git a/tests/mocks/include-toc/test1/expected-output/_single_page/toc.yaml b/tests/mocks/include-toc/test1/expected-output/_single_page/toc.yaml deleted file mode 100644 index 6c6129472..000000000 --- a/tests/mocks/include-toc/test1/expected-output/_single_page/toc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -items: - - name: A1 - href: '#_a1' - - name: folder1 - items: - - name: A1 - href: '#_folder1_a1' - - name: folder1 - items: - - name: A1 - href: '#_folder1_folder2_a1' -base: . -href: index.md -singlePage: true diff --git a/tests/mocks/include-toc/test1/expected-output/a1.md b/tests/mocks/include-toc/test1/expected-output/a1.md deleted file mode 100644 index ec2a6cff6..000000000 --- a/tests/mocks/include-toc/test1/expected-output/a1.md +++ /dev/null @@ -1 +0,0 @@ -This is the /a1.md file content. diff --git a/tests/mocks/include-toc/test1/expected-output/folder1/a1.md b/tests/mocks/include-toc/test1/expected-output/folder1/a1.md deleted file mode 100644 index cf78e4935..000000000 --- a/tests/mocks/include-toc/test1/expected-output/folder1/a1.md +++ /dev/null @@ -1 +0,0 @@ -This is the /folder1/a1.md file content. diff --git a/tests/mocks/include-toc/test1/expected-output/folder1/folder2/a1.md b/tests/mocks/include-toc/test1/expected-output/folder1/folder2/a1.md deleted file mode 100644 index 10b8e6054..000000000 --- a/tests/mocks/include-toc/test1/expected-output/folder1/folder2/a1.md +++ /dev/null @@ -1 +0,0 @@ -This is the /folder1/folder1/a1.md file content. diff --git a/tests/mocks/include-toc/test1/expected-output/toc.yaml b/tests/mocks/include-toc/test1/expected-output/toc.yaml deleted file mode 100644 index c164496d0..000000000 --- a/tests/mocks/include-toc/test1/expected-output/toc.yaml +++ /dev/null @@ -1,12 +0,0 @@ -items: - - name: A1 - href: a1.md - - name: folder1 - items: - - name: A1 - href: folder1/a1.md - - name: folder1 - items: - - name: A1 - href: folder1/folder2/a1.md -base: . diff --git a/tests/mocks/include-toc/test2/expected-output/.yfm b/tests/mocks/include-toc/test2/expected-output/.yfm deleted file mode 100644 index 754937b00..000000000 --- a/tests/mocks/include-toc/test2/expected-output/.yfm +++ /dev/null @@ -1 +0,0 @@ -applyPresets: true diff --git a/tests/mocks/include-toc/test2/expected-output/_single_page/index.md b/tests/mocks/include-toc/test2/expected-output/_single_page/index.md deleted file mode 100644 index fa7b59412..000000000 --- a/tests/mocks/include-toc/test2/expected-output/_single_page/index.md +++ /dev/null @@ -1,50 +0,0 @@ -## File C {data-original-article=/folder/folder/fileC} {#_folder_folder_fileC_file-c} {#_folder_folder_fileC} - - -
- -## File B {data-original-article=/folder/fileB} {#_folder_fileB_file-b} {#_folder_fileB} - -Lorem Ipsum is simply dummy text of the printing and typesetting industry. - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- - - -
- - -## File C {data-original-article=/folder/fileC} {#_folder_fileC_file-c} {#_folder_fileC} - - -
- -## File 1 {data-original-article=/file1} {#_file1_file-1} {#_file1} - - -
- - -## File B {data-original-article=/fileB} {#_fileB_file-b} {#_fileB} - -Lorem Ipsum is simply dummy text of the printing and typesetting industry. - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- - - -
- - -## File C {data-original-article=/fileC} {#_fileC_file-c} {#_fileC} - - -
- -## File X {data-original-article=/fileX} {#_fileX_file-x} {#_fileX} diff --git a/tests/mocks/include-toc/test2/expected-output/_single_page/toc.yaml b/tests/mocks/include-toc/test2/expected-output/_single_page/toc.yaml deleted file mode 100644 index 070521c9b..000000000 --- a/tests/mocks/include-toc/test2/expected-output/_single_page/toc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -items: - - name: Name1 - href: '#_file1' - - name: NameA - href: '#_fileA' - - name: NameB - href: '#_fileB' - - name: NameC - href: '#_fileC' - - name: NameX - href: '#_fileX' -base: . -href: index.md -singlePage: true diff --git a/tests/mocks/include-toc/test2/expected-output/file1.md b/tests/mocks/include-toc/test2/expected-output/file1.md deleted file mode 100644 index a7c58a360..000000000 --- a/tests/mocks/include-toc/test2/expected-output/file1.md +++ /dev/null @@ -1 +0,0 @@ -# File 1 diff --git a/tests/mocks/include-toc/test2/expected-output/fileA.md b/tests/mocks/include-toc/test2/expected-output/fileA.md deleted file mode 100644 index 63cc0384e..000000000 --- a/tests/mocks/include-toc/test2/expected-output/fileA.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: File A -description: YFM description -sourcePath: folder/fileA.md ---- -# File A - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- diff --git a/tests/mocks/include-toc/test2/expected-output/fileB.md b/tests/mocks/include-toc/test2/expected-output/fileB.md deleted file mode 100644 index 9b3d199ff..000000000 --- a/tests/mocks/include-toc/test2/expected-output/fileB.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -sourcePath: folder/fileB.md ---- -# File B - -Lorem Ipsum is simply dummy text of the printing and typesetting industry. - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- diff --git a/tests/mocks/include-toc/test2/expected-output/fileC.md b/tests/mocks/include-toc/test2/expected-output/fileC.md deleted file mode 100644 index 779c1b481..000000000 --- a/tests/mocks/include-toc/test2/expected-output/fileC.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: folder/folder/fileC.md ---- -# File C diff --git a/tests/mocks/include-toc/test2/expected-output/fileX.md b/tests/mocks/include-toc/test2/expected-output/fileX.md deleted file mode 100644 index 2da6cbb7f..000000000 --- a/tests/mocks/include-toc/test2/expected-output/fileX.md +++ /dev/null @@ -1 +0,0 @@ -# File X diff --git a/tests/mocks/include-toc/test2/expected-output/folder/fileA.md b/tests/mocks/include-toc/test2/expected-output/folder/fileA.md deleted file mode 100644 index 4c39b1855..000000000 --- a/tests/mocks/include-toc/test2/expected-output/folder/fileA.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: File A -description: YFM description ---- -# File A - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- diff --git a/tests/mocks/include-toc/test2/expected-output/folder/fileB.md b/tests/mocks/include-toc/test2/expected-output/folder/fileB.md deleted file mode 100644 index f366a828f..000000000 --- a/tests/mocks/include-toc/test2/expected-output/folder/fileB.md +++ /dev/null @@ -1,9 +0,0 @@ -# File B - -Lorem Ipsum is simply dummy text of the printing and typesetting industry. - ---- - -Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. - ---- diff --git a/tests/mocks/include-toc/test2/expected-output/folder/fileC.md b/tests/mocks/include-toc/test2/expected-output/folder/fileC.md deleted file mode 100644 index 779c1b481..000000000 --- a/tests/mocks/include-toc/test2/expected-output/folder/fileC.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: folder/folder/fileC.md ---- -# File C diff --git a/tests/mocks/include-toc/test2/expected-output/folder/folder/fileC.md b/tests/mocks/include-toc/test2/expected-output/folder/folder/fileC.md deleted file mode 100644 index f7255f27a..000000000 --- a/tests/mocks/include-toc/test2/expected-output/folder/folder/fileC.md +++ /dev/null @@ -1 +0,0 @@ -# File C diff --git a/tests/mocks/include-toc/test2/expected-output/toc.yaml b/tests/mocks/include-toc/test2/expected-output/toc.yaml deleted file mode 100644 index 19a4b8c8d..000000000 --- a/tests/mocks/include-toc/test2/expected-output/toc.yaml +++ /dev/null @@ -1,12 +0,0 @@ -items: - - name: Name1 - href: file1.md - - name: NameA - href: fileA.md - - name: NameB - href: fileB.md - - name: NameC - href: fileC.md - - name: NameX - href: fileX.md -base: . diff --git a/tests/mocks/include-toc/test3/expected-output/product1/_includes/inc.md b/tests/mocks/include-toc/test3/expected-output/product1/_includes/inc.md deleted file mode 100644 index fb6dd7290..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product1/_includes/inc.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: product1/core/_includes/inc.md ---- -This is the core include. \ No newline at end of file diff --git a/tests/mocks/include-toc/test3/expected-output/product1/_single_page/index.md b/tests/mocks/include-toc/test3/expected-output/product1/_single_page/index.md deleted file mode 100644 index f5518ccbc..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product1/_single_page/index.md +++ /dev/null @@ -1,4 +0,0 @@ - -This is the core content of Article 1. - -{% include [x](../_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product1/_single_page/toc.yaml b/tests/mocks/include-toc/test3/expected-output/product1/_single_page/toc.yaml deleted file mode 100644 index 210327cdd..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product1/_single_page/toc.yaml +++ /dev/null @@ -1,7 +0,0 @@ -title: Product 1 title -items: - - name: Article1 - href: '#_product1_article1' -base: product1 -href: index.md -singlePage: true diff --git a/tests/mocks/include-toc/test3/expected-output/product1/article1.md b/tests/mocks/include-toc/test3/expected-output/product1/article1.md deleted file mode 100644 index 44f249ae8..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product1/article1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sourcePath: product1/core/article1.md ---- -This is the core content of Article 1. - -{% include [x](_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product1/toc.yaml b/tests/mocks/include-toc/test3/expected-output/product1/toc.yaml deleted file mode 100644 index 885da2663..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product1/toc.yaml +++ /dev/null @@ -1,5 +0,0 @@ -title: Product 1 title -items: - - name: Article1 - href: article1.md -base: product1 diff --git a/tests/mocks/include-toc/test3/expected-output/product2/_single_page/index.md b/tests/mocks/include-toc/test3/expected-output/product2/_single_page/index.md deleted file mode 100644 index 6f4b5b783..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/_single_page/index.md +++ /dev/null @@ -1,51 +0,0 @@ - -This is the overlay content of Article 1 for product 2. - -{% include [x](../overlay1/_includes/inc.md) %} - - -
- - -This is the overlay number #2 of Article 1 content for product 2. - -{% include [x](../overlay2/_includes/inc.md) %} - - -
- - -This is the core content of Article 1. - -{% include [x](../overlay3/_includes/inc.md) %} - - -
- -This is the product 2 specific article. - -Check here link to [Article1 overlay 1](#_product2_overlay1_article1) -Check here link to [Article1 overlay 2](#_product2_overlay2_article1) - -
- - -This is the overlay content of Article 1 for product 2. - -{% include [x](../overlay1/_includes/inc.md) %} - - -
- - -This is the overlay number #2 of Article 1 content for product 2. - -{% include [x](../overlay2/_includes/inc.md) %} - - -
- - -This is the core content of Article 1. - -{% include [x](../overlay3/_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product2/_single_page/toc.yaml b/tests/mocks/include-toc/test3/expected-output/product2/_single_page/toc.yaml deleted file mode 100644 index 3d65a9f75..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/_single_page/toc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -title: Product 2 title -items: - - name: P2 Article - href: '#_product2_p2' - - name: Overlay1 - items: - - name: Article1 - href: '#_product2_overlay1_article1' - - name: Overlay 2 - items: - - name: Article1 - href: '#_product2_overlay2_article1' - - name: Overlay 3 - items: - - name: Article1 - href: '#_product2_overlay3_article1' -base: product2 -href: index.md -singlePage: true diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay1/_includes/inc.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay1/_includes/inc.md deleted file mode 100644 index e2fb9d7bb..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay1/_includes/inc.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: product2/core/_includes/inc.md ---- -This is the core include. diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay1/article1.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay1/article1.md deleted file mode 100644 index 8c6f6106f..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay1/article1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sourcePath: product2/overlay1/product/article1.md ---- -This is the overlay content of Article 1 for product 2. - -{% include [x](_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay2/_includes/inc.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay2/_includes/inc.md deleted file mode 100644 index e2fb9d7bb..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay2/_includes/inc.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: product2/core/_includes/inc.md ---- -This is the core include. diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay2/article1.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay2/article1.md deleted file mode 100644 index 10b5d12ab..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay2/article1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sourcePath: product2/overlay2/product/article1.md ---- -This is the overlay number #2 of Article 1 content for product 2. - -{% include [x](_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay3/_includes/inc.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay3/_includes/inc.md deleted file mode 100644 index e2fb9d7bb..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay3/_includes/inc.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -sourcePath: product2/core/_includes/inc.md ---- -This is the core include. diff --git a/tests/mocks/include-toc/test3/expected-output/product2/overlay3/article1.md b/tests/mocks/include-toc/test3/expected-output/product2/overlay3/article1.md deleted file mode 100644 index 235e2adb2..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/overlay3/article1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sourcePath: product2/core/article1.md ---- -This is the core content of Article 1. - -{% include [x](_includes/inc.md) %} diff --git a/tests/mocks/include-toc/test3/expected-output/product2/p2.md b/tests/mocks/include-toc/test3/expected-output/product2/p2.md deleted file mode 100644 index 94988cc46..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/p2.md +++ /dev/null @@ -1,4 +0,0 @@ -This is the product 2 specific article. - -Check here link to [Article1 overlay 1](overlay1/article1.md) -Check here link to [Article1 overlay 2](overlay2/article1.md) \ No newline at end of file diff --git a/tests/mocks/include-toc/test3/expected-output/product2/toc.yaml b/tests/mocks/include-toc/test3/expected-output/product2/toc.yaml deleted file mode 100644 index 6ddaf1a23..000000000 --- a/tests/mocks/include-toc/test3/expected-output/product2/toc.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: Product 2 title -items: - - name: P2 Article - href: p2.md - - name: Overlay1 - items: - - name: Article1 - href: overlay1/article1.md - - name: Overlay 2 - items: - - name: Article1 - href: overlay2/article1.md - - name: Overlay 3 - items: - - name: Article1 - href: overlay3/article1.md -base: product2 diff --git a/tests/mocks/include-toc/test4/expected-output/a1.md b/tests/mocks/include-toc/test4/expected-output/a1.md deleted file mode 100644 index ec2a6cff6..000000000 --- a/tests/mocks/include-toc/test4/expected-output/a1.md +++ /dev/null @@ -1 +0,0 @@ -This is the /a1.md file content. diff --git a/tests/mocks/include-toc/test4/expected-output/index.yaml b/tests/mocks/include-toc/test4/expected-output/index.yaml deleted file mode 100644 index d9ac6a5f0..000000000 --- a/tests/mocks/include-toc/test4/expected-output/index.yaml +++ /dev/null @@ -1,9 +0,0 @@ -title: Title A -description: - - Desc A -meta: - title: Meta A -links: - - title: A1 - description: A1 desc - href: a1 diff --git a/tests/mocks/include-toc/test4/expected-output/toc.yaml b/tests/mocks/include-toc/test4/expected-output/toc.yaml deleted file mode 100644 index fd3fa2687..000000000 --- a/tests/mocks/include-toc/test4/expected-output/toc.yaml +++ /dev/null @@ -1,6 +0,0 @@ -title: Title A -href: index.yaml -items: - - name: A1 - href: a1.md -base: . diff --git a/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_assets/script/test1.js b/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_assets/script/test1.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_assets/style/test.css b/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_assets/style/test.css deleted file mode 100644 index 1d78a1306..000000000 --- a/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_assets/style/test.css +++ /dev/null @@ -1,13 +0,0 @@ -.Header { - background-color: darkkhaki; -} - -h1 { - /*font-family: 'Qwitcher Grypen', cursive;*/ - font-family: 'QwitcherGrypen-Regular'; -} - -@font-face { - font-family: 'QwitcherGrypen-Regular'; - src: url('https://yfm-test-doc123.martyanov-av.ui.yandex.net/docs-assets/yfm-test-doc123/test39/ru/_assets/fonts/QwitcherGrypen-Regular.ttf'); -} \ No newline at end of file diff --git a/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_bundle/app.client.js b/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_bundle/app.client.js deleted file mode 100644 index e14d257d6..000000000 --- a/tests/mocks/load-custom-resources/md2html-with-resources/expected-output/_bundle/app.client.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see app.client.js.LICENSE.txt */ -(()=>{var e={2406:(e,t,n)=>{"use strict";var r=n(2175),o=r.setup();function a(e){var t=o(e);function n(){for(var e=[],n=0;n{var e,t;"undefined"!=typeof Element&&(t=(e=Element.prototype).matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,e.matches=e.matchesSelector=t||function(e){var t=this;return Array.prototype.some.call(document.querySelectorAll(e),(function(e){return e===t}))}),"undefined"!=typeof document&&document.addEventListener("click",(function(e){var t=e.target.href,n=window.location.origin;if(e.target.matches(".dc-doc-layout__center a")&&t.startsWith(n)){e.preventDefault();var r=".html";if(t.endsWith("/"))return void(window.location.href="".concat(t).concat("index").concat(r));var o=t.split("#");if(o.length>0&&!o[0].endsWith(r))return o[0]+=r,void(window.location.href=o.join("#"));window.location.href=t}}))},2175:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.ERROR_BLOCK_NAME_TYPE="Block name should be a string",t.ERROR_BLOCK_NAME_EMPTY="Block name should be non-empty";var o={ns:"",el:"__",mod:"_",modValue:"_"},a=function(e){return"string"==typeof e},i=function(e){return"string"!=typeof e},l=function(e,t){for(var n=[],o=2;o{"use strict";var r=n(1742),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,l,s,u,c=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),l=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),l.selectNodeContents(u),s.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(l):s.removeAllRanges()),u&&document.body.removeChild(u),i()}return c}},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},4239:(e,t,n)=>{var r=n(2705),o=n(9607),a=n(2333),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},7561:(e,t,n)=>{var r=n(7990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},8450:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},9607:(e,t,n)=>{var r=n(2705),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5639:(e,t,n)=>{var r=n(8450),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},3279:(e,t,n)=>{var r=n(3218),o=n(7771),a=n(4841),i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,h=t,f=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-h>=c}function w(){var e=o();if(b(e))return x(e);d=setTimeout(w,function(e){var n=t-(e-p);return g?l(n,c-(e-h)):n}(e))}function x(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function k(){var e=o(),n=b(e);if(s=arguments,u=this,p=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(w,t),m?y(e):f}(p);if(g)return clearTimeout(d),d=setTimeout(w,t),y(p)}return void 0===d&&(d=setTimeout(w,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=u=d=void 0},k.flush=function(){return void 0===d?f:x(o())},k}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},3448:(e,t,n)=>{var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:(e,t,n)=>{var r=n(5639);e.exports=function(){return r.Date.now()}},3493:(e,t,n)=>{var r=n(3279),o=n(3218);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:a,maxWait:t,trailing:i})}},4841:(e,t,n)=>{var r=n(7561),o=n(3218),a=n(3448),i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},4300:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=l(n(7294)),a=l(n(640)),i=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,i),r=o.default.Children.only(t);return o.default.cloneElement(r,u(u({},n),{},{onClick:this.onClick}))}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(o.default.PureComponent);t.CopyToClipboard=m,h(m,"defaultProps",{onCopy:void 0,options:void 0})},4855:(e,t,n)=>{"use strict";var r=n(4300).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},7774:(e,t,n)=>{"use strict";var r=n(7294);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n