From a2225f1624977f3dea69fcb85c4bb446cb7588c4 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Fri, 18 Dec 2020 15:35:20 -0800 Subject: [PATCH] Backport #268 to add chromium single process flags --- .../utils/visual_report/visualReportHelper.ts | 2 +- .../target/public/.kbn-optimizer-cache | 374 +- kibana-reports/target/public/0.plugin.js | 440 +- kibana-reports/target/public/0.plugin.js.map | 2 +- kibana-reports/target/public/1.plugin.js | 320 +- kibana-reports/target/public/1.plugin.js.map | 2 +- .../opendistro_kibana_reports.plugin.js | 18132 ++++++++-------- .../opendistro_kibana_reports.plugin.js.map | 2 +- 8 files changed, 9637 insertions(+), 9637 deletions(-) diff --git a/kibana-reports/server/routes/utils/visual_report/visualReportHelper.ts b/kibana-reports/server/routes/utils/visual_report/visualReportHelper.ts index 3d53ab70..621ca2af 100644 --- a/kibana-reports/server/routes/utils/visual_report/visualReportHelper.ts +++ b/kibana-reports/server/routes/utils/visual_report/visualReportHelper.ts @@ -66,7 +66,7 @@ export const createVisualReport = async ( * TODO: temp fix to disable sandbox when launching chromium on Linux instance * https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox */ - args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu'], + args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu', '--no-zygote', '--single-process'], executablePath: CHROMIUM_PATH, env: { TZ: timezone || 'UTC', diff --git a/kibana-reports/target/public/.kbn-optimizer-cache b/kibana-reports/target/public/.kbn-optimizer-cache index f6567e66..9ebf2914 100644 --- a/kibana-reports/target/public/.kbn-optimizer-cache +++ b/kibana-reports/target/public/.kbn-optimizer-cache @@ -1,13 +1,13 @@ { "bundleRefExportIds": [], "optimizerCacheKey": { - "lastCommit": "c55e81fd177f184b8ad0e2d13cc9ca66255fb99e", - "bootstrap": "# this is only human readable for debugging, please don't try to parse this\n@kbn/babel-preset:9c7a2ba14eb2f8e8b608669c1e2e831ab5ef0be4\n@kbn/dev-utils:63fd7e22bdf0791a1c8773b035986d7e55ec0350\n@kbn/expect:d8f5076701581dd9ba3805eb0f1f37adc576c179\n@kbn/i18n:0af7a49ffe411daae341c9694ccc477a73a4cda8\n@kbn/monaco:866bf658e961af5ef7bc6950e6330e6c11129201\n@kbn/optimizer:a9cb05ab61db4ab0d2b9abf2c1abfa8e72953a6f\n@kbn/ui-shared-deps:6708e7c67b76a61bcb456a51f0c94a5011d0ba6c", + "lastCommit": "bbb51b5dcbfb2b324aa596b35a6a0ac3a4465eb9", + "bootstrap": "# this is only human readable for debugging, please don't try to parse this\n@kbn/babel-preset:3a07750bc402ccc3805b88c63e3c7c0e434f320c\n@kbn/dev-utils:aa5cb6ae4d111ae2afc171b6291912b6043e427e\n@kbn/expect:a1718c7e2921683020acadb77da0bcf71a47b189\n@kbn/i18n:5bccb9c6109be19d1bd55a4fbe66d45775ac69aa\n@kbn/monaco:c4c69b2ce5b69582fbbbd73665b47cb510a6acf6\n@kbn/optimizer:8ce80efeafdd75fe84c6cd51b491fbb4030d9bee\n@kbn/ui-shared-deps:7f52fc666c98d19609f73de3a06743da137b16ef", "deletedPaths": [], "modifiedTimes": {}, "workerConfig": { "dist": false, - "repoRoot": "/Users/szhongna/Desktop/reporting/kibana", + "repoRoot": "/Users/lijshu/Projects/7.9.1/kibana-7.9.1", "optimizerCacheKey": "♻", "themeTags": [ "v7dark", @@ -23,196 +23,196 @@ "publicDirNames": [ "public" ], - "contextDir": "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports", - "sourceRoot": "/Users/szhongna/Desktop/reporting/kibana", - "outputDir": "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/target/public", - "manifestPath": "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/kibana.json" + "contextDir": "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/plugins/kibana-reports", + "sourceRoot": "/Users/lijshu/Projects/7.9.1/kibana-7.9.1", + "outputDir": "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/plugins/kibana-reports/target/public", + "manifestPath": "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/plugins/kibana-reports/kibana.json" }, "mtimes": { - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_index.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_math.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_form.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_header.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_index.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_size.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_states.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss": 1608158432132, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/package.json": 1608158438710, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/style-loader/package.json": 1607980435204, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/uuid/package.json": 1607980434876, - "/Users/szhongna/Desktop/reporting/kibana/node_modules/webpack/package.json": 1608158438992, - "/Users/szhongna/Desktop/reporting/kibana/packages/elastic-datemath/target/index.js": 1608159081008.0237, - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-optimizer/target/worker/entry_point_creator.js": 1608159136899.106, - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-optimizer/target/worker/postcss.config.js": 1608159136900.2473, - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-ui-shared-deps/public_path_module_creator.js": 1593032574895.5579, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/common/index.ts": 1608177185271.6858, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/kibana.json": 1608177185274.892, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/package.json": 1607980481970, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/babel-polyfill/package.json": 1607980481779, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/core-js/package.json": 1607981020741, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/cron-validator/package.json": 1607981020802, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/react-mde/package.json": 1607981023612, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/showdown/package.json": 1607981024776, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/application.tsx": 1599856400048.2703, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/app.tsx": 1605779136940.5747, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu_helpers.js": 1608177185284.19, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu_ui.js": 1608230994682.7349, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu.js": 1608230994685.442, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/loading_modal/index.ts": 1608177185308.66, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/loading_modal/loading_modal.tsx": 1608177185310.706, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/main_utils.tsx": 1608230994666.8423, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/main.tsx": 1608231091136.7659, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx": 1608177185320.5083, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/report_details/report_details.tsx": 1608177185333.4993, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/reports_table.tsx": 1608231091058.847, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx": 1608177185339.8354, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx": 1603834850082.07, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/delivery.tsx": 1605779137188.7717, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/email.tsx": 1605779137189.7815, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/index.ts": 1597767399835.9766, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx": 1608177185342.795, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/index.ts": 1597767399841.27, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx": 1608177185489.303, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx": 1605237562041.495, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx": 1608177185487.3699, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx": 1608177185491.14, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/index.ts": 1597767399848.9548, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx": 1605047164745.0847, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx": 1608177185528.3462, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx": 1603834850098.4565, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/utils/index.ts": 1603834850306.1677, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/utils/utils.tsx": 1608177185576.784, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/utils/utils.tsx": 1605779137198.6548, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/index.scss": 1603834850099.9739, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/index.ts": 1597767399856.3044, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/plugin.ts": 1608177185776.7617, - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/types.ts": 1597767399857.8967, - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_globals_v7dark.scss": 1608154627064.1724, - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_globals_v7light.scss": 1608154627064.8037, - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_mixins.scss": 1608154627075.6914 + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/common/index.ts": 1608333695640.097, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/package.json": 1602036742958, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/package.json": 1602036742952, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/core-js/package.json": 1602036742957, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/cron-validator/package.json": 1602524870727, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/package.json": 1602036744440, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/showdown/package.json": 1602036745693, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/application.tsx": 1608333635697.4014, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/app.tsx": 1608333635697.755, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu_helpers.js": 1608333695642.2893, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu_ui.js": 1608333695642.5356, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu.js": 1608333695642.08, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts": 1608333635702.4734, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx": 1608333695644.6155, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/main_utils.tsx": 1608333695645.0405, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/main.tsx": 1608333695644.8125, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx": 1608333695645.6274, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx": 1608333635704.696, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/reports_table.tsx": 1608333695645.8877, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx": 1608333635705.1562, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx": 1608333635706.717, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx": 1608333635706.5837, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx": 1608333635706.887, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts": 1608333635706.9946, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx": 1608333635707.3157, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts": 1608333635708.5383, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx": 1608333635708.9507, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx": 1608333635709.0771, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx": 1608333695647.1057, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx": 1608333635709.271, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts": 1608333635709.8118, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx": 1608333635710.1543, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx": 1608333695647.4731, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx": 1608333635710.2754, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts": 1608333635710.4275, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx": 1608333635710.5386, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/utils/utils.tsx": 1608333635710.6865, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/index.scss": 1608333635710.96, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/index.ts": 1608333635711.0789, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/plugin.ts": 1608333635711.2283, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/types.ts": 1608333635711.3357, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_index.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_math.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_form.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_header.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_index.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_size.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_states.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss": 1599863976863, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/css-loader/package.json": 1599863985915, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/style-loader/package.json": 1599863986081, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/uuid/package.json": 1599863974695, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/webpack/package.json": 1599863986166, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/elastic-datemath/target/index.js": 1600204904614.6174, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-optimizer/target/worker/entry_point_creator.js": 1600204949624.9937, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-optimizer/target/worker/postcss.config.js": 1600204949625.817, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-ui-shared-deps/public_path_module_creator.js": 1600204477029.9846, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/plugins/kibana-reports/kibana.json": 1608333695641.6125, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_globals_v7dark.scss": 1600204477765.8938, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_globals_v7light.scss": 1600204477766.2666, + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_mixins.scss": 1600204477774.428 } }, "moduleCount": 416, "workUnits": 953, "files": [ - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_index.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/functions/_math.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_form.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_header.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_index.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_size.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_states.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/package.json", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/style-loader/package.json", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/uuid/package.json", - "/Users/szhongna/Desktop/reporting/kibana/node_modules/webpack/package.json", - "/Users/szhongna/Desktop/reporting/kibana/packages/elastic-datemath/target/index.js", - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-optimizer/target/worker/entry_point_creator.js", - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-optimizer/target/worker/postcss.config.js", - "/Users/szhongna/Desktop/reporting/kibana/packages/kbn-ui-shared-deps/public_path_module_creator.js", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/common/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/kibana.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/babel-polyfill/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/core-js/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/cron-validator/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/react-mde/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/node_modules/showdown/package.json", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/application.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/app.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu_helpers.js", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu_ui.js", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/context_menu/context_menu.js", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/loading_modal/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/loading_modal/loading_modal.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/main_utils.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/main.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/report_details/report_details.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/main/reports_table.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/delivery.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/email.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/delivery/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/utils/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/report_definitions/utils/utils.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/components/utils/utils.tsx", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/index.scss", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/index.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/plugin.ts", - "/Users/szhongna/Desktop/reporting/kibana/plugins/kibana-reports/public/types.ts", - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_globals_v7dark.scss", - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_globals_v7light.scss", - "/Users/szhongna/Desktop/reporting/kibana/src/legacy/ui/public/styles/_mixins.scss" + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/common/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/core-js/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/cron-validator/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/showdown/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/application.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/app.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu_helpers.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu_ui.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/context_menu/context_menu.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/main_utils.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/main.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/reports_table.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/utils/utils.tsx", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/index.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/index.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/plugin.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/types.ts", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_index.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/functions/_math.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_form.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_header.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_index.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_size.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_states.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/css-loader/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/style-loader/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/uuid/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/webpack/package.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/elastic-datemath/target/index.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-optimizer/target/worker/entry_point_creator.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-optimizer/target/worker/postcss.config.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/packages/kbn-ui-shared-deps/public_path_module_creator.js", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/plugins/kibana-reports/kibana.json", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_globals_v7dark.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_globals_v7light.scss", + "/Users/lijshu/Projects/7.9.1/kibana-7.9.1/src/legacy/ui/public/styles/_mixins.scss" ] } \ No newline at end of file diff --git a/kibana-reports/target/public/0.plugin.js b/kibana-reports/target/public/0.plugin.js index 5147a6b8..8a554bc2 100644 --- a/kibana-reports/target/public/0.plugin.js +++ b/kibana-reports/target/public/0.plugin.js @@ -1,27 +1,9 @@ (window["opendistro_kibana_reports_bundle_jsonpfunction"] = window["opendistro_kibana_reports_bundle_jsonpfunction"] || []).push([[0],{ -/***/ "../../node_modules/css-loader/dist/cjs.js?!./node_modules/react-mde/lib/styles/css/react-mde-all.css": -/*!********************************************************************************************************************************************************!*\ - !*** /Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/dist/cjs.js??ref--5-1!./node_modules/react-mde/lib/styles/css/react-mde-all.css ***! - \********************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, ".mde-header {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n border-bottom: 1px solid #c8ccd0;\n border-radius: 2px 2px 0 0;\n background: #f9f9f9; }\n .mde-header .mde-tabs {\n display: flex;\n flex-direction: row; }\n .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 6px 3px;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer; }\n .mde-header .mde-tabs button:first-child {\n margin-left: 6px; }\n .mde-header .mde-tabs button.selected {\n border: 1px solid #c8ccd0; }\n .mde-header .svg-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: inherit;\n overflow: visible;\n vertical-align: -.125em; }\n .mde-header ul.mde-header-group {\n margin: 0;\n padding: 10px;\n list-style: none;\n display: flex;\n flex-wrap: nowrap; }\n .mde-header ul.mde-header-group.hidden {\n visibility: hidden; }\n .mde-header ul.mde-header-group li.mde-header-item {\n display: inline-block;\n position: relative;\n margin: 0 4px; }\n .mde-header ul.mde-header-group li.mde-header-item button {\n text-align: left;\n cursor: pointer;\n height: 22px;\n padding: 4px;\n margin: 0;\n border: none;\n background: none;\n color: #242729; }\n\n@keyframes tooltip-appear {\n from {\n opacity: 0; }\n to {\n opacity: 1; } }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n opacity: 0;\n position: absolute;\n z-index: 1000001;\n width: 0;\n height: 0;\n color: rgba(0, 0, 0, 0.8);\n pointer-events: none;\n content: \"\";\n border: 5px solid transparent;\n top: -5px;\n right: 50%;\n bottom: auto;\n margin-right: -5px;\n border-top-color: rgba(0, 0, 0, 0.8); }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n font-size: 11px;\n opacity: 0;\n position: absolute;\n z-index: 1000000;\n padding: 5px 8px;\n color: #fff;\n pointer-events: none;\n content: attr(aria-label);\n background: rgba(0, 0, 0, 0.8);\n border-radius: 3px;\n right: 50%;\n bottom: 100%;\n transform: translateX(50%);\n margin-bottom: 5px;\n white-space: nowrap; }\n\n.mde-textarea-wrapper {\n position: relative; }\n .mde-textarea-wrapper textarea.mde-text {\n width: 100%;\n border: 0;\n padding: 10px;\n vertical-align: top;\n resize: none;\n overflow-y: auto; }\n\n.mde-preview .mde-preview-content {\n padding: 10px; }\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\n margin-top: 0;\n margin-bottom: 16px; }\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n border-bottom: 1px solid #eee;\n padding-bottom: 0.3em; }\n .mde-preview .mde-preview-content h1 {\n font-size: 1.6em; }\n .mde-preview .mde-preview-content h2 {\n font-size: 1.4em; }\n .mde-preview .mde-preview-content h3 {\n font-size: 1.2em; }\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\n padding-left: 2em; }\n .mde-preview .mde-preview-content blockquote {\n margin-left: 0;\n padding: 0 1em;\n color: #777;\n border-left: 0.25em solid #ddd; }\n .mde-preview .mde-preview-content blockquote > :first-child {\n margin-top: 0; }\n .mde-preview .mde-preview-content blockquote > :last-child {\n margin-bottom: 0; }\n .mde-preview .mde-preview-content code {\n padding: 0.2em 0 0.2em 0;\n margin: 0;\n font-size: 90%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px; }\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\n letter-spacing: -0.2em;\n content: \"\\00a0\"; }\n .mde-preview .mde-preview-content pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px; }\n .mde-preview .mde-preview-content pre code {\n display: inline;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0; }\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\n content: none; }\n .mde-preview .mde-preview-content pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0; }\n .mde-preview .mde-preview-content a {\n color: #4078c0;\n text-decoration: none; }\n .mde-preview .mde-preview-content a:hover {\n text-decoration: underline; }\n .mde-preview .mde-preview-content > *:first-child {\n margin-top: 0 !important; }\n .mde-preview .mde-preview-content > *:last-child {\n margin-bottom: 0 !important; }\n .mde-preview .mde-preview-content::after {\n display: table;\n clear: both;\n content: \"\"; }\n .mde-preview .mde-preview-content table {\n display: block;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse; }\n .mde-preview .mde-preview-content table thead th {\n font-weight: bold; }\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\n padding: 6px 13px;\n border: 1px solid #c8ccd0; }\n\n.react-mde {\n border: 1px solid #c8ccd0;\n border-radius: 2px; }\n .react-mde * {\n box-sizing: border-box; }\n .react-mde .grip {\n border-top: 1px solid #c8ccd0;\n background-color: #f9f9f9;\n text-align: center;\n height: 10px;\n color: black;\n cursor: s-resize; }\n .react-mde .grip .icon {\n height: 10px; }\n .react-mde .invisible {\n display: none; }\n\nul.mde-suggestions {\n position: absolute;\n min-width: 180px;\n padding: 0;\n margin: 20px 0 0;\n list-style: none;\n cursor: pointer;\n background: #fff;\n border: 1px solid #c8ccd0;\n border-radius: 3px;\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\n ul.mde-suggestions li {\n padding: 4px 8px;\n border-bottom: 1px solid #e1e4e8; }\n ul.mde-suggestions li:first-child {\n border-top-left-radius: 2px;\n border-top-right-radius: 2px; }\n ul.mde-suggestions li:last-child {\n border-bottom-right-radius: 2px;\n border-bottom-left-radius: 2px; }\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\n color: white;\n background-color: #0366d6; }\n", "",{"version":3,"sources":["react-mde-all.css"],"names":[],"mappings":"AAAA;EACE,cAAc;EACd,aAAa;EACb,eAAe;EACf,oBAAoB;EACpB,gCAAgC;EAChC,0BAA0B;EAC1B,mBAAmB,EAAE;EACrB;IACE,aAAa;IACb,mBAAmB,EAAE;IACrB;MACE,kBAAkB;MAClB,eAAe;MACf,6BAA6B;MAC7B,6BAA6B;MAC7B,eAAe,EAAE;MACjB;QACE,gBAAgB,EAAE;MACpB;QACE,yBAAyB,EAAE;EACjC;IACE,UAAU;IACV,WAAW;IACX,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB,EAAE;EAC3B;IACE,SAAS;IACT,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,iBAAiB,EAAE;IACnB;MACE,kBAAkB,EAAE;IACtB;MACE,qBAAqB;MACrB,kBAAkB;MAClB,aAAa,EAAE;MACf;QACE,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,cAAc,EAAE;;AAExB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE,EAAE;QACV;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,QAAQ;UACR,SAAS;UACT,yBAAyB;UACzB,oBAAoB;UACpB,WAAW;UACX,6BAA6B;UAC7B,SAAS;UACT,UAAU;UACV,YAAY;UACZ,kBAAkB;UAClB,oCAAoC,EAAE;QACxC;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,eAAe;UACf,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,gBAAgB;UAChB,WAAW;UACX,oBAAoB;UACpB,yBAAyB;UACzB,8BAA8B;UAC9B,kBAAkB;UAClB,UAAU;UACV,YAAY;UACZ,0BAA0B;UAC1B,kBAAkB;UAClB,mBAAmB,EAAE;;AAE/B;EACE,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,gBAAgB,EAAE;;AAEtB;EACE,aAAa,EAAE;EACf;IACE,aAAa;IACb,mBAAmB,EAAE;EACvB;IACE,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,6BAA6B;IAC7B,qBAAqB,EAAE;EACzB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,iBAAiB,EAAE;EACrB;IACE,cAAc;IACd,cAAc;IACd,WAAW;IACX,8BAA8B,EAAE;IAChC;MACE,aAAa,EAAE;IACjB;MACE,gBAAgB,EAAE;EACtB;IACE,wBAAwB;IACxB,SAAS;IACT,cAAc;IACd,qCAAqC;IACrC,kBAAkB,EAAE;IACpB;MACE,sBAAsB;MACtB,gBAAgB,EAAE;EACtB;IACE,aAAa;IACb,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB,EAAE;IACpB;MACE,eAAe;MACf,UAAU;MACV,SAAS;MACT,iBAAiB;MACjB,oBAAoB;MACpB,iBAAiB;MACjB,6BAA6B;MAC7B,SAAS,EAAE;MACX;QACE,aAAa,EAAE;IACnB;MACE,UAAU;MACV,SAAS;MACT,eAAe;MACf,kBAAkB;MAClB,gBAAgB;MAChB,uBAAuB;MACvB,SAAS,EAAE;EACf;IACE,cAAc;IACd,qBAAqB,EAAE;IACvB;MACE,0BAA0B,EAAE;EAChC;IACE,wBAAwB,EAAE;EAC5B;IACE,2BAA2B,EAAE;EAC/B;IACE,cAAc;IACd,WAAW;IACX,WAAW,EAAE;EACf;IACE,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,yBAAyB,EAAE;IAC3B;MACE,iBAAiB,EAAE;IACrB;MACE,iBAAiB;MACjB,yBAAyB,EAAE;;AAEjC;EACE,yBAAyB;EACzB,kBAAkB,EAAE;EACpB;IACE,sBAAsB,EAAE;EAC1B;IACE,6BAA6B;IAC7B,yBAAyB;IACzB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,gBAAgB,EAAE;IAClB;MACE,YAAY,EAAE;EAClB;IACE,aAAa,EAAE;;AAEnB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,UAAU;EACV,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,4CAA4C,EAAE;EAC9C;IACE,gBAAgB;IAChB,gCAAgC,EAAE;IAClC;MACE,2BAA2B;MAC3B,4BAA4B,EAAE;IAChC;MACE,+BAA+B;MAC/B,8BAA8B,EAAE;IAClC;MACE,YAAY;MACZ,yBAAyB,EAAE","file":"react-mde-all.css","sourcesContent":[".mde-header {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n border-bottom: 1px solid #c8ccd0;\n border-radius: 2px 2px 0 0;\n background: #f9f9f9; }\n .mde-header .mde-tabs {\n display: flex;\n flex-direction: row; }\n .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 6px 3px;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer; }\n .mde-header .mde-tabs button:first-child {\n margin-left: 6px; }\n .mde-header .mde-tabs button.selected {\n border: 1px solid #c8ccd0; }\n .mde-header .svg-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: inherit;\n overflow: visible;\n vertical-align: -.125em; }\n .mde-header ul.mde-header-group {\n margin: 0;\n padding: 10px;\n list-style: none;\n display: flex;\n flex-wrap: nowrap; }\n .mde-header ul.mde-header-group.hidden {\n visibility: hidden; }\n .mde-header ul.mde-header-group li.mde-header-item {\n display: inline-block;\n position: relative;\n margin: 0 4px; }\n .mde-header ul.mde-header-group li.mde-header-item button {\n text-align: left;\n cursor: pointer;\n height: 22px;\n padding: 4px;\n margin: 0;\n border: none;\n background: none;\n color: #242729; }\n\n@keyframes tooltip-appear {\n from {\n opacity: 0; }\n to {\n opacity: 1; } }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n opacity: 0;\n position: absolute;\n z-index: 1000001;\n width: 0;\n height: 0;\n color: rgba(0, 0, 0, 0.8);\n pointer-events: none;\n content: \"\";\n border: 5px solid transparent;\n top: -5px;\n right: 50%;\n bottom: auto;\n margin-right: -5px;\n border-top-color: rgba(0, 0, 0, 0.8); }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n font-size: 11px;\n opacity: 0;\n position: absolute;\n z-index: 1000000;\n padding: 5px 8px;\n color: #fff;\n pointer-events: none;\n content: attr(aria-label);\n background: rgba(0, 0, 0, 0.8);\n border-radius: 3px;\n right: 50%;\n bottom: 100%;\n transform: translateX(50%);\n margin-bottom: 5px;\n white-space: nowrap; }\n\n.mde-textarea-wrapper {\n position: relative; }\n .mde-textarea-wrapper textarea.mde-text {\n width: 100%;\n border: 0;\n padding: 10px;\n vertical-align: top;\n resize: none;\n overflow-y: auto; }\n\n.mde-preview .mde-preview-content {\n padding: 10px; }\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\n margin-top: 0;\n margin-bottom: 16px; }\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n border-bottom: 1px solid #eee;\n padding-bottom: 0.3em; }\n .mde-preview .mde-preview-content h1 {\n font-size: 1.6em; }\n .mde-preview .mde-preview-content h2 {\n font-size: 1.4em; }\n .mde-preview .mde-preview-content h3 {\n font-size: 1.2em; }\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\n padding-left: 2em; }\n .mde-preview .mde-preview-content blockquote {\n margin-left: 0;\n padding: 0 1em;\n color: #777;\n border-left: 0.25em solid #ddd; }\n .mde-preview .mde-preview-content blockquote > :first-child {\n margin-top: 0; }\n .mde-preview .mde-preview-content blockquote > :last-child {\n margin-bottom: 0; }\n .mde-preview .mde-preview-content code {\n padding: 0.2em 0 0.2em 0;\n margin: 0;\n font-size: 90%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px; }\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\n letter-spacing: -0.2em;\n content: \"\\00a0\"; }\n .mde-preview .mde-preview-content pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px; }\n .mde-preview .mde-preview-content pre code {\n display: inline;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0; }\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\n content: none; }\n .mde-preview .mde-preview-content pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0; }\n .mde-preview .mde-preview-content a {\n color: #4078c0;\n text-decoration: none; }\n .mde-preview .mde-preview-content a:hover {\n text-decoration: underline; }\n .mde-preview .mde-preview-content > *:first-child {\n margin-top: 0 !important; }\n .mde-preview .mde-preview-content > *:last-child {\n margin-bottom: 0 !important; }\n .mde-preview .mde-preview-content::after {\n display: table;\n clear: both;\n content: \"\"; }\n .mde-preview .mde-preview-content table {\n display: block;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse; }\n .mde-preview .mde-preview-content table thead th {\n font-weight: bold; }\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\n padding: 6px 13px;\n border: 1px solid #c8ccd0; }\n\n.react-mde {\n border: 1px solid #c8ccd0;\n border-radius: 2px; }\n .react-mde * {\n box-sizing: border-box; }\n .react-mde .grip {\n border-top: 1px solid #c8ccd0;\n background-color: #f9f9f9;\n text-align: center;\n height: 10px;\n color: black;\n cursor: s-resize; }\n .react-mde .grip .icon {\n height: 10px; }\n .react-mde .invisible {\n display: none; }\n\nul.mde-suggestions {\n position: absolute;\n min-width: 180px;\n padding: 0;\n margin: 20px 0 0;\n list-style: none;\n cursor: pointer;\n background: #fff;\n border: 1px solid #c8ccd0;\n border-radius: 3px;\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\n ul.mde-suggestions li {\n padding: 4px 8px;\n border-bottom: 1px solid #e1e4e8; }\n ul.mde-suggestions li:first-child {\n border-top-left-radius: 2px;\n border-top-right-radius: 2px; }\n ul.mde-suggestions li:last-child {\n border-bottom-right-radius: 2px;\n border-bottom-left-radius: 2px; }\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\n color: white;\n background-color: #0366d6; }\n"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "./node_modules/cron-validator/lib/index.js": -/*!**************************************************!*\ - !*** ./node_modules/cron-validator/lib/index.js ***! - \**************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/cron-validator/lib/index.js": +/*!*************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/cron-validator/lib/index.js ***! + \*************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -202,10 +184,10 @@ exports.isValidCron = function (cron, options) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/command-orchestrator.js": -/*!************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/command-orchestrator.js ***! - \************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-orchestrator.js": +/*!***********************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-orchestrator.js ***! + \***********************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -259,10 +241,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); -var __1 = __webpack_require__(/*! .. */ "./node_modules/react-mde/lib/js/index.js"); -var InsertTextAtPosition_1 = __webpack_require__(/*! ../util/InsertTextAtPosition */ "./node_modules/react-mde/lib/js/util/InsertTextAtPosition.js"); -var command_utils_1 = __webpack_require__(/*! ./command-utils */ "./node_modules/react-mde/lib/js/commands/command-utils.js"); -var defaults_1 = __webpack_require__(/*! ./default-commands/defaults */ "./node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); +var __1 = __webpack_require__(/*! .. */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js"); +var InsertTextAtPosition_1 = __webpack_require__(/*! ../util/InsertTextAtPosition */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js"); +var command_utils_1 = __webpack_require__(/*! ./command-utils */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-utils.js"); +var defaults_1 = __webpack_require__(/*! ./default-commands/defaults */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); var TextAreaTextApi = /** @class */ (function () { function TextAreaTextApi(textAreaRef) { this.textAreaRef = textAreaRef; @@ -391,10 +373,10 @@ exports.CommandOrchestrator = CommandOrchestrator; /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/command-utils.js": -/*!*****************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/command-utils.js ***! - \*****************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-utils.js": +/*!****************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-utils.js ***! + \****************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -422,17 +404,17 @@ exports.extractKeyActivatedCommands = extractKeyActivatedCommands; /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js": -/*!********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js ***! - \********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js": +/*!*******************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js ***! + \*******************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.boldCommand = { buttonProps: { "aria-label": "Add bold text" }, execute: function (_a) { @@ -457,17 +439,17 @@ exports.boldCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js": -/*!********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js ***! - \********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js": +/*!*******************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js ***! + \*******************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.codeCommand = { buttonProps: { "aria-label": "Insert code" }, execute: function (_a) { @@ -507,26 +489,26 @@ exports.codeCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/defaults.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/defaults.js ***! - \*****************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js": +/*!****************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js ***! + \****************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var headerCommand_1 = __webpack_require__(/*! ./headerCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js"); -var boldCommand_1 = __webpack_require__(/*! ./boldCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js"); -var italicCommand_1 = __webpack_require__(/*! ./italicCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js"); -var strikeThroughCommand_1 = __webpack_require__(/*! ./strikeThroughCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js"); -var linkCommand_1 = __webpack_require__(/*! ./linkCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js"); -var quoteCommand_1 = __webpack_require__(/*! ./quoteCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js"); -var codeCommand_1 = __webpack_require__(/*! ./codeCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js"); -var listCommands_1 = __webpack_require__(/*! ./listCommands */ "./node_modules/react-mde/lib/js/commands/default-commands/listCommands.js"); -var imageCommand_1 = __webpack_require__(/*! ./imageCommand */ "./node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js"); -var save_image_command_1 = __webpack_require__(/*! ./save-image-command */ "./node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js"); +var headerCommand_1 = __webpack_require__(/*! ./headerCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js"); +var boldCommand_1 = __webpack_require__(/*! ./boldCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js"); +var italicCommand_1 = __webpack_require__(/*! ./italicCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js"); +var strikeThroughCommand_1 = __webpack_require__(/*! ./strikeThroughCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js"); +var linkCommand_1 = __webpack_require__(/*! ./linkCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js"); +var quoteCommand_1 = __webpack_require__(/*! ./quoteCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js"); +var codeCommand_1 = __webpack_require__(/*! ./codeCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js"); +var listCommands_1 = __webpack_require__(/*! ./listCommands */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/listCommands.js"); +var imageCommand_1 = __webpack_require__(/*! ./imageCommand */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js"); +var save_image_command_1 = __webpack_require__(/*! ./save-image-command */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js"); function getDefaultToolbarCommands() { return [ ["header", "bold", "italic", "strikethrough"], @@ -560,17 +542,17 @@ exports.getDefaultSaveImageCommandName = getDefaultSaveImageCommandName; /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js ***! - \**********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js": +/*!*********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js ***! + \*********************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); function setHeader(initialState, api, prefix) { // Adjust the selection to encompass the whole word if the caret is inside one var newSelectionRange = MarkdownUtil_1.selectWord({ @@ -597,17 +579,17 @@ exports.headerCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js ***! - \*********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js": +/*!********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js ***! + \********************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.imageCommand = { buttonProps: { "aria-label": "Add image" }, execute: function (_a) { @@ -631,17 +613,17 @@ exports.imageCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js": -/*!**********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js ***! - \**********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js": +/*!*********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js ***! + \*********************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.italicCommand = { buttonProps: { "aria-label": "Add italic text" }, execute: function (_a) { @@ -666,17 +648,17 @@ exports.italicCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js": -/*!********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js ***! - \********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js": +/*!*******************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js ***! + \*******************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.linkCommand = { buttonProps: { "aria-label": "Add a link" }, execute: function (_a) { @@ -701,17 +683,17 @@ exports.linkCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/listCommands.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/listCommands.js ***! - \*********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/listCommands.js": +/*!********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/listCommands.js ***! + \********************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); /** * Inserts insertionString before each line */ @@ -783,17 +765,17 @@ exports.checkedListCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js ***! - \*********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js": +/*!********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js ***! + \********************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.quoteCommand = { buttonProps: { "aria-label": "Insert a quote" }, execute: function (_a) { @@ -822,10 +804,10 @@ exports.quoteCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js": -/*!***************************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js ***! - \***************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js": +/*!**************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js ***! + \**************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -868,8 +850,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); -var files_1 = __webpack_require__(/*! ../../util/files */ "./node_modules/react-mde/lib/js/util/files.js"); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var files_1 = __webpack_require__(/*! ../../util/files */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/files.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.saveImageCommand = { execute: function (_a) { var initialState = _a.initialState, textApi = _a.textApi, context = _a.context, l18n = _a.l18n; @@ -940,17 +922,17 @@ function isPasteContext(context) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js": -/*!*****************************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js ***! - \*****************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js": +/*!****************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js ***! + \****************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil_1 = __webpack_require__(/*! ../../util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.strikeThroughCommand = { buttonProps: { "aria-label": "Add strikethrough text" }, execute: function (_a) { @@ -974,10 +956,10 @@ exports.strikeThroughCommand = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/Preview.js": -/*!*************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/Preview.js ***! - \*************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Preview.js": +/*!************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Preview.js ***! + \************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -998,7 +980,7 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); var Preview = /** @class */ (function (_super) { __extends(Preview, _super); function Preview(props) { @@ -1049,10 +1031,10 @@ exports.Preview = Preview; /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/ReactMde.js": -/*!**************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/ReactMde.js ***! - \**************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ReactMde.js": +/*!*************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ReactMde.js ***! + \*************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1120,13 +1102,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); -var _1 = __webpack_require__(/*! . */ "./node_modules/react-mde/lib/js/components/index.js"); -var defaults_1 = __webpack_require__(/*! ../commands/default-commands/defaults */ "./node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); -var react_mde_en_1 = __webpack_require__(/*! ../l18n/react-mde.en */ "./node_modules/react-mde/lib/js/l18n/react-mde.en.js"); -var icons_1 = __webpack_require__(/*! ../icons */ "./node_modules/react-mde/lib/js/icons/index.js"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); -var command_orchestrator_1 = __webpack_require__(/*! ../commands/command-orchestrator */ "./node_modules/react-mde/lib/js/commands/command-orchestrator.js"); -var grip_svg_1 = __webpack_require__(/*! ./grip-svg */ "./node_modules/react-mde/lib/js/components/grip-svg.js"); +var _1 = __webpack_require__(/*! . */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/index.js"); +var defaults_1 = __webpack_require__(/*! ../commands/default-commands/defaults */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); +var react_mde_en_1 = __webpack_require__(/*! ../l18n/react-mde.en */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/l18n/react-mde.en.js"); +var icons_1 = __webpack_require__(/*! ../icons */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/index.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); +var command_orchestrator_1 = __webpack_require__(/*! ../commands/command-orchestrator */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-orchestrator.js"); +var grip_svg_1 = __webpack_require__(/*! ./grip-svg */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/grip-svg.js"); var ReactMde = /** @class */ (function (_super) { __extends(ReactMde, _super); function ReactMde(props) { @@ -1253,10 +1235,10 @@ exports.ReactMde = ReactMde; /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/SuggestionsDropdown.js": -/*!*************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/SuggestionsDropdown.js ***! - \*************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js": +/*!************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js ***! + \************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1265,7 +1247,7 @@ exports.ReactMde = ReactMde; Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); var react_1 = __webpack_require__(/*! react */ "react"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); exports.SuggestionsDropdown = function (_a) { var classes = _a.classes, suggestions = _a.suggestions, caret = _a.caret, onSuggestionSelected = _a.onSuggestionSelected, focusIndex = _a.focusIndex, textAreaRef = _a.textAreaRef; var handleSuggestionClick = react_1.useCallback(function (event) { @@ -1285,10 +1267,10 @@ exports.SuggestionsDropdown = function (_a) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/TextArea.js": -/*!**************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/TextArea.js ***! - \**************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/TextArea.js": +/*!*************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/TextArea.js ***! + \*************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1320,11 +1302,11 @@ var __assign = (this && this.__assign) || function () { }; Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); -var TextAreaCaretPosition_1 = __webpack_require__(/*! ../util/TextAreaCaretPosition */ "./node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js"); -var InsertTextAtPosition_1 = __webpack_require__(/*! ../util/InsertTextAtPosition */ "./node_modules/react-mde/lib/js/util/InsertTextAtPosition.js"); -var Math_1 = __webpack_require__(/*! ../util/Math */ "./node_modules/react-mde/lib/js/util/Math.js"); -var SuggestionsDropdown_1 = __webpack_require__(/*! ./SuggestionsDropdown */ "./node_modules/react-mde/lib/js/components/SuggestionsDropdown.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); +var TextAreaCaretPosition_1 = __webpack_require__(/*! ../util/TextAreaCaretPosition */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js"); +var InsertTextAtPosition_1 = __webpack_require__(/*! ../util/InsertTextAtPosition */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js"); +var Math_1 = __webpack_require__(/*! ../util/Math */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/Math.js"); +var SuggestionsDropdown_1 = __webpack_require__(/*! ./SuggestionsDropdown */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js"); var TextArea = /** @class */ (function (_super) { __extends(TextArea, _super); function TextArea(props) { @@ -1590,10 +1572,10 @@ exports.TextArea = TextArea; /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/Toolbar.js": -/*!*************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/Toolbar.js ***! - \*************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Toolbar.js": +/*!************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Toolbar.js ***! + \************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1625,9 +1607,9 @@ var __assign = (this && this.__assign) || function () { }; Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); -var ToolbarButtonGroup_1 = __webpack_require__(/*! ./ToolbarButtonGroup */ "./node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js"); -var ToolbarButton_1 = __webpack_require__(/*! ./ToolbarButton */ "./node_modules/react-mde/lib/js/components/ToolbarButton.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); +var ToolbarButtonGroup_1 = __webpack_require__(/*! ./ToolbarButtonGroup */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js"); +var ToolbarButton_1 = __webpack_require__(/*! ./ToolbarButton */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js"); var Toolbar = /** @class */ (function (_super) { __extends(Toolbar, _super); function Toolbar() { @@ -1661,10 +1643,10 @@ exports.Toolbar = Toolbar; /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/ToolbarButton.js": -/*!*******************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/ToolbarButton.js ***! - \*******************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js": +/*!******************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js ***! + \******************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1700,10 +1682,10 @@ exports.ToolbarButton = function (props) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js": -/*!************************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js ***! - \************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js": +/*!***********************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js ***! + \***********************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1711,7 +1693,7 @@ exports.ToolbarButton = function (props) { Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(/*! react */ "react"); -var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "./node_modules/react-mde/lib/js/util/ClassNames.js"); +var ClassNames_1 = __webpack_require__(/*! ../util/ClassNames */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js"); exports.ToolbarButtonGroup = function (props) { return (React.createElement("ul", { className: ClassNames_1.classNames("mde-header-group", { hidden: props.hidden }) }, props.children)); }; @@ -1719,10 +1701,10 @@ exports.ToolbarButtonGroup = function (props) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/grip-svg.js": -/*!**************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/grip-svg.js ***! - \**************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/grip-svg.js": +/*!*************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/grip-svg.js ***! + \*************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1739,10 +1721,10 @@ exports.GripSvg = GripSvg; /***/ }), -/***/ "./node_modules/react-mde/lib/js/components/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/react-mde/lib/js/components/index.js ***! - \***********************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/index.js": +/*!**********************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/index.js ***! + \**********************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1752,22 +1734,22 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./ToolbarButtonGroup */ "./node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js")); -__export(__webpack_require__(/*! ./ToolbarButton */ "./node_modules/react-mde/lib/js/components/ToolbarButton.js")); -__export(__webpack_require__(/*! ../icons/MdeFontAwesomeIcon */ "./node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js")); -__export(__webpack_require__(/*! ./Preview */ "./node_modules/react-mde/lib/js/components/Preview.js")); -__export(__webpack_require__(/*! ./TextArea */ "./node_modules/react-mde/lib/js/components/TextArea.js")); -__export(__webpack_require__(/*! ./Toolbar */ "./node_modules/react-mde/lib/js/components/Toolbar.js")); -__export(__webpack_require__(/*! ./ReactMde */ "./node_modules/react-mde/lib/js/components/ReactMde.js")); -__export(__webpack_require__(/*! ./SuggestionsDropdown */ "./node_modules/react-mde/lib/js/components/SuggestionsDropdown.js")); +__export(__webpack_require__(/*! ./ToolbarButtonGroup */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js")); +__export(__webpack_require__(/*! ./ToolbarButton */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js")); +__export(__webpack_require__(/*! ../icons/MdeFontAwesomeIcon */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js")); +__export(__webpack_require__(/*! ./Preview */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Preview.js")); +__export(__webpack_require__(/*! ./TextArea */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/TextArea.js")); +__export(__webpack_require__(/*! ./Toolbar */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Toolbar.js")); +__export(__webpack_require__(/*! ./ReactMde */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ReactMde.js")); +__export(__webpack_require__(/*! ./SuggestionsDropdown */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js")); /***/ }), -/***/ "./node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js": -/*!*******************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js ***! - \*******************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js": +/*!******************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js ***! + \******************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1803,10 +1785,10 @@ exports.MdeFontAwesomeIcon = function (_a) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/icons/SvgIcon.js": -/*!********************************************************!*\ - !*** ./node_modules/react-mde/lib/js/icons/SvgIcon.js ***! - \********************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/SvgIcon.js": +/*!*******************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/SvgIcon.js ***! + \*******************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1869,10 +1851,10 @@ exports.SvgIcon = function (_a) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/icons/index.js": -/*!******************************************************!*\ - !*** ./node_modules/react-mde/lib/js/icons/index.js ***! - \******************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/index.js": +/*!*****************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/index.js ***! + \*****************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1882,34 +1864,34 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./MdeFontAwesomeIcon */ "./node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js")); -__export(__webpack_require__(/*! ./SvgIcon */ "./node_modules/react-mde/lib/js/icons/SvgIcon.js")); +__export(__webpack_require__(/*! ./MdeFontAwesomeIcon */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js")); +__export(__webpack_require__(/*! ./SvgIcon */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/SvgIcon.js")); /***/ }), -/***/ "./node_modules/react-mde/lib/js/index.js": -/*!************************************************!*\ - !*** ./node_modules/react-mde/lib/js/index.js ***! - \************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js": +/*!***********************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js ***! + \***********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownUtil = __webpack_require__(/*! ./util/MarkdownUtil */ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js"); +var MarkdownUtil = __webpack_require__(/*! ./util/MarkdownUtil */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js"); exports.MarkdownUtil = MarkdownUtil; -var components_1 = __webpack_require__(/*! ./components */ "./node_modules/react-mde/lib/js/components/index.js"); +var components_1 = __webpack_require__(/*! ./components */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/index.js"); exports.TextArea = components_1.TextArea; exports.SuggestionsDropdown = components_1.SuggestionsDropdown; exports.Preview = components_1.Preview; exports.Toolbar = components_1.Toolbar; exports.ToolbarButtonGroup = components_1.ToolbarButtonGroup; -var icons_1 = __webpack_require__(/*! ./icons */ "./node_modules/react-mde/lib/js/icons/index.js"); +var icons_1 = __webpack_require__(/*! ./icons */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/index.js"); exports.SvgIcon = icons_1.SvgIcon; exports.MdeFontAwesomeIcon = icons_1.MdeFontAwesomeIcon; -var defaults_1 = __webpack_require__(/*! ./commands/default-commands/defaults */ "./node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); +var defaults_1 = __webpack_require__(/*! ./commands/default-commands/defaults */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js"); exports.getDefaultCommandMap = defaults_1.getDefaultCommandMap; exports.getDefaultToolbarCommands = defaults_1.getDefaultToolbarCommands; exports.default = components_1.ReactMde; @@ -1917,10 +1899,10 @@ exports.default = components_1.ReactMde; /***/ }), -/***/ "./node_modules/react-mde/lib/js/l18n/react-mde.en.js": -/*!************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/l18n/react-mde.en.js ***! - \************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/l18n/react-mde.en.js": +/*!***********************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/l18n/react-mde.en.js ***! + \***********************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1936,10 +1918,10 @@ exports.enL18n = { /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/ClassNames.js": -/*!**********************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/ClassNames.js ***! - \**********************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js": +/*!*********************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js ***! + \*********************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1994,10 +1976,10 @@ exports.classNames = classNames; /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/InsertTextAtPosition.js": -/*!********************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/InsertTextAtPosition.js ***! - \********************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js": +/*!*******************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js ***! + \*******************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2102,10 +2084,10 @@ function canManipulateViaTextNodes(input) { /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/MarkdownUtil.js": -/*!************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/MarkdownUtil.js ***! - \************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js": +/*!***********************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js ***! + \***********************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2215,10 +2197,10 @@ exports.getBreaksNeededForEmptyLineAfter = getBreaksNeededForEmptyLineAfter; /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/Math.js": -/*!****************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/Math.js ***! - \****************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/Math.js": +/*!***************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/Math.js ***! + \***************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2236,10 +2218,10 @@ exports.mod = mod; /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js": -/*!*********************************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js ***! - \*********************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js": +/*!********************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js ***! + \********************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2342,10 +2324,10 @@ exports.getCaretCoordinates = getCaretCoordinates; /***/ }), -/***/ "./node_modules/react-mde/lib/js/util/files.js": -/*!*****************************************************!*\ - !*** ./node_modules/react-mde/lib/js/util/files.js ***! - \*****************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/files.js": +/*!****************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/files.js ***! + \****************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2414,15 +2396,15 @@ exports.readFileAsync = readFileAsync; /***/ }), -/***/ "./node_modules/react-mde/lib/styles/css/react-mde-all.css": -/*!*****************************************************************!*\ - !*** ./node_modules/react-mde/lib/styles/css/react-mde-all.css ***! - \*****************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css": +/*!****************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css ***! + \****************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { var api = __webpack_require__(/*! ../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); - var content = __webpack_require__(/*! !../../../../../../../node_modules/css-loader/dist/cjs.js??ref--5-1!./react-mde-all.css */ "../../node_modules/css-loader/dist/cjs.js?!./node_modules/react-mde/lib/styles/css/react-mde-all.css"); + var content = __webpack_require__(/*! !../../../../../../../node_modules/css-loader/dist/cjs.js??ref--5-1!./react-mde-all.css */ "../../node_modules/css-loader/dist/cjs.js?!../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css"); content = content.__esModule ? content.default : content; @@ -2445,10 +2427,10 @@ module.exports = exported; /***/ }), -/***/ "./node_modules/showdown/dist/showdown.js": -/*!************************************************!*\ - !*** ./node_modules/showdown/dist/showdown.js ***! - \************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/showdown/dist/showdown.js": +/*!***********************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/showdown/dist/showdown.js ***! + \***********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -7592,6 +7574,24 @@ if (true) { //# sourceMappingURL=showdown.js.map +/***/ }), + +/***/ "../../node_modules/css-loader/dist/cjs.js?!../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css": +/*!********************************************************************************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/node_modules/css-loader/dist/cjs.js??ref--5-1!/Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css ***! + \********************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Imports +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); +exports = ___CSS_LOADER_API_IMPORT___(true); +// Module +exports.push([module.i, ".mde-header {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n border-bottom: 1px solid #c8ccd0;\n border-radius: 2px 2px 0 0;\n background: #f9f9f9; }\n .mde-header .mde-tabs {\n display: flex;\n flex-direction: row; }\n .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 6px 3px;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer; }\n .mde-header .mde-tabs button:first-child {\n margin-left: 6px; }\n .mde-header .mde-tabs button.selected {\n border: 1px solid #c8ccd0; }\n .mde-header .svg-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: inherit;\n overflow: visible;\n vertical-align: -.125em; }\n .mde-header ul.mde-header-group {\n margin: 0;\n padding: 10px;\n list-style: none;\n display: flex;\n flex-wrap: nowrap; }\n .mde-header ul.mde-header-group.hidden {\n visibility: hidden; }\n .mde-header ul.mde-header-group li.mde-header-item {\n display: inline-block;\n position: relative;\n margin: 0 4px; }\n .mde-header ul.mde-header-group li.mde-header-item button {\n text-align: left;\n cursor: pointer;\n height: 22px;\n padding: 4px;\n margin: 0;\n border: none;\n background: none;\n color: #242729; }\n\n@keyframes tooltip-appear {\n from {\n opacity: 0; }\n to {\n opacity: 1; } }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n opacity: 0;\n position: absolute;\n z-index: 1000001;\n width: 0;\n height: 0;\n color: rgba(0, 0, 0, 0.8);\n pointer-events: none;\n content: \"\";\n border: 5px solid transparent;\n top: -5px;\n right: 50%;\n bottom: auto;\n margin-right: -5px;\n border-top-color: rgba(0, 0, 0, 0.8); }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n font-size: 11px;\n opacity: 0;\n position: absolute;\n z-index: 1000000;\n padding: 5px 8px;\n color: #fff;\n pointer-events: none;\n content: attr(aria-label);\n background: rgba(0, 0, 0, 0.8);\n border-radius: 3px;\n right: 50%;\n bottom: 100%;\n transform: translateX(50%);\n margin-bottom: 5px;\n white-space: nowrap; }\n\n.mde-textarea-wrapper {\n position: relative; }\n .mde-textarea-wrapper textarea.mde-text {\n width: 100%;\n border: 0;\n padding: 10px;\n vertical-align: top;\n resize: none;\n overflow-y: auto; }\n\n.mde-preview .mde-preview-content {\n padding: 10px; }\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\n margin-top: 0;\n margin-bottom: 16px; }\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n border-bottom: 1px solid #eee;\n padding-bottom: 0.3em; }\n .mde-preview .mde-preview-content h1 {\n font-size: 1.6em; }\n .mde-preview .mde-preview-content h2 {\n font-size: 1.4em; }\n .mde-preview .mde-preview-content h3 {\n font-size: 1.2em; }\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\n padding-left: 2em; }\n .mde-preview .mde-preview-content blockquote {\n margin-left: 0;\n padding: 0 1em;\n color: #777;\n border-left: 0.25em solid #ddd; }\n .mde-preview .mde-preview-content blockquote > :first-child {\n margin-top: 0; }\n .mde-preview .mde-preview-content blockquote > :last-child {\n margin-bottom: 0; }\n .mde-preview .mde-preview-content code {\n padding: 0.2em 0 0.2em 0;\n margin: 0;\n font-size: 90%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px; }\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\n letter-spacing: -0.2em;\n content: \"\\00a0\"; }\n .mde-preview .mde-preview-content pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px; }\n .mde-preview .mde-preview-content pre code {\n display: inline;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0; }\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\n content: none; }\n .mde-preview .mde-preview-content pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0; }\n .mde-preview .mde-preview-content a {\n color: #4078c0;\n text-decoration: none; }\n .mde-preview .mde-preview-content a:hover {\n text-decoration: underline; }\n .mde-preview .mde-preview-content > *:first-child {\n margin-top: 0 !important; }\n .mde-preview .mde-preview-content > *:last-child {\n margin-bottom: 0 !important; }\n .mde-preview .mde-preview-content::after {\n display: table;\n clear: both;\n content: \"\"; }\n .mde-preview .mde-preview-content table {\n display: block;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse; }\n .mde-preview .mde-preview-content table thead th {\n font-weight: bold; }\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\n padding: 6px 13px;\n border: 1px solid #c8ccd0; }\n\n.react-mde {\n border: 1px solid #c8ccd0;\n border-radius: 2px; }\n .react-mde * {\n box-sizing: border-box; }\n .react-mde .grip {\n border-top: 1px solid #c8ccd0;\n background-color: #f9f9f9;\n text-align: center;\n height: 10px;\n color: black;\n cursor: s-resize; }\n .react-mde .grip .icon {\n height: 10px; }\n .react-mde .invisible {\n display: none; }\n\nul.mde-suggestions {\n position: absolute;\n min-width: 180px;\n padding: 0;\n margin: 20px 0 0;\n list-style: none;\n cursor: pointer;\n background: #fff;\n border: 1px solid #c8ccd0;\n border-radius: 3px;\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\n ul.mde-suggestions li {\n padding: 4px 8px;\n border-bottom: 1px solid #e1e4e8; }\n ul.mde-suggestions li:first-child {\n border-top-left-radius: 2px;\n border-top-right-radius: 2px; }\n ul.mde-suggestions li:last-child {\n border-bottom-right-radius: 2px;\n border-bottom-left-radius: 2px; }\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\n color: white;\n background-color: #0366d6; }\n", "",{"version":3,"sources":["react-mde-all.css"],"names":[],"mappings":"AAAA;EACE,cAAc;EACd,aAAa;EACb,eAAe;EACf,oBAAoB;EACpB,gCAAgC;EAChC,0BAA0B;EAC1B,mBAAmB,EAAE;EACrB;IACE,aAAa;IACb,mBAAmB,EAAE;IACrB;MACE,kBAAkB;MAClB,eAAe;MACf,6BAA6B;MAC7B,6BAA6B;MAC7B,eAAe,EAAE;MACjB;QACE,gBAAgB,EAAE;MACpB;QACE,yBAAyB,EAAE;EACjC;IACE,UAAU;IACV,WAAW;IACX,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB,EAAE;EAC3B;IACE,SAAS;IACT,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,iBAAiB,EAAE;IACnB;MACE,kBAAkB,EAAE;IACtB;MACE,qBAAqB;MACrB,kBAAkB;MAClB,aAAa,EAAE;MACf;QACE,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,cAAc,EAAE;;AAExB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE,EAAE;QACV;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,QAAQ;UACR,SAAS;UACT,yBAAyB;UACzB,oBAAoB;UACpB,WAAW;UACX,6BAA6B;UAC7B,SAAS;UACT,UAAU;UACV,YAAY;UACZ,kBAAkB;UAClB,oCAAoC,EAAE;QACxC;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,eAAe;UACf,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,gBAAgB;UAChB,WAAW;UACX,oBAAoB;UACpB,yBAAyB;UACzB,8BAA8B;UAC9B,kBAAkB;UAClB,UAAU;UACV,YAAY;UACZ,0BAA0B;UAC1B,kBAAkB;UAClB,mBAAmB,EAAE;;AAE/B;EACE,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,gBAAgB,EAAE;;AAEtB;EACE,aAAa,EAAE;EACf;IACE,aAAa;IACb,mBAAmB,EAAE;EACvB;IACE,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,6BAA6B;IAC7B,qBAAqB,EAAE;EACzB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,iBAAiB,EAAE;EACrB;IACE,cAAc;IACd,cAAc;IACd,WAAW;IACX,8BAA8B,EAAE;IAChC;MACE,aAAa,EAAE;IACjB;MACE,gBAAgB,EAAE;EACtB;IACE,wBAAwB;IACxB,SAAS;IACT,cAAc;IACd,qCAAqC;IACrC,kBAAkB,EAAE;IACpB;MACE,sBAAsB;MACtB,gBAAgB,EAAE;EACtB;IACE,aAAa;IACb,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB,EAAE;IACpB;MACE,eAAe;MACf,UAAU;MACV,SAAS;MACT,iBAAiB;MACjB,oBAAoB;MACpB,iBAAiB;MACjB,6BAA6B;MAC7B,SAAS,EAAE;MACX;QACE,aAAa,EAAE;IACnB;MACE,UAAU;MACV,SAAS;MACT,eAAe;MACf,kBAAkB;MAClB,gBAAgB;MAChB,uBAAuB;MACvB,SAAS,EAAE;EACf;IACE,cAAc;IACd,qBAAqB,EAAE;IACvB;MACE,0BAA0B,EAAE;EAChC;IACE,wBAAwB,EAAE;EAC5B;IACE,2BAA2B,EAAE;EAC/B;IACE,cAAc;IACd,WAAW;IACX,WAAW,EAAE;EACf;IACE,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,yBAAyB,EAAE;IAC3B;MACE,iBAAiB,EAAE;IACrB;MACE,iBAAiB;MACjB,yBAAyB,EAAE;;AAEjC;EACE,yBAAyB;EACzB,kBAAkB,EAAE;EACpB;IACE,sBAAsB,EAAE;EAC1B;IACE,6BAA6B;IAC7B,yBAAyB;IACzB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,gBAAgB,EAAE;IAClB;MACE,YAAY,EAAE;EAClB;IACE,aAAa,EAAE;;AAEnB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,UAAU;EACV,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,4CAA4C,EAAE;EAC9C;IACE,gBAAgB;IAChB,gCAAgC,EAAE;IAClC;MACE,2BAA2B;MAC3B,4BAA4B,EAAE;IAChC;MACE,+BAA+B;MAC/B,8BAA8B,EAAE;IAClC;MACE,YAAY;MACZ,yBAAyB,EAAE","file":"react-mde-all.css","sourcesContent":[".mde-header {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: stretch;\n border-bottom: 1px solid #c8ccd0;\n border-radius: 2px 2px 0 0;\n background: #f9f9f9; }\n .mde-header .mde-tabs {\n display: flex;\n flex-direction: row; }\n .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 6px 3px;\n background-color: transparent;\n border: 1px solid transparent;\n cursor: pointer; }\n .mde-header .mde-tabs button:first-child {\n margin-left: 6px; }\n .mde-header .mde-tabs button.selected {\n border: 1px solid #c8ccd0; }\n .mde-header .svg-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: inherit;\n overflow: visible;\n vertical-align: -.125em; }\n .mde-header ul.mde-header-group {\n margin: 0;\n padding: 10px;\n list-style: none;\n display: flex;\n flex-wrap: nowrap; }\n .mde-header ul.mde-header-group.hidden {\n visibility: hidden; }\n .mde-header ul.mde-header-group li.mde-header-item {\n display: inline-block;\n position: relative;\n margin: 0 4px; }\n .mde-header ul.mde-header-group li.mde-header-item button {\n text-align: left;\n cursor: pointer;\n height: 22px;\n padding: 4px;\n margin: 0;\n border: none;\n background: none;\n color: #242729; }\n\n@keyframes tooltip-appear {\n from {\n opacity: 0; }\n to {\n opacity: 1; } }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n opacity: 0;\n position: absolute;\n z-index: 1000001;\n width: 0;\n height: 0;\n color: rgba(0, 0, 0, 0.8);\n pointer-events: none;\n content: \"\";\n border: 5px solid transparent;\n top: -5px;\n right: 50%;\n bottom: auto;\n margin-right: -5px;\n border-top-color: rgba(0, 0, 0, 0.8); }\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\n animation-name: tooltip-appear;\n animation-duration: 0.2s;\n animation-delay: 0.5s;\n animation-fill-mode: forwards;\n font-size: 11px;\n opacity: 0;\n position: absolute;\n z-index: 1000000;\n padding: 5px 8px;\n color: #fff;\n pointer-events: none;\n content: attr(aria-label);\n background: rgba(0, 0, 0, 0.8);\n border-radius: 3px;\n right: 50%;\n bottom: 100%;\n transform: translateX(50%);\n margin-bottom: 5px;\n white-space: nowrap; }\n\n.mde-textarea-wrapper {\n position: relative; }\n .mde-textarea-wrapper textarea.mde-text {\n width: 100%;\n border: 0;\n padding: 10px;\n vertical-align: top;\n resize: none;\n overflow-y: auto; }\n\n.mde-preview .mde-preview-content {\n padding: 10px; }\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\n margin-top: 0;\n margin-bottom: 16px; }\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\n margin-top: 24px;\n margin-bottom: 16px;\n font-weight: 600;\n line-height: 1.25;\n border-bottom: 1px solid #eee;\n padding-bottom: 0.3em; }\n .mde-preview .mde-preview-content h1 {\n font-size: 1.6em; }\n .mde-preview .mde-preview-content h2 {\n font-size: 1.4em; }\n .mde-preview .mde-preview-content h3 {\n font-size: 1.2em; }\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\n padding-left: 2em; }\n .mde-preview .mde-preview-content blockquote {\n margin-left: 0;\n padding: 0 1em;\n color: #777;\n border-left: 0.25em solid #ddd; }\n .mde-preview .mde-preview-content blockquote > :first-child {\n margin-top: 0; }\n .mde-preview .mde-preview-content blockquote > :last-child {\n margin-bottom: 0; }\n .mde-preview .mde-preview-content code {\n padding: 0.2em 0 0.2em 0;\n margin: 0;\n font-size: 90%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px; }\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\n letter-spacing: -0.2em;\n content: \"\\00a0\"; }\n .mde-preview .mde-preview-content pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px; }\n .mde-preview .mde-preview-content pre code {\n display: inline;\n padding: 0;\n margin: 0;\n overflow: visible;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0; }\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\n content: none; }\n .mde-preview .mde-preview-content pre > code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0; }\n .mde-preview .mde-preview-content a {\n color: #4078c0;\n text-decoration: none; }\n .mde-preview .mde-preview-content a:hover {\n text-decoration: underline; }\n .mde-preview .mde-preview-content > *:first-child {\n margin-top: 0 !important; }\n .mde-preview .mde-preview-content > *:last-child {\n margin-bottom: 0 !important; }\n .mde-preview .mde-preview-content::after {\n display: table;\n clear: both;\n content: \"\"; }\n .mde-preview .mde-preview-content table {\n display: block;\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse; }\n .mde-preview .mde-preview-content table thead th {\n font-weight: bold; }\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\n padding: 6px 13px;\n border: 1px solid #c8ccd0; }\n\n.react-mde {\n border: 1px solid #c8ccd0;\n border-radius: 2px; }\n .react-mde * {\n box-sizing: border-box; }\n .react-mde .grip {\n border-top: 1px solid #c8ccd0;\n background-color: #f9f9f9;\n text-align: center;\n height: 10px;\n color: black;\n cursor: s-resize; }\n .react-mde .grip .icon {\n height: 10px; }\n .react-mde .invisible {\n display: none; }\n\nul.mde-suggestions {\n position: absolute;\n min-width: 180px;\n padding: 0;\n margin: 20px 0 0;\n list-style: none;\n cursor: pointer;\n background: #fff;\n border: 1px solid #c8ccd0;\n border-radius: 3px;\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\n ul.mde-suggestions li {\n padding: 4px 8px;\n border-bottom: 1px solid #e1e4e8; }\n ul.mde-suggestions li:first-child {\n border-top-left-radius: 2px;\n border-top-right-radius: 2px; }\n ul.mde-suggestions li:last-child {\n border-bottom-right-radius: 2px;\n border-bottom-left-radius: 2px; }\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\n color: white;\n background-color: #0366d6; }\n"]}]); +// Exports +module.exports = exports; + + /***/ }) }]); diff --git a/kibana-reports/target/public/0.plugin.js.map b/kibana-reports/target/public/0.plugin.js.map index e76b66ea..d0ff5aa5 100644 --- a/kibana-reports/target/public/0.plugin.js.map +++ b/kibana-reports/target/public/0.plugin.js.map @@ -1 +1 @@ -{"version":3,"file":"0.plugin.js","sources":["/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/cron-validator/lib/index.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/command-orchestrator.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/command-utils.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/listCommands.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/Preview.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/ReactMde.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/TextArea.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/Toolbar.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/grip-svg.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/components/index.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/icons/SvgIcon.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/icons/index.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/index.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/l18n/react-mde.en.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/Math.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/react-mde/lib/js/util/files.js","webpack:///./node_modules/react-mde/lib/styles/css/react-mde-all.css?e4ae","/plugin:opendistro_kibana_reports/plugins/kibana-reports/node_modules/showdown/dist/showdown.js"],"sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".mde-header {\\n flex-shrink: 0;\\n display: flex;\\n flex-wrap: wrap;\\n align-items: stretch;\\n border-bottom: 1px solid #c8ccd0;\\n border-radius: 2px 2px 0 0;\\n background: #f9f9f9; }\\n .mde-header .mde-tabs {\\n display: flex;\\n flex-direction: row; }\\n .mde-header .mde-tabs button {\\n border-radius: 2px;\\n margin: 6px 3px;\\n background-color: transparent;\\n border: 1px solid transparent;\\n cursor: pointer; }\\n .mde-header .mde-tabs button:first-child {\\n margin-left: 6px; }\\n .mde-header .mde-tabs button.selected {\\n border: 1px solid #c8ccd0; }\\n .mde-header .svg-icon {\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n font-size: inherit;\\n overflow: visible;\\n vertical-align: -.125em; }\\n .mde-header ul.mde-header-group {\\n margin: 0;\\n padding: 10px;\\n list-style: none;\\n display: flex;\\n flex-wrap: nowrap; }\\n .mde-header ul.mde-header-group.hidden {\\n visibility: hidden; }\\n .mde-header ul.mde-header-group li.mde-header-item {\\n display: inline-block;\\n position: relative;\\n margin: 0 4px; }\\n .mde-header ul.mde-header-group li.mde-header-item button {\\n text-align: left;\\n cursor: pointer;\\n height: 22px;\\n padding: 4px;\\n margin: 0;\\n border: none;\\n background: none;\\n color: #242729; }\\n\\n@keyframes tooltip-appear {\\n from {\\n opacity: 0; }\\n to {\\n opacity: 1; } }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000001;\\n width: 0;\\n height: 0;\\n color: rgba(0, 0, 0, 0.8);\\n pointer-events: none;\\n content: \\\"\\\";\\n border: 5px solid transparent;\\n top: -5px;\\n right: 50%;\\n bottom: auto;\\n margin-right: -5px;\\n border-top-color: rgba(0, 0, 0, 0.8); }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n font-size: 11px;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000000;\\n padding: 5px 8px;\\n color: #fff;\\n pointer-events: none;\\n content: attr(aria-label);\\n background: rgba(0, 0, 0, 0.8);\\n border-radius: 3px;\\n right: 50%;\\n bottom: 100%;\\n transform: translateX(50%);\\n margin-bottom: 5px;\\n white-space: nowrap; }\\n\\n.mde-textarea-wrapper {\\n position: relative; }\\n .mde-textarea-wrapper textarea.mde-text {\\n width: 100%;\\n border: 0;\\n padding: 10px;\\n vertical-align: top;\\n resize: none;\\n overflow-y: auto; }\\n\\n.mde-preview .mde-preview-content {\\n padding: 10px; }\\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\\n margin-top: 0;\\n margin-bottom: 16px; }\\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\\n margin-top: 24px;\\n margin-bottom: 16px;\\n font-weight: 600;\\n line-height: 1.25;\\n border-bottom: 1px solid #eee;\\n padding-bottom: 0.3em; }\\n .mde-preview .mde-preview-content h1 {\\n font-size: 1.6em; }\\n .mde-preview .mde-preview-content h2 {\\n font-size: 1.4em; }\\n .mde-preview .mde-preview-content h3 {\\n font-size: 1.2em; }\\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\\n padding-left: 2em; }\\n .mde-preview .mde-preview-content blockquote {\\n margin-left: 0;\\n padding: 0 1em;\\n color: #777;\\n border-left: 0.25em solid #ddd; }\\n .mde-preview .mde-preview-content blockquote > :first-child {\\n margin-top: 0; }\\n .mde-preview .mde-preview-content blockquote > :last-child {\\n margin-bottom: 0; }\\n .mde-preview .mde-preview-content code {\\n padding: 0.2em 0 0.2em 0;\\n margin: 0;\\n font-size: 90%;\\n background-color: rgba(0, 0, 0, 0.04);\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\\n letter-spacing: -0.2em;\\n content: \\\"\\\\00a0\\\"; }\\n .mde-preview .mde-preview-content pre {\\n padding: 16px;\\n overflow: auto;\\n font-size: 85%;\\n line-height: 1.45;\\n background-color: #f7f7f7;\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content pre code {\\n display: inline;\\n padding: 0;\\n margin: 0;\\n overflow: visible;\\n line-height: inherit;\\n word-wrap: normal;\\n background-color: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\\n content: none; }\\n .mde-preview .mde-preview-content pre > code {\\n padding: 0;\\n margin: 0;\\n font-size: 100%;\\n word-break: normal;\\n white-space: pre;\\n background: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content a {\\n color: #4078c0;\\n text-decoration: none; }\\n .mde-preview .mde-preview-content a:hover {\\n text-decoration: underline; }\\n .mde-preview .mde-preview-content > *:first-child {\\n margin-top: 0 !important; }\\n .mde-preview .mde-preview-content > *:last-child {\\n margin-bottom: 0 !important; }\\n .mde-preview .mde-preview-content::after {\\n display: table;\\n clear: both;\\n content: \\\"\\\"; }\\n .mde-preview .mde-preview-content table {\\n display: block;\\n width: 100%;\\n border-spacing: 0;\\n border-collapse: collapse; }\\n .mde-preview .mde-preview-content table thead th {\\n font-weight: bold; }\\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\\n padding: 6px 13px;\\n border: 1px solid #c8ccd0; }\\n\\n.react-mde {\\n border: 1px solid #c8ccd0;\\n border-radius: 2px; }\\n .react-mde * {\\n box-sizing: border-box; }\\n .react-mde .grip {\\n border-top: 1px solid #c8ccd0;\\n background-color: #f9f9f9;\\n text-align: center;\\n height: 10px;\\n color: black;\\n cursor: s-resize; }\\n .react-mde .grip .icon {\\n height: 10px; }\\n .react-mde .invisible {\\n display: none; }\\n\\nul.mde-suggestions {\\n position: absolute;\\n min-width: 180px;\\n padding: 0;\\n margin: 20px 0 0;\\n list-style: none;\\n cursor: pointer;\\n background: #fff;\\n border: 1px solid #c8ccd0;\\n border-radius: 3px;\\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\\n ul.mde-suggestions li {\\n padding: 4px 8px;\\n border-bottom: 1px solid #e1e4e8; }\\n ul.mde-suggestions li:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n ul.mde-suggestions li:last-child {\\n border-bottom-right-radius: 2px;\\n border-bottom-left-radius: 2px; }\\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\\n color: white;\\n background-color: #0366d6; }\\n\", \"\",{\"version\":3,\"sources\":[\"react-mde-all.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,cAAc;EACd,aAAa;EACb,eAAe;EACf,oBAAoB;EACpB,gCAAgC;EAChC,0BAA0B;EAC1B,mBAAmB,EAAE;EACrB;IACE,aAAa;IACb,mBAAmB,EAAE;IACrB;MACE,kBAAkB;MAClB,eAAe;MACf,6BAA6B;MAC7B,6BAA6B;MAC7B,eAAe,EAAE;MACjB;QACE,gBAAgB,EAAE;MACpB;QACE,yBAAyB,EAAE;EACjC;IACE,UAAU;IACV,WAAW;IACX,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB,EAAE;EAC3B;IACE,SAAS;IACT,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,iBAAiB,EAAE;IACnB;MACE,kBAAkB,EAAE;IACtB;MACE,qBAAqB;MACrB,kBAAkB;MAClB,aAAa,EAAE;MACf;QACE,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,cAAc,EAAE;;AAExB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE,EAAE;QACV;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,QAAQ;UACR,SAAS;UACT,yBAAyB;UACzB,oBAAoB;UACpB,WAAW;UACX,6BAA6B;UAC7B,SAAS;UACT,UAAU;UACV,YAAY;UACZ,kBAAkB;UAClB,oCAAoC,EAAE;QACxC;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,eAAe;UACf,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,gBAAgB;UAChB,WAAW;UACX,oBAAoB;UACpB,yBAAyB;UACzB,8BAA8B;UAC9B,kBAAkB;UAClB,UAAU;UACV,YAAY;UACZ,0BAA0B;UAC1B,kBAAkB;UAClB,mBAAmB,EAAE;;AAE/B;EACE,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,gBAAgB,EAAE;;AAEtB;EACE,aAAa,EAAE;EACf;IACE,aAAa;IACb,mBAAmB,EAAE;EACvB;IACE,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,6BAA6B;IAC7B,qBAAqB,EAAE;EACzB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,iBAAiB,EAAE;EACrB;IACE,cAAc;IACd,cAAc;IACd,WAAW;IACX,8BAA8B,EAAE;IAChC;MACE,aAAa,EAAE;IACjB;MACE,gBAAgB,EAAE;EACtB;IACE,wBAAwB;IACxB,SAAS;IACT,cAAc;IACd,qCAAqC;IACrC,kBAAkB,EAAE;IACpB;MACE,sBAAsB;MACtB,gBAAgB,EAAE;EACtB;IACE,aAAa;IACb,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB,EAAE;IACpB;MACE,eAAe;MACf,UAAU;MACV,SAAS;MACT,iBAAiB;MACjB,oBAAoB;MACpB,iBAAiB;MACjB,6BAA6B;MAC7B,SAAS,EAAE;MACX;QACE,aAAa,EAAE;IACnB;MACE,UAAU;MACV,SAAS;MACT,eAAe;MACf,kBAAkB;MAClB,gBAAgB;MAChB,uBAAuB;MACvB,SAAS,EAAE;EACf;IACE,cAAc;IACd,qBAAqB,EAAE;IACvB;MACE,0BAA0B,EAAE;EAChC;IACE,wBAAwB,EAAE;EAC5B;IACE,2BAA2B,EAAE;EAC/B;IACE,cAAc;IACd,WAAW;IACX,WAAW,EAAE;EACf;IACE,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,yBAAyB,EAAE;IAC3B;MACE,iBAAiB,EAAE;IACrB;MACE,iBAAiB;MACjB,yBAAyB,EAAE;;AAEjC;EACE,yBAAyB;EACzB,kBAAkB,EAAE;EACpB;IACE,sBAAsB,EAAE;EAC1B;IACE,6BAA6B;IAC7B,yBAAyB;IACzB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,gBAAgB,EAAE;IAClB;MACE,YAAY,EAAE;EAClB;IACE,aAAa,EAAE;;AAEnB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,UAAU;EACV,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,4CAA4C,EAAE;EAC9C;IACE,gBAAgB;IAChB,gCAAgC,EAAE;IAClC;MACE,2BAA2B;MAC3B,4BAA4B,EAAE;IAChC;MACE,+BAA+B;MAC/B,8BAA8B,EAAE;IAClC;MACE,YAAY;MACZ,yBAAyB,EAAE\",\"file\":\"react-mde-all.css\",\"sourcesContent\":[\".mde-header {\\n flex-shrink: 0;\\n display: flex;\\n flex-wrap: wrap;\\n align-items: stretch;\\n border-bottom: 1px solid #c8ccd0;\\n border-radius: 2px 2px 0 0;\\n background: #f9f9f9; }\\n .mde-header .mde-tabs {\\n display: flex;\\n flex-direction: row; }\\n .mde-header .mde-tabs button {\\n border-radius: 2px;\\n margin: 6px 3px;\\n background-color: transparent;\\n border: 1px solid transparent;\\n cursor: pointer; }\\n .mde-header .mde-tabs button:first-child {\\n margin-left: 6px; }\\n .mde-header .mde-tabs button.selected {\\n border: 1px solid #c8ccd0; }\\n .mde-header .svg-icon {\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n font-size: inherit;\\n overflow: visible;\\n vertical-align: -.125em; }\\n .mde-header ul.mde-header-group {\\n margin: 0;\\n padding: 10px;\\n list-style: none;\\n display: flex;\\n flex-wrap: nowrap; }\\n .mde-header ul.mde-header-group.hidden {\\n visibility: hidden; }\\n .mde-header ul.mde-header-group li.mde-header-item {\\n display: inline-block;\\n position: relative;\\n margin: 0 4px; }\\n .mde-header ul.mde-header-group li.mde-header-item button {\\n text-align: left;\\n cursor: pointer;\\n height: 22px;\\n padding: 4px;\\n margin: 0;\\n border: none;\\n background: none;\\n color: #242729; }\\n\\n@keyframes tooltip-appear {\\n from {\\n opacity: 0; }\\n to {\\n opacity: 1; } }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000001;\\n width: 0;\\n height: 0;\\n color: rgba(0, 0, 0, 0.8);\\n pointer-events: none;\\n content: \\\"\\\";\\n border: 5px solid transparent;\\n top: -5px;\\n right: 50%;\\n bottom: auto;\\n margin-right: -5px;\\n border-top-color: rgba(0, 0, 0, 0.8); }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n font-size: 11px;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000000;\\n padding: 5px 8px;\\n color: #fff;\\n pointer-events: none;\\n content: attr(aria-label);\\n background: rgba(0, 0, 0, 0.8);\\n border-radius: 3px;\\n right: 50%;\\n bottom: 100%;\\n transform: translateX(50%);\\n margin-bottom: 5px;\\n white-space: nowrap; }\\n\\n.mde-textarea-wrapper {\\n position: relative; }\\n .mde-textarea-wrapper textarea.mde-text {\\n width: 100%;\\n border: 0;\\n padding: 10px;\\n vertical-align: top;\\n resize: none;\\n overflow-y: auto; }\\n\\n.mde-preview .mde-preview-content {\\n padding: 10px; }\\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\\n margin-top: 0;\\n margin-bottom: 16px; }\\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\\n margin-top: 24px;\\n margin-bottom: 16px;\\n font-weight: 600;\\n line-height: 1.25;\\n border-bottom: 1px solid #eee;\\n padding-bottom: 0.3em; }\\n .mde-preview .mde-preview-content h1 {\\n font-size: 1.6em; }\\n .mde-preview .mde-preview-content h2 {\\n font-size: 1.4em; }\\n .mde-preview .mde-preview-content h3 {\\n font-size: 1.2em; }\\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\\n padding-left: 2em; }\\n .mde-preview .mde-preview-content blockquote {\\n margin-left: 0;\\n padding: 0 1em;\\n color: #777;\\n border-left: 0.25em solid #ddd; }\\n .mde-preview .mde-preview-content blockquote > :first-child {\\n margin-top: 0; }\\n .mde-preview .mde-preview-content blockquote > :last-child {\\n margin-bottom: 0; }\\n .mde-preview .mde-preview-content code {\\n padding: 0.2em 0 0.2em 0;\\n margin: 0;\\n font-size: 90%;\\n background-color: rgba(0, 0, 0, 0.04);\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\\n letter-spacing: -0.2em;\\n content: \\\"\\\\00a0\\\"; }\\n .mde-preview .mde-preview-content pre {\\n padding: 16px;\\n overflow: auto;\\n font-size: 85%;\\n line-height: 1.45;\\n background-color: #f7f7f7;\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content pre code {\\n display: inline;\\n padding: 0;\\n margin: 0;\\n overflow: visible;\\n line-height: inherit;\\n word-wrap: normal;\\n background-color: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\\n content: none; }\\n .mde-preview .mde-preview-content pre > code {\\n padding: 0;\\n margin: 0;\\n font-size: 100%;\\n word-break: normal;\\n white-space: pre;\\n background: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content a {\\n color: #4078c0;\\n text-decoration: none; }\\n .mde-preview .mde-preview-content a:hover {\\n text-decoration: underline; }\\n .mde-preview .mde-preview-content > *:first-child {\\n margin-top: 0 !important; }\\n .mde-preview .mde-preview-content > *:last-child {\\n margin-bottom: 0 !important; }\\n .mde-preview .mde-preview-content::after {\\n display: table;\\n clear: both;\\n content: \\\"\\\"; }\\n .mde-preview .mde-preview-content table {\\n display: block;\\n width: 100%;\\n border-spacing: 0;\\n border-collapse: collapse; }\\n .mde-preview .mde-preview-content table thead th {\\n font-weight: bold; }\\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\\n padding: 6px 13px;\\n border: 1px solid #c8ccd0; }\\n\\n.react-mde {\\n border: 1px solid #c8ccd0;\\n border-radius: 2px; }\\n .react-mde * {\\n box-sizing: border-box; }\\n .react-mde .grip {\\n border-top: 1px solid #c8ccd0;\\n background-color: #f9f9f9;\\n text-align: center;\\n height: 10px;\\n color: black;\\n cursor: s-resize; }\\n .react-mde .grip .icon {\\n height: 10px; }\\n .react-mde .invisible {\\n display: none; }\\n\\nul.mde-suggestions {\\n position: absolute;\\n min-width: 180px;\\n padding: 0;\\n margin: 20px 0 0;\\n list-style: none;\\n cursor: pointer;\\n background: #fff;\\n border: 1px solid #c8ccd0;\\n border-radius: 3px;\\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\\n ul.mde-suggestions li {\\n padding: 4px 8px;\\n border-bottom: 1px solid #e1e4e8; }\\n ul.mde-suggestions li:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n ul.mde-suggestions li:last-child {\\n border-bottom-right-radius: 2px;\\n border-bottom-left-radius: 2px; }\\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\\n color: white;\\n background-color: #0366d6; }\\n\"]}]);\n// Exports\nmodule.exports = exports;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// This comes from the fact that parseInt trims characters coming\n// after digits and consider it a valid int, so `1*` becomes `1`.\nvar safeParseInt = function (value) {\n if (/^\\d+$/.test(value)) {\n return Number(value);\n }\n else {\n return NaN;\n }\n};\nvar isWildcard = function (value) {\n return value === '*';\n};\nvar isQuestionMark = function (value) {\n return value === '?';\n};\nvar isInRange = function (value, start, stop) {\n return value >= start && value <= stop;\n};\nvar isValidRange = function (value, start, stop) {\n var sides = value.split('-');\n switch (sides.length) {\n case 1:\n return isWildcard(value) || isInRange(safeParseInt(value), start, stop);\n case 2:\n var _a = sides.map(function (side) { return safeParseInt(side); }), small = _a[0], big = _a[1];\n return small <= big && isInRange(small, start, stop) && isInRange(big, start, stop);\n default:\n return false;\n }\n};\nvar isValidStep = function (value) {\n return value === undefined || value.search(/[^\\d]/) === -1;\n};\nvar validateForRange = function (value, start, stop) {\n if (value.search(/[^\\d-,\\/*]/) !== -1) {\n return false;\n }\n var list = value.split(',');\n return list.every(function (condition) {\n var splits = condition.split('/');\n // Prevents `*/ * * * *` from being accepted.\n if (condition.trim().endsWith('/')) {\n return false;\n }\n // Prevents `*/*/* * * * *` from being accepted\n if (splits.length > 2) {\n return false;\n }\n // If we don't have a `/`, right will be undefined which is considered a valid step if we don't a `/`.\n var left = splits[0], right = splits[1];\n return isValidRange(left, start, stop) && isValidStep(right);\n });\n};\nvar hasValidSeconds = function (seconds) {\n return validateForRange(seconds, 0, 59);\n};\nvar hasValidMinutes = function (minutes) {\n return validateForRange(minutes, 0, 59);\n};\nvar hasValidHours = function (hours) {\n return validateForRange(hours, 0, 23);\n};\nvar hasValidDays = function (days, allowBlankDay) {\n return (allowBlankDay && isQuestionMark(days)) || validateForRange(days, 1, 31);\n};\nvar monthAlias = {\n jan: '1',\n feb: '2',\n mar: '3',\n apr: '4',\n may: '5',\n jun: '6',\n jul: '7',\n aug: '8',\n sep: '9',\n oct: '10',\n nov: '11',\n dec: '12'\n};\nvar hasValidMonths = function (months, alias) {\n // Prevents alias to be used as steps\n if (months.search(/\\/[a-zA-Z]/) !== -1) {\n return false;\n }\n if (alias) {\n var remappedMonths = months.toLowerCase().replace(/[a-z]{3}/g, function (match) {\n return monthAlias[match] === undefined ? match : monthAlias[match];\n });\n // If any invalid alias was used, it won't pass the other checks as there will be non-numeric values in the months\n return validateForRange(remappedMonths, 1, 12);\n }\n return validateForRange(months, 1, 12);\n};\nvar weekdaysAlias = {\n sun: '0',\n mon: '1',\n tue: '2',\n wed: '3',\n thu: '4',\n fri: '5',\n sat: '6'\n};\nvar hasValidWeekdays = function (weekdays, alias, allowBlankDay) {\n // If there is a question mark, checks if the allowBlankDay flag is set\n if (allowBlankDay && isQuestionMark(weekdays)) {\n return true;\n }\n else if (!allowBlankDay && isQuestionMark(weekdays)) {\n return false;\n }\n // Prevents alias to be used as steps\n if (weekdays.search(/\\/[a-zA-Z]/) !== -1) {\n return false;\n }\n if (alias) {\n var remappedWeekdays = weekdays.toLowerCase().replace(/[a-z]{3}/g, function (match) {\n return weekdaysAlias[match] === undefined ? match : weekdaysAlias[match];\n });\n // If any invalid alias was used, it won't pass the other checks as there will be non-numeric values in the weekdays\n return validateForRange(remappedWeekdays, 0, 6);\n }\n return validateForRange(weekdays, 0, 6);\n};\nvar hasCompatibleDayFormat = function (days, weekdays, allowBlankDay) {\n return !(allowBlankDay && isQuestionMark(days) && isQuestionMark(weekdays));\n};\nvar split = function (cron) {\n return cron.trim().split(/\\s+/);\n};\nvar defaultOptions = {\n alias: false,\n seconds: false,\n allowBlankDay: false\n};\nexports.isValidCron = function (cron, options) {\n options = __assign(__assign({}, defaultOptions), options);\n var splits = split(cron);\n if (splits.length > (options.seconds ? 6 : 5) || splits.length < 5) {\n return false;\n }\n var checks = [];\n if (splits.length === 6) {\n var seconds = splits.shift();\n if (seconds) {\n checks.push(hasValidSeconds(seconds));\n }\n }\n // We could only check the steps gradually and return false on the first invalid block,\n // However, this won't have any performance impact so why bother for now.\n var minutes = splits[0], hours = splits[1], days = splits[2], months = splits[3], weekdays = splits[4];\n checks.push(hasValidMinutes(minutes));\n checks.push(hasValidHours(hours));\n checks.push(hasValidDays(days, options.allowBlankDay));\n checks.push(hasValidMonths(months, options.alias));\n checks.push(hasValidWeekdays(weekdays, options.alias, options.allowBlankDay));\n checks.push(hasCompatibleDayFormat(days, weekdays, options.allowBlankDay));\n return checks.every(Boolean);\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar __1 = require(\"..\");\nvar InsertTextAtPosition_1 = require(\"../util/InsertTextAtPosition\");\nvar command_utils_1 = require(\"./command-utils\");\nvar defaults_1 = require(\"./default-commands/defaults\");\nvar TextAreaTextApi = /** @class */ (function () {\n function TextAreaTextApi(textAreaRef) {\n this.textAreaRef = textAreaRef;\n }\n TextAreaTextApi.prototype.replaceSelection = function (text) {\n var textArea = this.textAreaRef.current;\n InsertTextAtPosition_1.insertText(textArea, text);\n return getStateFromTextArea(textArea);\n };\n TextAreaTextApi.prototype.setSelectionRange = function (selection) {\n var textArea = this.textAreaRef.current;\n textArea.focus();\n textArea.selectionStart = selection.start;\n textArea.selectionEnd = selection.end;\n return getStateFromTextArea(textArea);\n };\n TextAreaTextApi.prototype.getState = function () {\n var textArea = this.textAreaRef.current;\n return getStateFromTextArea(textArea);\n };\n return TextAreaTextApi;\n}());\nexports.TextAreaTextApi = TextAreaTextApi;\nfunction getStateFromTextArea(textArea) {\n return {\n selection: {\n start: textArea.selectionStart,\n end: textArea.selectionEnd\n },\n text: textArea.value,\n selectedText: textArea.value.slice(textArea.selectionStart, textArea.selectionEnd)\n };\n}\nexports.getStateFromTextArea = getStateFromTextArea;\nvar CommandOrchestrator = /** @class */ (function () {\n function CommandOrchestrator(customCommands, textArea, l18n, pasteOptions) {\n var _this = this;\n this.getCommand = function (name) {\n var command = _this.commandMap[name];\n if (!command) {\n throw new Error(\"Cannot execute command. Command not found: \" + name);\n }\n return command;\n };\n /**\n * Tries to find a command the wants to handle the keyboard event.\n * If a command is found, it is executed and the function returns\n */\n this.handlePossibleKeyCommand = function (e) {\n for (var _i = 0, _a = _this.keyActivatedCommands; _i < _a.length; _i++) {\n var commandName = _a[_i];\n if (_this.getCommand(commandName).handleKeyCommand(e)) {\n _this.executeCommand(commandName).then(function (r) { });\n return true;\n }\n }\n return false;\n };\n if (pasteOptions && !pasteOptions.saveImage) {\n throw new Error(\"paste options are incomplete. saveImage are required \");\n }\n this.commandMap = __assign(__assign({}, __1.getDefaultCommandMap()), (customCommands || {}));\n this.pasteOptions = pasteOptions;\n this.keyActivatedCommands = command_utils_1.extractKeyActivatedCommands(customCommands);\n this.textAreaRef = textArea;\n this.textApi = new TextAreaTextApi(textArea);\n this.l18n = l18n;\n }\n CommandOrchestrator.prototype.executeCommand = function (commandName, context) {\n return __awaiter(this, void 0, void 0, function () {\n var command, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.isExecuting) {\n // The simplest thing to do is to ignore commands while\n // there is already a command executing. The alternative would be to queue commands\n // but there is no guarantee that the state after one command executes will still be compatible\n // with the next one. In fact, it is likely not to be.\n return [2 /*return*/];\n }\n this.isExecuting = true;\n command = this.commandMap[commandName];\n result = command.execute({\n initialState: getStateFromTextArea(this.textAreaRef.current),\n textApi: this.textApi,\n l18n: this.l18n,\n context: context\n });\n return [4 /*yield*/, result];\n case 1:\n _a.sent();\n this.isExecuting = false;\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Executes the paste command\n */\n CommandOrchestrator.prototype.executePasteCommand = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (this.pasteOptions) {\n return [2 /*return*/, this.executeCommand(this.pasteOptions.command || defaults_1.getDefaultSaveImageCommandName(), {\n saveImage: this.pasteOptions.saveImage,\n event: event\n })];\n }\n return [2 /*return*/];\n });\n });\n };\n /**\n * Returns a command by name\n * @param name\n */\n CommandOrchestrator.prototype.getCommandByName = function (name) {\n return this.commandMap[name];\n };\n return CommandOrchestrator;\n}());\nexports.CommandOrchestrator = CommandOrchestrator;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Returns a flat array of commands that can be activated by the keyboard.\n * When keydowns happen, these commands 'handleKeyCommand' will be executed, in this order,\n * and the first that returns true will be executed.\n */\nfunction extractKeyActivatedCommands(commandMap) {\n var result = [];\n for (var command in commandMap) {\n if (commandMap.hasOwnProperty(command)) {\n if (commandMap[command].handleKeyCommand) {\n result.push(command);\n }\n }\n }\n return result;\n}\nexports.extractKeyActivatedCommands = extractKeyActivatedCommands;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.boldCommand = {\n buttonProps: { \"aria-label\": \"Add bold text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the bold mark up\n var state2 = textApi.replaceSelection(\"**\" + state1.selectedText + \"**\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state2.selection.end - 2 - state1.selectedText.length,\n end: state2.selection.end - 2\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"b\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.codeCommand = {\n buttonProps: { \"aria-label\": \"Insert code\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // when there's no breaking line\n if (state1.selectedText.indexOf(\"\\n\") === -1) {\n textApi.replaceSelection(\"`\" + state1.selectedText + \"`\");\n // Adjust the selection to not contain the **\n var selectionStart_1 = state1.selection.start + 1;\n var selectionEnd_1 = selectionStart_1 + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart_1,\n end: selectionEnd_1\n });\n return;\n }\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n textApi.replaceSelection(breaksBefore + \"```\\n\" + state1.selectedText + \"\\n```\" + breaksAfter);\n var selectionStart = state1.selection.start + breaksBeforeCount + 4;\n var selectionEnd = selectionStart + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar headerCommand_1 = require(\"./headerCommand\");\nvar boldCommand_1 = require(\"./boldCommand\");\nvar italicCommand_1 = require(\"./italicCommand\");\nvar strikeThroughCommand_1 = require(\"./strikeThroughCommand\");\nvar linkCommand_1 = require(\"./linkCommand\");\nvar quoteCommand_1 = require(\"./quoteCommand\");\nvar codeCommand_1 = require(\"./codeCommand\");\nvar listCommands_1 = require(\"./listCommands\");\nvar imageCommand_1 = require(\"./imageCommand\");\nvar save_image_command_1 = require(\"./save-image-command\");\nfunction getDefaultToolbarCommands() {\n return [\n [\"header\", \"bold\", \"italic\", \"strikethrough\"],\n [\"link\", \"quote\", \"code\", \"image\"],\n [\"unordered-list\", \"ordered-list\", \"checked-list\"]\n ];\n}\nexports.getDefaultToolbarCommands = getDefaultToolbarCommands;\nfunction getDefaultCommandMap() {\n return {\n header: headerCommand_1.headerCommand,\n bold: boldCommand_1.boldCommand,\n italic: italicCommand_1.italicCommand,\n strikethrough: strikeThroughCommand_1.strikeThroughCommand,\n link: linkCommand_1.linkCommand,\n quote: quoteCommand_1.quoteCommand,\n code: codeCommand_1.codeCommand,\n image: imageCommand_1.imageCommand,\n \"unordered-list\": listCommands_1.unorderedListCommand,\n \"ordered-list\": listCommands_1.orderedListCommand,\n \"checked-list\": listCommands_1.checkedListCommand,\n \"save-image\": save_image_command_1.saveImageCommand\n };\n}\nexports.getDefaultCommandMap = getDefaultCommandMap;\nfunction getDefaultSaveImageCommandName() {\n return \"save-image\";\n}\nexports.getDefaultSaveImageCommandName = getDefaultSaveImageCommandName;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nfunction setHeader(initialState, api, prefix) {\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = api.setSelectionRange(newSelectionRange);\n // Add the prefix to the selection\n var state2 = api.replaceSelection(\"\" + prefix + state1.selectedText);\n // Adjust the selection to not contain the prefix\n api.setSelectionRange({\n start: state2.selection.end - state1.selectedText.length,\n end: state2.selection.end\n });\n}\nexports.headerCommand = {\n buttonProps: { \"aria-label\": \"Add header\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n setHeader(initialState, textApi, \"### \");\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.imageCommand = {\n buttonProps: { \"aria-label\": \"Add image\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Replaces the current selection with the whole word selected\n var state1 = textApi.setSelectionRange(MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n }));\n // Replaces the current selection with the image\n var imageTemplate = state1.selectedText || \"https://example.com/your-image.png\";\n textApi.replaceSelection(\"![](\" + imageTemplate + \")\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state1.selection.start + 4,\n end: state1.selection.start + 4 + imageTemplate.length\n });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.italicCommand = {\n buttonProps: { \"aria-label\": \"Add italic text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the italic mark up\n var state2 = textApi.replaceSelection(\"*\" + state1.selectedText + \"*\");\n // Adjust the selection to not contain the *\n textApi.setSelectionRange({\n start: state2.selection.end - 1 - state1.selectedText.length,\n end: state2.selection.end - 1\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"i\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.linkCommand = {\n buttonProps: { \"aria-label\": \"Add a link\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the bold mark up\n var state2 = textApi.replaceSelection(\"[\" + state1.selectedText + \"](url)\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state2.selection.end - 6 - state1.selectedText.length,\n end: state2.selection.end - 6\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"k\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\n/**\n * Inserts insertionString before each line\n */\nfunction insertBeforeEachLine(selectedText, insertBefore) {\n var lines = selectedText.split(/\\n/);\n var insertionLength = 0;\n var modifiedText = lines\n .map(function (item, index) {\n if (typeof insertBefore === \"string\") {\n insertionLength += insertBefore.length;\n return insertBefore + item;\n }\n else if (typeof insertBefore === \"function\") {\n var insertionResult = insertBefore(item, index);\n insertionLength += insertionResult.length;\n return insertBefore(item, index) + item;\n }\n throw Error(\"insertion is expected to be either a string or a function\");\n })\n .join(\"\\n\");\n return { modifiedText: modifiedText, insertionLength: insertionLength };\n}\nexports.insertBeforeEachLine = insertBeforeEachLine;\nexports.makeList = function (state0, api, insertBefore) {\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: state0.text,\n selection: state0.selection\n });\n var state1 = api.setSelectionRange(newSelectionRange);\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n var modifiedText = insertBeforeEachLine(state1.selectedText, insertBefore);\n api.replaceSelection(\"\" + breaksBefore + modifiedText.modifiedText + breaksAfter);\n // Specifically when the text has only one line, we can exclude the \"- \", for example, from the selection\n var oneLinerOffset = state1.selectedText.indexOf(\"\\n\") === -1 ? modifiedText.insertionLength : 0;\n var selectionStart = state1.selection.start + breaksBeforeCount + oneLinerOffset;\n var selectionEnd = selectionStart + modifiedText.modifiedText.length - oneLinerOffset;\n // Adjust the selection to not contain the **\n api.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n};\nexports.unorderedListCommand = {\n buttonProps: { \"aria-label\": \"Add unordered list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, \"- \");\n }\n};\nexports.orderedListCommand = {\n buttonProps: { \"aria-label\": \"Add ordered list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, function (item, index) { return index + 1 + \". \"; });\n }\n};\nexports.checkedListCommand = {\n buttonProps: { \"aria-label\": \"Add checked list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, function (item, index) { return \"- [ ] \"; });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.quoteCommand = {\n buttonProps: { \"aria-label\": \"Insert a quote\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n // Replaces the current selection with the quote mark up\n textApi.replaceSelection(breaksBefore + \"> \" + state1.selectedText + breaksAfter);\n var selectionStart = state1.selection.start + breaksBeforeCount + 2;\n var selectionEnd = selectionStart + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n }\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar files_1 = require(\"../../util/files\");\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.saveImageCommand = {\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi, context = _a.context, l18n = _a.l18n;\n return __awaiter(this, void 0, void 0, function () {\n var pasteContext, event, saveImage, items, _b, _c, _i, index, item, breaksBeforeCount, breaksBefore, placeHolder, blob, blobContents, savingImage, imageUrl, newState, uploadingText, realImageMarkdown, selectionDelta;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!context && !isPasteContext(context)) {\n throw new Error(\"wrong context\");\n }\n pasteContext = context;\n event = pasteContext.event, saveImage = pasteContext.saveImage;\n items = event.clipboardData.items;\n _b = [];\n for (_c in items)\n _b.push(_c);\n _i = 0;\n _d.label = 1;\n case 1:\n if (!(_i < _b.length)) return [3 /*break*/, 5];\n index = _b[_i];\n item = items[index];\n if (!(item.kind === \"file\")) return [3 /*break*/, 4];\n breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(initialState.text, initialState.selection.start);\n breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n placeHolder = breaksBefore + \"![\" + l18n.uploadingImage + \"]()\";\n textApi.replaceSelection(placeHolder);\n blob = item.getAsFile();\n return [4 /*yield*/, files_1.readFileAsync(blob)];\n case 2:\n blobContents = _d.sent();\n savingImage = saveImage(blobContents);\n return [4 /*yield*/, savingImage.next()];\n case 3:\n imageUrl = (_d.sent()).value;\n newState = textApi.getState();\n uploadingText = newState.text.substr(initialState.selection.start, placeHolder.length);\n if (uploadingText === placeHolder) {\n // In this case, the user did not touch the placeholder. Good user\n // we will replace it with the real one that came from the server\n textApi.setSelectionRange({\n start: initialState.selection.start,\n end: initialState.selection.start + placeHolder.length\n });\n realImageMarkdown = breaksBefore + \"![image](\" + imageUrl + \")\";\n selectionDelta = realImageMarkdown.length - placeHolder.length;\n textApi.replaceSelection(realImageMarkdown);\n textApi.setSelectionRange({\n start: newState.selection.start + selectionDelta,\n end: newState.selection.end + selectionDelta\n });\n }\n _d.label = 4;\n case 4:\n _i++;\n return [3 /*break*/, 1];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n};\nfunction isPasteContext(context) {\n return context.type === \"paste\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.strikeThroughCommand = {\n buttonProps: { \"aria-label\": \"Add strikethrough text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the strikethrough mark up\n var state2 = textApi.replaceSelection(\"~~\" + state1.selectedText + \"~~\");\n // Adjust the selection to not contain the ~~\n textApi.setSelectionRange({\n start: state2.selection.end - 2 - state1.selectedText.length,\n end: state2.selection.end - 2\n });\n }\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar Preview = /** @class */ (function (_super) {\n __extends(Preview, _super);\n function Preview(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n loading: true\n };\n return _this;\n }\n Preview.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, markdown = _a.markdown, generateMarkdownPreview = _a.generateMarkdownPreview;\n generateMarkdownPreview(markdown).then(function (preview) {\n _this.setState({\n preview: preview,\n loading: false\n });\n });\n };\n Preview.prototype.componentWillReceiveProps = function (nextProps) {\n var _this = this;\n if (nextProps.markdown !== this.props.markdown) {\n nextProps.generateMarkdownPreview(nextProps.markdown).then(function (preview) {\n _this.setState({\n preview: preview,\n loading: false\n });\n });\n }\n };\n Preview.prototype.render = function () {\n var _a = this.props, classes = _a.classes, minHeight = _a.minHeight, loadingPreview = _a.loadingPreview, refObject = _a.refObject;\n var _b = this.state, preview = _b.preview, loading = _b.loading;\n var finalHtml = loading ? loadingPreview : preview;\n var content;\n if (typeof finalHtml === \"string\") {\n content = (React.createElement(\"div\", { className: \"mde-preview-content\", dangerouslySetInnerHTML: { __html: finalHtml || \"

 

\" }, ref: refObject }));\n }\n else {\n content = React.createElement(\"div\", { className: \"mde-preview-content\" }, finalHtml);\n }\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"mde-preview\", classes, { loading: loading }), style: { minHeight: minHeight + 10 }, \"data-testid\": \"mde-preview\" }, content));\n };\n return Preview;\n}(React.Component));\nexports.Preview = Preview;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar _1 = require(\".\");\nvar defaults_1 = require(\"../commands/default-commands/defaults\");\nvar react_mde_en_1 = require(\"../l18n/react-mde.en\");\nvar icons_1 = require(\"../icons\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar command_orchestrator_1 = require(\"../commands/command-orchestrator\");\nvar grip_svg_1 = require(\"./grip-svg\");\nvar ReactMde = /** @class */ (function (_super) {\n __extends(ReactMde, _super);\n function ReactMde(props) {\n var _a;\n var _this = _super.call(this, props) || this;\n // resizeYStart will be null when it is not resizing\n _this.gripDrag = null;\n _this.handleTextChange = function (value) {\n var onChange = _this.props.onChange;\n onChange(value);\n };\n _this.handleGripMouseDown = function (event) {\n _this.gripDrag = {\n originalHeight: _this.state.editorHeight,\n originalDragY: event.clientY\n };\n };\n _this.handleGripMouseUp = function () {\n _this.gripDrag = null;\n };\n _this.handleGripMouseMove = function (event) {\n if (_this.gripDrag !== null) {\n var newHeight = _this.gripDrag.originalHeight +\n event.clientY -\n _this.gripDrag.originalDragY;\n if (newHeight >= _this.props.minEditorHeight &&\n newHeight <= _this.props.maxEditorHeight) {\n _this.setState(__assign(__assign({}, _this.state), { editorHeight: _this.gripDrag.originalHeight +\n (event.clientY - _this.gripDrag.originalDragY) }));\n }\n }\n };\n _this.handlePaste = function (event) { return __awaiter(_this, void 0, void 0, function () {\n var paste;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n paste = this.props.paste;\n if (!paste || !paste.saveImage) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, this.commandOrchestrator.executePasteCommand(event)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n _this.handleTabChange = function (newTab) {\n var onTabChange = _this.props.onTabChange;\n onTabChange(newTab);\n };\n _this.handleCommand = function (commandName) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.commandOrchestrator.executeCommand(commandName)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n _this.finalRefs = __assign({}, (props.refs || {}));\n if (!_this.finalRefs.textarea) {\n _this.finalRefs.textarea = React.createRef();\n }\n if (!_this.finalRefs.preview) {\n _this.finalRefs.preview = React.createRef();\n }\n _this.commandOrchestrator = new command_orchestrator_1.CommandOrchestrator(_this.props.commands, _this.finalRefs.textarea, _this.props.l18n, _this.props.paste);\n var minEditorHeight = Math.min(props.maxEditorHeight, props.minEditorHeight);\n _this.state = {\n editorHeight: (_a = props.initialEditorHeight, (_a !== null && _a !== void 0 ? _a : minEditorHeight))\n };\n return _this;\n }\n ReactMde.prototype.componentDidMount = function () {\n document.addEventListener(\"mousemove\", this.handleGripMouseMove);\n document.addEventListener(\"mouseup\", this.handleGripMouseUp);\n };\n ReactMde.prototype.render = function () {\n var _this = this;\n var _a, _b, _c, _d, _e, _f;\n var _g = this.props, getIcon = _g.getIcon, toolbarCommands = _g.toolbarCommands, classes = _g.classes, loadingPreview = _g.loadingPreview, readOnly = _g.readOnly, disablePreview = _g.disablePreview, value = _g.value, l18n = _g.l18n, minPreviewHeight = _g.minPreviewHeight, childProps = _g.childProps, selectedTab = _g.selectedTab, generateMarkdownPreview = _g.generateMarkdownPreview, loadSuggestions = _g.loadSuggestions, suggestionTriggerCharacters = _g.suggestionTriggerCharacters, textAreaComponent = _g.textAreaComponent;\n var finalChildProps = childProps || {};\n var toolbarButtons = toolbarCommands.map(function (group) {\n return group.map(function (commandName) {\n var command = _this.commandOrchestrator.getCommand(commandName);\n return {\n commandName: commandName,\n buttonContent: command.icon\n ? command.icon(getIcon)\n : getIcon(commandName),\n buttonProps: command.buttonProps,\n buttonComponentClass: command.buttonComponentClass\n };\n });\n });\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"react-mde\", \"react-mde-tabbed-layout\", (_a = classes) === null || _a === void 0 ? void 0 : _a.reactMde) },\n React.createElement(_1.Toolbar, { classes: (_b = classes) === null || _b === void 0 ? void 0 : _b.toolbar, buttons: toolbarButtons, onCommand: this.handleCommand, onTabChange: this.handleTabChange, tab: selectedTab, readOnly: readOnly, disablePreview: disablePreview, l18n: l18n, buttonProps: finalChildProps.commandButtons, writeButtonProps: finalChildProps.writeButton, previewButtonProps: finalChildProps.previewButton }),\n React.createElement(\"div\", { className: ClassNames_1.classNames({ invisible: selectedTab !== \"write\" }) },\n React.createElement(_1.TextArea, { classes: (_c = classes) === null || _c === void 0 ? void 0 : _c.textArea, suggestionsDropdownClasses: (_d = classes) === null || _d === void 0 ? void 0 : _d.suggestionsDropdown, refObject: this.finalRefs.textarea, onChange: this.handleTextChange, onPaste: this.handlePaste, readOnly: readOnly, textAreaComponent: textAreaComponent, textAreaProps: childProps && childProps.textArea, height: this.state.editorHeight, value: value, suggestionTriggerCharacters: suggestionTriggerCharacters, loadSuggestions: loadSuggestions, onPossibleKeyCommand: this.commandOrchestrator.handlePossibleKeyCommand }),\n React.createElement(\"div\", { className: ClassNames_1.classNames(\"grip\", (_e = classes) === null || _e === void 0 ? void 0 : _e.grip), onMouseDown: this.handleGripMouseDown },\n React.createElement(grip_svg_1.GripSvg, null))),\n selectedTab !== \"write\" && (React.createElement(_1.Preview, { classes: (_f = classes) === null || _f === void 0 ? void 0 : _f.preview, refObject: this.finalRefs.preview, loadingPreview: loadingPreview, minHeight: minPreviewHeight, generateMarkdownPreview: generateMarkdownPreview, markdown: value }))));\n };\n ReactMde.defaultProps = {\n commands: defaults_1.getDefaultCommandMap(),\n toolbarCommands: defaults_1.getDefaultToolbarCommands(),\n getIcon: function (name) { return React.createElement(icons_1.SvgIcon, { icon: name }); },\n readOnly: false,\n l18n: react_mde_en_1.enL18n,\n minEditorHeight: 200,\n maxEditorHeight: 500,\n minPreviewHeight: 200,\n selectedTab: \"write\",\n disablePreview: false,\n suggestionTriggerCharacters: [\"@\"]\n };\n return ReactMde;\n}(React.Component));\nexports.ReactMde = ReactMde;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar react_1 = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nexports.SuggestionsDropdown = function (_a) {\n var classes = _a.classes, suggestions = _a.suggestions, caret = _a.caret, onSuggestionSelected = _a.onSuggestionSelected, focusIndex = _a.focusIndex, textAreaRef = _a.textAreaRef;\n var handleSuggestionClick = react_1.useCallback(function (event) {\n event.preventDefault();\n var index = parseInt(event.currentTarget.attributes[\"data-index\"].value);\n onSuggestionSelected(index);\n }, [suggestions]);\n // onMouseDown should be cancelled because onClick will handle it propertly. This way, the textarea does not lose\n // focus\n var handleMouseDown = react_1.useCallback(function (event) { return event.preventDefault(); }, []);\n return (React.createElement(\"ul\", { className: ClassNames_1.classNames(\"mde-suggestions\", classes), style: {\n left: caret.left - textAreaRef.current.scrollLeft,\n top: caret.top - textAreaRef.current.scrollTop\n } }, suggestions.map(function (s, i) { return (React.createElement(\"li\", { onClick: handleSuggestionClick, onMouseDown: handleMouseDown, key: i, \"aria-selected\": focusIndex === i ? \"true\" : \"false\", \"data-index\": \"\" + i }, s.preview)); })));\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar TextAreaCaretPosition_1 = require(\"../util/TextAreaCaretPosition\");\nvar InsertTextAtPosition_1 = require(\"../util/InsertTextAtPosition\");\nvar Math_1 = require(\"../util/Math\");\nvar SuggestionsDropdown_1 = require(\"./SuggestionsDropdown\");\nvar TextArea = /** @class */ (function (_super) {\n __extends(TextArea, _super);\n function TextArea(props) {\n var _this = _super.call(this, props) || this;\n _this.currentLoadSuggestionsPromise = Promise.resolve(undefined);\n /**\n * suggestionsPromiseIndex exists as a means to cancel what happens when the suggestions promise finishes loading.\n *\n * When the user is searching for suggestions, there is a promise that, when resolved, causes a re-render.\n * However, in case there is another promise to be resolved after the current one, it does not make sense to re-render\n * only to re-render again after the next one is complete.\n *\n * When there is a promise loading and the user cancels the suggestion, you don't want the status to go back to \"active\"\n * when the promise resolves.\n *\n * suggestionsPromiseIndex increments every time the mentions query\n */\n _this.suggestionsPromiseIndex = 0;\n _this.getTextArea = function () {\n return _this.props.refObject.current;\n };\n _this.handleOnChange = function (event) {\n var onChange = _this.props.onChange;\n onChange(event.target.value);\n };\n _this.handleBlur = function () {\n var mention = _this.state.mention;\n if (mention) {\n _this.setState({ mention: { status: \"inactive\", suggestions: [] } });\n }\n };\n _this.startLoadingSuggestions = function (text) {\n var promiseIndex = ++_this.suggestionsPromiseIndex;\n var loadSuggestions = _this.props.loadSuggestions;\n _this.currentLoadSuggestionsPromise = _this.currentLoadSuggestionsPromise\n .then(function () { return loadSuggestions(text, _this.state.mention.triggeredBy); })\n .then(function (suggestions) {\n if (_this.state.mention.status === \"inactive\") {\n // This means this promise resolved too late when the status has already been set to inactice\n return;\n }\n else if (_this.suggestionsPromiseIndex === promiseIndex) {\n if (!suggestions || !suggestions.length) {\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n }\n else {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"active\", suggestions: suggestions, focusIndex: 0 })\n });\n }\n _this.suggestionsPromiseIndex = 0;\n }\n return Promise.resolve();\n });\n };\n _this.loadEmptySuggestion = function (target, key) {\n var caret = TextAreaCaretPosition_1.getCaretCoordinates(target, key);\n _this.startLoadingSuggestions(\"\");\n _this.setState({\n mention: {\n status: \"loading\",\n startPosition: target.selectionStart + 1,\n caret: caret,\n suggestions: [],\n triggeredBy: key\n }\n });\n };\n _this.handleSuggestionSelected = function (index) {\n var mention = _this.state.mention;\n _this.getTextArea().selectionStart = mention.startPosition - 1;\n var textForInsert = _this.props.value.substr(_this.getTextArea().selectionStart, _this.getTextArea().selectionEnd - _this.getTextArea().selectionStart);\n InsertTextAtPosition_1.insertText(_this.getTextArea(), mention.suggestions[index].value + \" \");\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n };\n _this.handleKeyDown = function (event) {\n if (_this.props.onPossibleKeyCommand) {\n var handled = _this.props.onPossibleKeyCommand(event);\n if (handled) {\n event.preventDefault();\n // If the keydown resulted in a command being executed, we will just close the suggestions if they are open.\n // Resetting suggestionsPromiseIndex will cause any promise that is yet to be resolved to have no effect\n // when they finish loading.\n // TODO: The code below is duplicate, we need to clean this up\n _this.suggestionsPromiseIndex = 0;\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n return;\n }\n }\n if (!_this.suggestionsEnabled()) {\n return;\n }\n var key = event.key, shiftKey = event.shiftKey, currentTarget = event.currentTarget;\n var selectionStart = currentTarget.selectionStart;\n var mention = _this.state.mention;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \"Escape\" ||\n (key === \"Backspace\" &&\n selectionStart <= _this.state.mention.startPosition)) {\n // resetting suggestionsPromiseIndex will cause any promise that is yet to be resolved to have no effect\n // when they finish loading.\n _this.suggestionsPromiseIndex = 0;\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n }\n else if (mention.status === \"active\" &&\n (key === \"ArrowUp\" || key === \"ArrowDown\") &&\n !shiftKey) {\n event.preventDefault();\n var focusDelta = key === \"ArrowUp\" ? -1 : 1;\n _this.setState({\n mention: __assign(__assign({}, mention), { focusIndex: Math_1.mod(mention.focusIndex + focusDelta, mention.suggestions.length) })\n });\n }\n else if (key === \"Enter\" &&\n mention.status === \"active\" &&\n mention.suggestions.length) {\n event.preventDefault();\n _this.handleSuggestionSelected(mention.focusIndex);\n }\n break;\n default:\n // Ignore\n }\n };\n _this.handleKeyUp = function (event) {\n var key = event.key;\n var mention = _this.state.mention;\n var _a = _this.props, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, value = _a.value;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \"Backspace\") {\n var searchText = value.substr(mention.startPosition, _this.getTextArea().selectionStart - mention.startPosition);\n _this.startLoadingSuggestions(searchText);\n if (mention.status !== \"loading\") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"loading\" })\n });\n }\n }\n break;\n case \"inactive\":\n if (key === \"Backspace\") {\n var prevChar = value.charAt(_this.getTextArea().selectionStart - 1);\n var isAtMention = suggestionTriggerCharacters.includes(value.charAt(_this.getTextArea().selectionStart - 1));\n if (isAtMention) {\n _this.loadEmptySuggestion(event.currentTarget, prevChar);\n }\n }\n break;\n default:\n // Ignore\n }\n };\n _this.handleKeyPress = function (event) {\n var _a = _this.props, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, value = _a.value;\n var mention = _this.state.mention;\n var key = event.key;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \" \") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"inactive\" })\n });\n return;\n }\n var searchText = value.substr(mention.startPosition, _this.getTextArea().selectionStart - mention.startPosition) + key;\n // In this case, the mentions box was open but the user typed something else\n _this.startLoadingSuggestions(searchText);\n if (mention.status !== \"loading\") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"loading\" })\n });\n }\n break;\n case \"inactive\":\n if (suggestionTriggerCharacters.indexOf(event.key) === -1 ||\n !/\\s|\\(|\\[|^.{0}$/.test(value.charAt(_this.getTextArea().selectionStart - 1))) {\n return;\n }\n _this.loadEmptySuggestion(event.currentTarget, event.key);\n break;\n }\n };\n _this.state = { mention: { status: \"inactive\", suggestions: [] } };\n return _this;\n }\n TextArea.prototype.suggestionsEnabled = function () {\n return (this.props.suggestionTriggerCharacters &&\n this.props.suggestionTriggerCharacters.length &&\n this.props.loadSuggestions);\n };\n TextArea.prototype.render = function () {\n var _this = this;\n var _a = this.props, classes = _a.classes, readOnly = _a.readOnly, textAreaProps = _a.textAreaProps, height = _a.height, value = _a.value, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, loadSuggestions = _a.loadSuggestions, suggestionsDropdownClasses = _a.suggestionsDropdownClasses, textAreaComponent = _a.textAreaComponent, onPaste = _a.onPaste;\n var suggestionsEnabled = suggestionTriggerCharacters &&\n suggestionTriggerCharacters.length &&\n loadSuggestions;\n var mention = this.state.mention;\n var TextAreaComponent = (textAreaComponent ||\n \"textarea\");\n return (React.createElement(\"div\", { className: \"mde-textarea-wrapper\" },\n React.createElement(TextAreaComponent, __assign({ className: ClassNames_1.classNames(\"mde-text\", classes), style: { height: height }, ref: this.props.refObject, readOnly: readOnly, value: value, \"data-testid\": \"text-area\" }, textAreaProps, { onChange: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onChange) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleOnChange(event);\n }, onBlur: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onBlur) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleBlur();\n }\n }, onKeyDown: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyDown(event);\n }, onKeyUp: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyUp) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyUp(event);\n }\n }, onKeyPress: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyPress) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyPress(event);\n }\n }, onPaste: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onPaste) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n onPaste(event);\n } })),\n mention.status === \"active\" && mention.suggestions.length && (React.createElement(SuggestionsDropdown_1.SuggestionsDropdown, { classes: suggestionsDropdownClasses, caret: mention.caret, suggestions: mention.suggestions, onSuggestionSelected: this.handleSuggestionSelected, focusIndex: mention.focusIndex, textAreaRef: this.props.refObject }))));\n };\n return TextArea;\n}(React.Component));\nexports.TextArea = TextArea;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar ToolbarButtonGroup_1 = require(\"./ToolbarButtonGroup\");\nvar ToolbarButton_1 = require(\"./ToolbarButton\");\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n function Toolbar() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleTabChange = function (tab) {\n var onTabChange = _this.props.onTabChange;\n onTabChange(tab);\n };\n return _this;\n }\n Toolbar.prototype.render = function () {\n var _this = this;\n var l18n = this.props.l18n;\n var _a = this.props, classes = _a.classes, children = _a.children, buttons = _a.buttons, onCommand = _a.onCommand, readOnly = _a.readOnly, disablePreview = _a.disablePreview, writeButtonProps = _a.writeButtonProps, previewButtonProps = _a.previewButtonProps, buttonProps = _a.buttonProps;\n if ((!buttons || buttons.length === 0) && !children) {\n return null;\n }\n var writePreviewTabs = (React.createElement(\"div\", { className: \"mde-tabs\" },\n React.createElement(\"button\", __assign({ type: \"button\", className: ClassNames_1.classNames({ selected: this.props.tab === \"write\" }), onClick: function () { return _this.handleTabChange(\"write\"); } }, writeButtonProps), l18n.write),\n React.createElement(\"button\", __assign({ type: \"button\", className: ClassNames_1.classNames({ selected: this.props.tab === \"preview\" }), onClick: function () { return _this.handleTabChange(\"preview\"); } }, previewButtonProps), l18n.preview)));\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"mde-header\", classes) },\n !disablePreview && writePreviewTabs,\n buttons.map(function (commandGroup, i) { return (React.createElement(ToolbarButtonGroup_1.ToolbarButtonGroup, { key: i, hidden: _this.props.tab === \"preview\" }, commandGroup.map(function (c, j) {\n return (React.createElement(ToolbarButton_1.ToolbarButton, { key: j, name: c.commandName, buttonContent: c.buttonContent, buttonProps: __assign(__assign({}, (buttonProps || {})), c.buttonProps), onClick: function () { return onCommand(c.commandName); }, readOnly: readOnly, buttonComponentClass: c.buttonComponentClass }));\n }))); })));\n };\n return Toolbar;\n}(React.Component));\nexports.Toolbar = Toolbar;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar defaultButtonProps = {\n tabIndex: -1\n};\nexports.ToolbarButton = function (props) {\n var buttonComponentClass = props.buttonComponentClass, buttonContent = props.buttonContent, buttonProps = props.buttonProps, onClick = props.onClick, readOnly = props.readOnly, name = props.name;\n var finalButtonProps = __assign(__assign({}, defaultButtonProps), (buttonProps || {}));\n var finalButtonComponent = buttonComponentClass || \"button\";\n return (React.createElement(\"li\", { className: \"mde-header-item\" }, React.createElement(finalButtonComponent, __assign(__assign({ \"data-name\": name }, finalButtonProps), {\n onClick: onClick,\n disabled: readOnly,\n type: \"button\"\n }), buttonContent)));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nexports.ToolbarButtonGroup = function (props) {\n return (React.createElement(\"ul\", { className: ClassNames_1.classNames(\"mde-header-group\", { hidden: props.hidden }) }, props.children));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nfunction GripSvg() {\n return (React.createElement(\"svg\", { \"aria-hidden\": \"true\", \"data-prefix\": \"far\", \"data-icon\": \"ellipsis-h\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", className: \"icon\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z\", className: \"\" })));\n}\nexports.GripSvg = GripSvg;\n","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./ToolbarButtonGroup\"));\n__export(require(\"./ToolbarButton\"));\n__export(require(\"../icons/MdeFontAwesomeIcon\"));\n__export(require(\"./Preview\"));\n__export(require(\"./TextArea\"));\n__export(require(\"./Toolbar\"));\n__export(require(\"./ReactMde\"));\n__export(require(\"./SuggestionsDropdown\"));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nexports.MdeFontAwesomeIcon = function (_a) {\n var icon = _a.icon;\n var transformedIcon = icon;\n switch (icon) {\n case \"header\":\n transformedIcon = \"heading\";\n break;\n case \"quote\":\n transformedIcon = \"quote-right\";\n break;\n case \"unordered-list\":\n transformedIcon = \"tasks\";\n break;\n case \"ordered-list\":\n transformedIcon = \"list-ol\";\n break;\n case \"checked-list\":\n transformedIcon = \"tasks\";\n break;\n default:\n transformedIcon = icon;\n }\n return React.createElement(\"i\", { className: \"fas fa-\" + transformedIcon, \"aria-hidden\": \"true\" });\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar checkedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"tasks\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z\" })));\nvar orderedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"list-ol\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\" })));\nvar unorderedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"list-ul\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\" })));\nvar imageIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"image\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z\" })));\nvar codeIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"code\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 640 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z\" })));\nvar quoteIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"quote-right\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M512 80v128c0 137.018-63.772 236.324-193.827 271.172-15.225 4.08-30.173-7.437-30.173-23.199v-33.895c0-10.057 6.228-19.133 15.687-22.55C369.684 375.688 408 330.054 408 256h-72c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h128c26.51 0 48 21.49 48 48zM176 32H48C21.49 32 0 53.49 0 80v128c0 26.51 21.49 48 48 48h72c0 74.054-38.316 119.688-104.313 143.528C6.228 402.945 0 412.021 0 422.078v33.895c0 15.762 14.948 27.279 30.173 23.199C160.228 444.324 224 345.018 224 208V80c0-26.51-21.49-48-48-48z\" })));\nvar linkIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"link\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z\" })));\nvar strikeThroughIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"strikethrough\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z\" })));\nvar italicIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"italic\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 320 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z\" })));\nvar headerIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"heading\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z\" })));\nvar boldIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"bold\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 384 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z\" })));\nexports.SvgIcon = function (_a) {\n var icon = _a.icon;\n switch (icon) {\n case \"header\":\n return headerIcon;\n case \"bold\":\n return boldIcon;\n case \"italic\":\n return italicIcon;\n case \"strikethrough\":\n return strikeThroughIcon;\n case \"link\":\n return linkIcon;\n case \"quote\":\n return quoteIcon;\n case \"code\":\n return codeIcon;\n case \"image\":\n return imageIcon;\n case \"unordered-list\":\n return unorderedListIcon;\n case \"ordered-list\":\n return orderedListIcon;\n case \"checked-list\":\n return checkedListIcon;\n default:\n return null;\n }\n};\n","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./MdeFontAwesomeIcon\"));\n__export(require(\"./SvgIcon\"));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil = require(\"./util/MarkdownUtil\");\nexports.MarkdownUtil = MarkdownUtil;\nvar components_1 = require(\"./components\");\nexports.TextArea = components_1.TextArea;\nexports.SuggestionsDropdown = components_1.SuggestionsDropdown;\nexports.Preview = components_1.Preview;\nexports.Toolbar = components_1.Toolbar;\nexports.ToolbarButtonGroup = components_1.ToolbarButtonGroup;\nvar icons_1 = require(\"./icons\");\nexports.SvgIcon = icons_1.SvgIcon;\nexports.MdeFontAwesomeIcon = icons_1.MdeFontAwesomeIcon;\nvar defaults_1 = require(\"./commands/default-commands/defaults\");\nexports.getDefaultCommandMap = defaults_1.getDefaultCommandMap;\nexports.getDefaultToolbarCommands = defaults_1.getDefaultToolbarCommands;\nexports.default = components_1.ReactMde;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enL18n = {\n write: \"Write\",\n preview: \"Preview\",\n uploadingImage: \"Uploading image...\"\n};\n","\"use strict\";\n/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isString(classValue) {\n return typeof classValue === \"string\";\n}\nfunction isNonEmptyArray(classValue) {\n return Array.isArray(classValue) && classValue.length > 0;\n}\nfunction isClassDictionary(classValue) {\n return typeof classValue === \"object\";\n}\nfunction classNames() {\n var classValues = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classValues[_i] = arguments[_i];\n }\n var classes = [];\n for (var i = 0; i < classValues.length; i++) {\n var classValue = classValues[i];\n if (!classValue)\n continue;\n if (isString(classValue)) {\n classes.push(classValue);\n }\n else if (isNonEmptyArray(classValue)) {\n var inner = classNames.apply(null, classValue);\n if (inner) {\n classes.push(inner);\n }\n }\n else if (isClassDictionary(classValue)) {\n for (var key in classValue) {\n if (classValue.hasOwnProperty(key) && classValue[key]) {\n classes.push(key);\n }\n }\n }\n }\n return classes.join(\" \");\n}\nexports.classNames = classNames;\n","\"use strict\";\n/*!\n * The MIT License\n Copyright (c) 2018 Dmitriy Kubyshkin\n Copied from https://github.com/grassator/insert-text-at-cursor\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Inserts the given text at the cursor. If the element contains a selection, the selection\n * will be replaced by the text.\n */\nfunction insertText(input, text) {\n // Most of the used APIs only work with the field selected\n input.focus();\n // IE 8-10\n if (document.selection) {\n var ieRange = document.selection.createRange();\n ieRange.text = text;\n // Move cursor after the inserted text\n ieRange.collapse(false /* to the end */);\n ieRange.select();\n return;\n }\n // Webkit + Edge\n var isSuccess = document.execCommand(\"insertText\", false, text);\n if (!isSuccess) {\n var start = input.selectionStart;\n var end = input.selectionEnd;\n // Firefox (non-standard method)\n if (typeof input.setRangeText === \"function\") {\n input.setRangeText(text);\n }\n else {\n if (canManipulateViaTextNodes(input)) {\n var textNode = document.createTextNode(text);\n var node = input.firstChild;\n // If textarea is empty, just insert the text\n if (!node) {\n input.appendChild(textNode);\n }\n else {\n // Otherwise we need to find a nodes for start and end\n var offset = 0;\n var startNode = null;\n var endNode = null;\n // To make a change we just need a Range, not a Selection\n var range = document.createRange();\n while (node && (startNode === null || endNode === null)) {\n var nodeLength = node.nodeValue.length;\n // if start of the selection falls into current node\n if (start >= offset && start <= offset + nodeLength) {\n range.setStart((startNode = node), start - offset);\n }\n // if end of the selection falls into current node\n if (end >= offset && end <= offset + nodeLength) {\n range.setEnd((endNode = node), end - offset);\n }\n offset += nodeLength;\n node = node.nextSibling;\n }\n // If there is some text selected, remove it as we should replace it\n if (start !== end) {\n range.deleteContents();\n }\n // Finally insert a new node. The browser will automatically\n // split start and end nodes into two if necessary\n range.insertNode(textNode);\n }\n }\n else {\n // For the text input the only way is to replace the whole value :(\n var value = input.value;\n input.value = value.slice(0, start) + text + value.slice(end);\n }\n }\n // Correct the cursor position to be at the end of the insertion\n input.setSelectionRange(start + text.length, start + text.length);\n // Notify any possible listeners of the change\n var e = document.createEvent(\"UIEvent\");\n e.initEvent(\"input\", true, false);\n input.dispatchEvent(e);\n }\n}\nexports.insertText = insertText;\nfunction canManipulateViaTextNodes(input) {\n if (input.nodeName !== \"TEXTAREA\") {\n return false;\n }\n var browserSupportsTextareaTextNodes;\n if (typeof browserSupportsTextareaTextNodes === \"undefined\") {\n var textarea = document.createElement(\"textarea\");\n textarea.value = \"1\";\n browserSupportsTextareaTextNodes = !!textarea.firstChild;\n }\n return browserSupportsTextareaTextNodes;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getSurroundingWord(text, position) {\n if (!text)\n throw Error(\"Argument 'text' should be truthy\");\n var isWordDelimiter = function (c) { return c === \" \" || c.charCodeAt(0) === 10; };\n // leftIndex is initialized to 0 because if selection is 0, it won't even enter the iteration\n var start = 0;\n // rightIndex is initialized to text.length because if selection is equal to text.length it won't even enter the interation\n var end = text.length;\n // iterate to the left\n for (var i = position; i - 1 > -1; i--) {\n if (isWordDelimiter(text[i - 1])) {\n start = i;\n break;\n }\n }\n // iterate to the right\n for (var i = position; i < text.length; i++) {\n if (isWordDelimiter(text[i])) {\n end = i;\n break;\n }\n }\n return { start: start, end: end };\n}\nexports.getSurroundingWord = getSurroundingWord;\n/**\n * If the cursor is inside a word and (selection.start === selection.end)\n * returns a new Selection where the whole word is selected\n * @param text\n * @param selection\n */\nfunction selectWord(_a) {\n var text = _a.text, selection = _a.selection;\n if (text && text.length && selection.start === selection.end) {\n // the user is pointing to a word\n return getSurroundingWord(text, selection.start);\n }\n return selection;\n}\nexports.selectWord = selectWord;\n/**\n * Gets the number of line-breaks that would have to be inserted before the given 'startPosition'\n * to make sure there's an empty line between 'startPosition' and the previous text\n */\nfunction getBreaksNeededForEmptyLineBefore(text, startPosition) {\n if (text === void 0) { text = \"\"; }\n if (startPosition === 0)\n return 0;\n // rules:\n // - If we're in the first line, no breaks are needed\n // - Otherwise there must be 2 breaks before the previous character. Depending on how many breaks exist already, we\n // may need to insert 0, 1 or 2 breaks\n var neededBreaks = 2;\n var isInFirstLine = true;\n for (var i = startPosition - 1; i >= 0 && neededBreaks >= 0; i--) {\n switch (text.charCodeAt(i)) {\n case 32: // blank space\n continue;\n case 10: // line break\n neededBreaks--;\n isInFirstLine = false;\n break;\n default:\n return neededBreaks;\n }\n }\n return isInFirstLine ? 0 : neededBreaks;\n}\nexports.getBreaksNeededForEmptyLineBefore = getBreaksNeededForEmptyLineBefore;\n/**\n * Gets the number of line-breaks that would have to be inserted after the given 'startPosition'\n * to make sure there's an empty line between 'startPosition' and the next text\n */\nfunction getBreaksNeededForEmptyLineAfter(text, startPosition) {\n if (text === void 0) { text = \"\"; }\n if (startPosition === text.length - 1)\n return 0;\n // rules:\n // - If we're in the first line, no breaks are needed\n // - Otherwise there must be 2 breaks before the previous character. Depending on how many breaks exist already, we\n // may need to insert 0, 1 or 2 breaks\n var neededBreaks = 2;\n var isInLastLine = true;\n for (var i = startPosition; i < text.length && neededBreaks >= 0; i++) {\n switch (text.charCodeAt(i)) {\n case 32:\n continue;\n case 10: {\n neededBreaks--;\n isInLastLine = false;\n break;\n }\n default:\n return neededBreaks;\n }\n }\n return isInLastLine ? 0 : neededBreaks;\n}\nexports.getBreaksNeededForEmptyLineAfter = getBreaksNeededForEmptyLineAfter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Calculates modulus, like %, except that it works with negative numbers\n */\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\nexports.mod = mod;\n","\"use strict\";\n/* jshint browser: true */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n \"direction\",\n \"boxSizing\",\n \"width\",\n \"height\",\n \"overflowX\",\n \"overflowY\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderStyle\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n \"fontStyle\",\n \"fontVariant\",\n \"fontWeight\",\n \"fontStretch\",\n \"fontSize\",\n \"fontSizeAdjust\",\n \"lineHeight\",\n \"fontFamily\",\n \"textAlign\",\n \"textTransform\",\n \"textIndent\",\n \"textDecoration\",\n \"letterSpacing\",\n \"wordSpacing\",\n \"tabSize\",\n \"MozTabSize\"\n];\nvar isBrowser = typeof window !== \"undefined\";\nvar isFirefox = isBrowser && window.mozInnerScreenX != null;\nfunction getCaretCoordinates(element, append) {\n if (!isBrowser) {\n throw new Error(\"getCaretCoordinates should only be called in a browser\");\n }\n // The mirror div will replicate the textarea's style\n var div = document.createElement(\"div\");\n div.id = \"input-textarea-caret-position-mirror-div\";\n document.body.appendChild(div);\n var style = div.style;\n var computed = window.getComputedStyle\n ? window.getComputedStyle(element)\n : element.currentStyle; // currentStyle for IE < 9\n // Default textarea styles\n style.whiteSpace = \"pre-wrap\";\n style.wordWrap = \"break-word\"; // only for textarea-s\n // Position off-screen\n style.position = \"absolute\"; // required to return coordinates properly\n style.visibility = \"hidden\"; // not 'display: none' because we want rendering\n // Transfer the element's properties to the div\n properties.forEach(function (prop) {\n style[prop] = computed[prop];\n });\n if (isFirefox) {\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n if (element.scrollHeight > parseInt(computed.height))\n style.overflowY = \"scroll\";\n }\n else {\n style.overflow = \"hidden\"; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n }\n div.textContent = element.value.substring(0, element.selectionStart);\n if (append) {\n div.textContent += append;\n }\n var span = document.createElement(\"span\");\n // Wrapping must be replicated *exactly*, including when a long word gets\n // onto the next line, with whitespace at the end of the line before (#7).\n // The *only* reliable way to do that is to copy the *entire* rest of the\n // textarea's content into the created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(element.selectionEnd) || \".\"; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n var coordinates = {\n top: span.offsetTop + parseInt(computed[\"borderTopWidth\"]),\n left: span.offsetLeft + parseInt(computed[\"borderLeftWidth\"]),\n lineHeight: parseInt(computed[\"lineHeight\"])\n };\n document.body.removeChild(div);\n return coordinates;\n}\nexports.getCaretCoordinates = getCaretCoordinates;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Reads a file and returns an ArrayBuffer\n * @param file\n */\nfunction readFileAsync(file) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onload = function () {\n if (typeof reader.result === \"string\") {\n throw new Error(\"reader.result is expected to be an ArrayBuffer\");\n }\n resolve(reader.result);\n };\n reader.onerror = reject;\n reader.readAsArrayBuffer(file);\n })];\n });\n });\n}\nexports.readFileAsync = readFileAsync;\n","var api = require(\"!../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../../../node_modules/css-loader/dist/cjs.js??ref--5-1!./react-mde-all.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\nvar exported = content.locals ? content.locals : {};\n\n\n\nmodule.exports = exported;",";/*! showdown v 1.9.1 - 02-11-2019 */\r\n(function(){\r\n/**\n * Created by Tivie on 13-07-2015.\n */\n\nfunction getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as
(GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\
foo\\
',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including ``, `` and `` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}\n\nfunction allOptionsOn () {\n 'use strict';\n var options = getDefaultOpts(true),\n ret = {};\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n ret[opt] = true;\n }\n }\n return ret;\n}\n\r\n/**\n * Created by Tivie on 06-01-2015.\n */\n\n// Private properties\nvar showdown = {},\n parsers = {},\n extensions = {},\n globalOptions = getDefaultOpts(true),\n setFlavor = 'vanilla',\n flavor = {\n github: {\n omitExtraWLInCodeBlocks: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n disableForced4SpacesIndentedSublists: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghCompatibleHeaderId: true,\n ghMentions: true,\n backslashEscapesHTMLTags: true,\n emoji: true,\n splitAdjacentBlockquotes: true\n },\n original: {\n noHeaderId: true,\n ghCodeBlocks: false\n },\n ghost: {\n omitExtraWLInCodeBlocks: true,\n parseImgDimensions: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n smoothLivePreview: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghMentions: false,\n encodeEmails: true\n },\n vanilla: getDefaultOpts(true),\n allOn: allOptionsOn()\n };\n\n/**\n * helper namespace\n * @type {{}}\n */\nshowdown.helper = {};\n\n/**\n * TODO LEGACY SUPPORT CODE\n * @type {{}}\n */\nshowdown.extensions = {};\n\n/**\n * Set a global option\n * @static\n * @param {string} key\n * @param {*} value\n * @returns {showdown}\n */\nshowdown.setOption = function (key, value) {\n 'use strict';\n globalOptions[key] = value;\n return this;\n};\n\n/**\n * Get a global option\n * @static\n * @param {string} key\n * @returns {*}\n */\nshowdown.getOption = function (key) {\n 'use strict';\n return globalOptions[key];\n};\n\n/**\n * Get the global options\n * @static\n * @returns {{}}\n */\nshowdown.getOptions = function () {\n 'use strict';\n return globalOptions;\n};\n\n/**\n * Reset global options to the default values\n * @static\n */\nshowdown.resetOptions = function () {\n 'use strict';\n globalOptions = getDefaultOpts(true);\n};\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function (name) {\n 'use strict';\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n showdown.resetOptions();\n var preset = flavor[name];\n setFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n globalOptions[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function () {\n 'use strict';\n return setFlavor;\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function (name) {\n 'use strict';\n if (flavor.hasOwnProperty(name)) {\n return flavor[name];\n }\n};\n\n/**\n * Get the default options\n * @static\n * @param {boolean} [simple=true]\n * @returns {{}}\n */\nshowdown.getDefaultOptions = function (simple) {\n 'use strict';\n return getDefaultOpts(simple);\n};\n\n/**\n * Get or set a subParser\n *\n * subParser(name) - Get a registered subParser\n * subParser(name, func) - Register a subParser\n * @static\n * @param {string} name\n * @param {function} [func]\n * @returns {*}\n */\nshowdown.subParser = function (name, func) {\n 'use strict';\n if (showdown.helper.isString(name)) {\n if (typeof func !== 'undefined') {\n parsers[name] = func;\n } else {\n if (parsers.hasOwnProperty(name)) {\n return parsers[name];\n } else {\n throw Error('SubParser named ' + name + ' not registered!');\n }\n }\n }\n};\n\n/**\n * Gets or registers an extension\n * @static\n * @param {string} name\n * @param {object|function=} ext\n * @returns {*}\n */\nshowdown.extension = function (name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error('Extension \\'name\\' must be a string');\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!extensions.hasOwnProperty(name)) {\n throw Error('Extension named ' + name + ' is not registered!');\n }\n return extensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExtension = validate(ext, name);\n\n if (validExtension.valid) {\n extensions[name] = ext;\n } else {\n throw Error(validExtension.error);\n }\n }\n};\n\n/**\n * Gets all extensions registered\n * @returns {{}}\n */\nshowdown.getAllExtensions = function () {\n 'use strict';\n return extensions;\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function (name) {\n 'use strict';\n delete extensions[name];\n};\n\n/**\n * Removes all extensions\n */\nshowdown.resetExtensions = function () {\n 'use strict';\n extensions = {};\n};\n\n/**\n * Validate extension\n * @param {array} extension\n * @param {string} name\n * @returns {{valid: boolean, error: string}}\n */\nfunction validate (extension, name) {\n 'use strict';\n\n var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',\n ret = {\n valid: true,\n error: ''\n };\n\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n\n for (var i = 0; i < extension.length; ++i) {\n var baseMsg = errMsg + ' sub-extension ' + i + ': ',\n ext = extension[i];\n if (typeof ext !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';\n return ret;\n }\n\n if (!showdown.helper.isString(ext.type)) {\n ret.valid = false;\n ret.error = baseMsg + 'property \"type\" must be a string, but ' + typeof ext.type + ' given';\n return ret;\n }\n\n var type = ext.type = ext.type.toLowerCase();\n\n // normalize extension type\n if (type === 'language') {\n type = ext.type = 'lang';\n }\n\n if (type === 'html') {\n type = ext.type = 'output';\n }\n\n if (type !== 'lang' && type !== 'output' && type !== 'listener') {\n ret.valid = false;\n ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: \"lang/language\", \"output/html\" or \"listener\"';\n return ret;\n }\n\n if (type === 'listener') {\n if (showdown.helper.isUndefined(ext.listeners)) {\n ret.valid = false;\n ret.error = baseMsg + '. Extensions of type \"listener\" must have a property called \"listeners\"';\n return ret;\n }\n } else {\n if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {\n ret.valid = false;\n ret.error = baseMsg + type + ' extensions must define either a \"regex\" property or a \"filter\" method';\n return ret;\n }\n }\n\n if (ext.listeners) {\n if (typeof ext.listeners !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an object but ' + typeof ext.listeners + ' given';\n return ret;\n }\n for (var ln in ext.listeners) {\n if (ext.listeners.hasOwnProperty(ln)) {\n if (typeof ext.listeners[ln] !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback]. listeners.' + ln +\n ' must be a function but ' + typeof ext.listeners[ln] + ' given';\n return ret;\n }\n }\n }\n }\n\n if (ext.filter) {\n if (typeof ext.filter !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + ' given';\n return ret;\n }\n } else if (ext.regex) {\n if (showdown.helper.isString(ext.regex)) {\n ext.regex = new RegExp(ext.regex, 'g');\n }\n if (!(ext.regex instanceof RegExp)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';\n return ret;\n }\n if (showdown.helper.isUndefined(ext.replace)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" extensions must implement a replace string or function';\n return ret;\n }\n }\n }\n return ret;\n}\n\n/**\n * Validate extension\n * @param {object} ext\n * @returns {boolean}\n */\nshowdown.validateExtension = function (ext) {\n 'use strict';\n\n var validateExtension = validate(ext, null);\n if (!validateExtension.valid) {\n console.warn(validateExtension.error);\n return false;\n }\n return true;\n};\n\r\n/**\n * showdownjs helper functions\n */\n\nif (!showdown.hasOwnProperty('helper')) {\n showdown.helper = {};\n}\n\n/**\n * Check if var is string\n * @static\n * @param {string} a\n * @returns {boolean}\n */\nshowdown.helper.isString = function (a) {\n 'use strict';\n return (typeof a === 'string' || a instanceof String);\n};\n\n/**\n * Check if var is a function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isFunction = function (a) {\n 'use strict';\n var getType = {};\n return a && getType.toString.call(a) === '[object Function]';\n};\n\n/**\n * isArray helper function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isArray = function (a) {\n 'use strict';\n return Array.isArray(a);\n};\n\n/**\n * Check if value is undefined\n * @static\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n */\nshowdown.helper.isUndefined = function (value) {\n 'use strict';\n return typeof value === 'undefined';\n};\n\n/**\n * ForEach helper function\n * Iterates over Arrays and Objects (own properties only)\n * @static\n * @param {*} obj\n * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object\n */\nshowdown.helper.forEach = function (obj, callback) {\n 'use strict';\n // check if obj is defined\n if (showdown.helper.isUndefined(obj)) {\n throw new Error('obj param is required');\n }\n\n if (showdown.helper.isUndefined(callback)) {\n throw new Error('callback param is required');\n }\n\n if (!showdown.helper.isFunction(callback)) {\n throw new Error('callback param must be a function/closure');\n }\n\n if (typeof obj.forEach === 'function') {\n obj.forEach(callback);\n } else if (showdown.helper.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n callback(obj[i], i, obj);\n }\n } else if (typeof (obj) === 'object') {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n callback(obj[prop], prop, obj);\n }\n }\n } else {\n throw new Error('obj does not seem to be an array or an iterable object');\n }\n};\n\n/**\n * Standardidize extension name\n * @static\n * @param {string} s extension name\n * @returns {string}\n */\nshowdown.helper.stdExtName = function (s) {\n 'use strict';\n return s.replace(/[_?*+\\/\\\\.^-]/g, '').replace(/\\s/g, '').toLowerCase();\n};\n\nfunction escapeCharactersCallback (wholeMatch, m1) {\n 'use strict';\n var charCodeToEscape = m1.charCodeAt(0);\n return '¨E' + charCodeToEscape + 'E';\n}\n\n/**\n * Callback used to escape characters when passing through String.replace\n * @static\n * @param {string} wholeMatch\n * @param {string} m1\n * @returns {string}\n */\nshowdown.helper.escapeCharactersCallback = escapeCharactersCallback;\n\n/**\n * Escape characters in a string\n * @static\n * @param {string} text\n * @param {string} charsToEscape\n * @param {boolean} afterBackslash\n * @returns {XML|string|void|*}\n */\nshowdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {\n 'use strict';\n // First we have to escape the escape characters so that\n // we can build a character class out of them\n var regexString = '([' + charsToEscape.replace(/([\\[\\]\\\\])/g, '\\\\$1') + '])';\n\n if (afterBackslash) {\n regexString = '\\\\\\\\' + regexString;\n }\n\n var regex = new RegExp(regexString, 'g');\n text = text.replace(regex, escapeCharactersCallback);\n\n return text;\n};\n\n/**\n * Unescape HTML entities\n * @param txt\n * @returns {string}\n */\nshowdown.helper.unescapeHTMLEntities = function (txt) {\n 'use strict';\n\n return txt\n .replace(/"/g, '\"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/&/g, '&');\n};\n\nvar rgxFindMatchPos = function (str, left, right, flags) {\n 'use strict';\n var f = flags || '',\n g = f.indexOf('g') > -1,\n x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),\n l = new RegExp(left, f.replace(/g/g, '')),\n pos = [],\n t, s, m, start, end;\n\n do {\n t = 0;\n while ((m = x.exec(str))) {\n if (l.test(m[0])) {\n if (!(t++)) {\n s = x.lastIndex;\n start = s - m[0].length;\n }\n } else if (t) {\n if (!--t) {\n end = m.index + m[0].length;\n var obj = {\n left: {start: start, end: s},\n match: {start: s, end: m.index},\n right: {start: m.index, end: end},\n wholeMatch: {start: start, end: end}\n };\n pos.push(obj);\n if (!g) {\n return pos;\n }\n }\n }\n }\n } while (t && (x.lastIndex = s));\n\n return pos;\n};\n\n/**\n * matchRecursiveRegExp\n *\n * (c) 2007 Steven Levithan \n * MIT License\n *\n * Accepts a string to search, a left and right format delimiter\n * as regex patterns, and optional regex flags. Returns an array\n * of matches, allowing nested instances of left/right delimiters.\n * Use the \"g\" flag to return all matches, otherwise only the\n * first is returned. Be careful to ensure that the left and\n * right format delimiters produce mutually exclusive matches.\n * Backreferences are not supported within the right delimiter\n * due to how it is internally combined with the left delimiter.\n * When matching strings whose format delimiters are unbalanced\n * to the left or right, the output is intentionally as a\n * conventional regex library with recursion support would\n * produce, e.g. \"<\" and \">\" both produce [\"x\"] when using\n * \"<\" and \">\" as the delimiters (both strings contain a single,\n * balanced instance of \"\").\n *\n * examples:\n * matchRecursiveRegExp(\"test\", \"\\\\(\", \"\\\\)\")\n * returns: []\n * matchRecursiveRegExp(\">>t<>\", \"<\", \">\", \"g\")\n * returns: [\"t<>\", \"\"]\n * matchRecursiveRegExp(\"
test
\", \"]*>\", \"\", \"gi\")\n * returns: [\"test\"]\n */\nshowdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {\n 'use strict';\n\n var matchPos = rgxFindMatchPos (str, left, right, flags),\n results = [];\n\n for (var i = 0; i < matchPos.length; ++i) {\n results.push([\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n ]);\n }\n return results;\n};\n\n/**\n *\n * @param {string} str\n * @param {string|function} replacement\n * @param {string} left\n * @param {string} right\n * @param {string} flags\n * @returns {string}\n */\nshowdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {\n 'use strict';\n\n if (!showdown.helper.isFunction(replacement)) {\n var repStr = replacement;\n replacement = function () {\n return repStr;\n };\n }\n\n var matchPos = rgxFindMatchPos(str, left, right, flags),\n finalStr = str,\n lng = matchPos.length;\n\n if (lng > 0) {\n var bits = [];\n if (matchPos[0].wholeMatch.start !== 0) {\n bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n }\n for (var i = 0; i < lng; ++i) {\n bits.push(\n replacement(\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n )\n );\n if (i < lng - 1) {\n bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));\n }\n }\n if (matchPos[lng - 1].wholeMatch.end < str.length) {\n bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));\n }\n finalStr = bits.join('');\n }\n return finalStr;\n};\n\n/**\n * Returns the index within the passed String object of the first occurrence of the specified regex,\n * starting the search at fromIndex. Returns -1 if the value is not found.\n *\n * @param {string} str string to search\n * @param {RegExp} regex Regular expression to search\n * @param {int} [fromIndex = 0] Index to start the search\n * @returns {Number}\n * @throws InvalidArgumentError\n */\nshowdown.helper.regexIndexOf = function (str, regex, fromIndex) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n if (regex instanceof RegExp === false) {\n throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';\n }\n var indexOf = str.substring(fromIndex || 0).search(regex);\n return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;\n};\n\n/**\n * Splits the passed string object at the defined index, and returns an array composed of the two substrings\n * @param {string} str string to split\n * @param {int} index index to split string at\n * @returns {[string,string]}\n * @throws InvalidArgumentError\n */\nshowdown.helper.splitAtIndex = function (str, index) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n return [str.substring(0, index), str.substring(index)];\n};\n\n/**\n * Obfuscate an e-mail address through the use of Character Entities,\n * transforming ASCII characters into their equivalent decimal or hex entities.\n *\n * Since it has a random component, subsequent calls to this function produce different results\n *\n * @param {string} mail\n * @returns {string}\n */\nshowdown.helper.encodeEmailAddress = function (mail) {\n 'use strict';\n var encode = [\n function (ch) {\n return '&#' + ch.charCodeAt(0) + ';';\n },\n function (ch) {\n return '&#x' + ch.charCodeAt(0).toString(16) + ';';\n },\n function (ch) {\n return ch;\n }\n ];\n\n mail = mail.replace(/./g, function (ch) {\n if (ch === '@') {\n // this *must* be encoded. I insist.\n ch = encode[Math.floor(Math.random() * 2)](ch);\n } else {\n var r = Math.random();\n // roughly 10% raw, 45% hex, 45% dec\n ch = (\n r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)\n );\n }\n return ch;\n });\n\n return mail;\n};\n\n/**\n *\n * @param str\n * @param targetLength\n * @param padString\n * @returns {string}\n */\nshowdown.helper.padEnd = function padEnd (str, targetLength, padString) {\n 'use strict';\n /*jshint bitwise: false*/\n // eslint-disable-next-line space-infix-ops\n targetLength = targetLength>>0; //floor if number or convert non-number to 0;\n /*jshint bitwise: true*/\n padString = String(padString || ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed\n }\n return String(str) + padString.slice(0,targetLength);\n }\n};\n\n/**\n * POLYFILLS\n */\n// use this instead of builtin is undefined for IE8 compatibility\nif (typeof console === 'undefined') {\n console = {\n warn: function (msg) {\n 'use strict';\n alert(msg);\n },\n log: function (msg) {\n 'use strict';\n alert(msg);\n },\n error: function (msg) {\n 'use strict';\n throw msg;\n }\n };\n}\n\n/**\n * Common regexes.\n * We declare some common regexes to improve performance\n */\nshowdown.helper.regexes = {\n asteriskDashAndColon: /([*_:~])/g\n};\n\n/**\n * EMOJIS LIST\n */\nshowdown.helper.emojis = {\n '+1':'\\ud83d\\udc4d',\n '-1':'\\ud83d\\udc4e',\n '100':'\\ud83d\\udcaf',\n '1234':'\\ud83d\\udd22',\n '1st_place_medal':'\\ud83e\\udd47',\n '2nd_place_medal':'\\ud83e\\udd48',\n '3rd_place_medal':'\\ud83e\\udd49',\n '8ball':'\\ud83c\\udfb1',\n 'a':'\\ud83c\\udd70\\ufe0f',\n 'ab':'\\ud83c\\udd8e',\n 'abc':'\\ud83d\\udd24',\n 'abcd':'\\ud83d\\udd21',\n 'accept':'\\ud83c\\ude51',\n 'aerial_tramway':'\\ud83d\\udea1',\n 'airplane':'\\u2708\\ufe0f',\n 'alarm_clock':'\\u23f0',\n 'alembic':'\\u2697\\ufe0f',\n 'alien':'\\ud83d\\udc7d',\n 'ambulance':'\\ud83d\\ude91',\n 'amphora':'\\ud83c\\udffa',\n 'anchor':'\\u2693\\ufe0f',\n 'angel':'\\ud83d\\udc7c',\n 'anger':'\\ud83d\\udca2',\n 'angry':'\\ud83d\\ude20',\n 'anguished':'\\ud83d\\ude27',\n 'ant':'\\ud83d\\udc1c',\n 'apple':'\\ud83c\\udf4e',\n 'aquarius':'\\u2652\\ufe0f',\n 'aries':'\\u2648\\ufe0f',\n 'arrow_backward':'\\u25c0\\ufe0f',\n 'arrow_double_down':'\\u23ec',\n 'arrow_double_up':'\\u23eb',\n 'arrow_down':'\\u2b07\\ufe0f',\n 'arrow_down_small':'\\ud83d\\udd3d',\n 'arrow_forward':'\\u25b6\\ufe0f',\n 'arrow_heading_down':'\\u2935\\ufe0f',\n 'arrow_heading_up':'\\u2934\\ufe0f',\n 'arrow_left':'\\u2b05\\ufe0f',\n 'arrow_lower_left':'\\u2199\\ufe0f',\n 'arrow_lower_right':'\\u2198\\ufe0f',\n 'arrow_right':'\\u27a1\\ufe0f',\n 'arrow_right_hook':'\\u21aa\\ufe0f',\n 'arrow_up':'\\u2b06\\ufe0f',\n 'arrow_up_down':'\\u2195\\ufe0f',\n 'arrow_up_small':'\\ud83d\\udd3c',\n 'arrow_upper_left':'\\u2196\\ufe0f',\n 'arrow_upper_right':'\\u2197\\ufe0f',\n 'arrows_clockwise':'\\ud83d\\udd03',\n 'arrows_counterclockwise':'\\ud83d\\udd04',\n 'art':'\\ud83c\\udfa8',\n 'articulated_lorry':'\\ud83d\\ude9b',\n 'artificial_satellite':'\\ud83d\\udef0',\n 'astonished':'\\ud83d\\ude32',\n 'athletic_shoe':'\\ud83d\\udc5f',\n 'atm':'\\ud83c\\udfe7',\n 'atom_symbol':'\\u269b\\ufe0f',\n 'avocado':'\\ud83e\\udd51',\n 'b':'\\ud83c\\udd71\\ufe0f',\n 'baby':'\\ud83d\\udc76',\n 'baby_bottle':'\\ud83c\\udf7c',\n 'baby_chick':'\\ud83d\\udc24',\n 'baby_symbol':'\\ud83d\\udebc',\n 'back':'\\ud83d\\udd19',\n 'bacon':'\\ud83e\\udd53',\n 'badminton':'\\ud83c\\udff8',\n 'baggage_claim':'\\ud83d\\udec4',\n 'baguette_bread':'\\ud83e\\udd56',\n 'balance_scale':'\\u2696\\ufe0f',\n 'balloon':'\\ud83c\\udf88',\n 'ballot_box':'\\ud83d\\uddf3',\n 'ballot_box_with_check':'\\u2611\\ufe0f',\n 'bamboo':'\\ud83c\\udf8d',\n 'banana':'\\ud83c\\udf4c',\n 'bangbang':'\\u203c\\ufe0f',\n 'bank':'\\ud83c\\udfe6',\n 'bar_chart':'\\ud83d\\udcca',\n 'barber':'\\ud83d\\udc88',\n 'baseball':'\\u26be\\ufe0f',\n 'basketball':'\\ud83c\\udfc0',\n 'basketball_man':'\\u26f9\\ufe0f',\n 'basketball_woman':'\\u26f9\\ufe0f‍\\u2640\\ufe0f',\n 'bat':'\\ud83e\\udd87',\n 'bath':'\\ud83d\\udec0',\n 'bathtub':'\\ud83d\\udec1',\n 'battery':'\\ud83d\\udd0b',\n 'beach_umbrella':'\\ud83c\\udfd6',\n 'bear':'\\ud83d\\udc3b',\n 'bed':'\\ud83d\\udecf',\n 'bee':'\\ud83d\\udc1d',\n 'beer':'\\ud83c\\udf7a',\n 'beers':'\\ud83c\\udf7b',\n 'beetle':'\\ud83d\\udc1e',\n 'beginner':'\\ud83d\\udd30',\n 'bell':'\\ud83d\\udd14',\n 'bellhop_bell':'\\ud83d\\udece',\n 'bento':'\\ud83c\\udf71',\n 'biking_man':'\\ud83d\\udeb4',\n 'bike':'\\ud83d\\udeb2',\n 'biking_woman':'\\ud83d\\udeb4‍\\u2640\\ufe0f',\n 'bikini':'\\ud83d\\udc59',\n 'biohazard':'\\u2623\\ufe0f',\n 'bird':'\\ud83d\\udc26',\n 'birthday':'\\ud83c\\udf82',\n 'black_circle':'\\u26ab\\ufe0f',\n 'black_flag':'\\ud83c\\udff4',\n 'black_heart':'\\ud83d\\udda4',\n 'black_joker':'\\ud83c\\udccf',\n 'black_large_square':'\\u2b1b\\ufe0f',\n 'black_medium_small_square':'\\u25fe\\ufe0f',\n 'black_medium_square':'\\u25fc\\ufe0f',\n 'black_nib':'\\u2712\\ufe0f',\n 'black_small_square':'\\u25aa\\ufe0f',\n 'black_square_button':'\\ud83d\\udd32',\n 'blonde_man':'\\ud83d\\udc71',\n 'blonde_woman':'\\ud83d\\udc71‍\\u2640\\ufe0f',\n 'blossom':'\\ud83c\\udf3c',\n 'blowfish':'\\ud83d\\udc21',\n 'blue_book':'\\ud83d\\udcd8',\n 'blue_car':'\\ud83d\\ude99',\n 'blue_heart':'\\ud83d\\udc99',\n 'blush':'\\ud83d\\ude0a',\n 'boar':'\\ud83d\\udc17',\n 'boat':'\\u26f5\\ufe0f',\n 'bomb':'\\ud83d\\udca3',\n 'book':'\\ud83d\\udcd6',\n 'bookmark':'\\ud83d\\udd16',\n 'bookmark_tabs':'\\ud83d\\udcd1',\n 'books':'\\ud83d\\udcda',\n 'boom':'\\ud83d\\udca5',\n 'boot':'\\ud83d\\udc62',\n 'bouquet':'\\ud83d\\udc90',\n 'bowing_man':'\\ud83d\\ude47',\n 'bow_and_arrow':'\\ud83c\\udff9',\n 'bowing_woman':'\\ud83d\\ude47‍\\u2640\\ufe0f',\n 'bowling':'\\ud83c\\udfb3',\n 'boxing_glove':'\\ud83e\\udd4a',\n 'boy':'\\ud83d\\udc66',\n 'bread':'\\ud83c\\udf5e',\n 'bride_with_veil':'\\ud83d\\udc70',\n 'bridge_at_night':'\\ud83c\\udf09',\n 'briefcase':'\\ud83d\\udcbc',\n 'broken_heart':'\\ud83d\\udc94',\n 'bug':'\\ud83d\\udc1b',\n 'building_construction':'\\ud83c\\udfd7',\n 'bulb':'\\ud83d\\udca1',\n 'bullettrain_front':'\\ud83d\\ude85',\n 'bullettrain_side':'\\ud83d\\ude84',\n 'burrito':'\\ud83c\\udf2f',\n 'bus':'\\ud83d\\ude8c',\n 'business_suit_levitating':'\\ud83d\\udd74',\n 'busstop':'\\ud83d\\ude8f',\n 'bust_in_silhouette':'\\ud83d\\udc64',\n 'busts_in_silhouette':'\\ud83d\\udc65',\n 'butterfly':'\\ud83e\\udd8b',\n 'cactus':'\\ud83c\\udf35',\n 'cake':'\\ud83c\\udf70',\n 'calendar':'\\ud83d\\udcc6',\n 'call_me_hand':'\\ud83e\\udd19',\n 'calling':'\\ud83d\\udcf2',\n 'camel':'\\ud83d\\udc2b',\n 'camera':'\\ud83d\\udcf7',\n 'camera_flash':'\\ud83d\\udcf8',\n 'camping':'\\ud83c\\udfd5',\n 'cancer':'\\u264b\\ufe0f',\n 'candle':'\\ud83d\\udd6f',\n 'candy':'\\ud83c\\udf6c',\n 'canoe':'\\ud83d\\udef6',\n 'capital_abcd':'\\ud83d\\udd20',\n 'capricorn':'\\u2651\\ufe0f',\n 'car':'\\ud83d\\ude97',\n 'card_file_box':'\\ud83d\\uddc3',\n 'card_index':'\\ud83d\\udcc7',\n 'card_index_dividers':'\\ud83d\\uddc2',\n 'carousel_horse':'\\ud83c\\udfa0',\n 'carrot':'\\ud83e\\udd55',\n 'cat':'\\ud83d\\udc31',\n 'cat2':'\\ud83d\\udc08',\n 'cd':'\\ud83d\\udcbf',\n 'chains':'\\u26d3',\n 'champagne':'\\ud83c\\udf7e',\n 'chart':'\\ud83d\\udcb9',\n 'chart_with_downwards_trend':'\\ud83d\\udcc9',\n 'chart_with_upwards_trend':'\\ud83d\\udcc8',\n 'checkered_flag':'\\ud83c\\udfc1',\n 'cheese':'\\ud83e\\uddc0',\n 'cherries':'\\ud83c\\udf52',\n 'cherry_blossom':'\\ud83c\\udf38',\n 'chestnut':'\\ud83c\\udf30',\n 'chicken':'\\ud83d\\udc14',\n 'children_crossing':'\\ud83d\\udeb8',\n 'chipmunk':'\\ud83d\\udc3f',\n 'chocolate_bar':'\\ud83c\\udf6b',\n 'christmas_tree':'\\ud83c\\udf84',\n 'church':'\\u26ea\\ufe0f',\n 'cinema':'\\ud83c\\udfa6',\n 'circus_tent':'\\ud83c\\udfaa',\n 'city_sunrise':'\\ud83c\\udf07',\n 'city_sunset':'\\ud83c\\udf06',\n 'cityscape':'\\ud83c\\udfd9',\n 'cl':'\\ud83c\\udd91',\n 'clamp':'\\ud83d\\udddc',\n 'clap':'\\ud83d\\udc4f',\n 'clapper':'\\ud83c\\udfac',\n 'classical_building':'\\ud83c\\udfdb',\n 'clinking_glasses':'\\ud83e\\udd42',\n 'clipboard':'\\ud83d\\udccb',\n 'clock1':'\\ud83d\\udd50',\n 'clock10':'\\ud83d\\udd59',\n 'clock1030':'\\ud83d\\udd65',\n 'clock11':'\\ud83d\\udd5a',\n 'clock1130':'\\ud83d\\udd66',\n 'clock12':'\\ud83d\\udd5b',\n 'clock1230':'\\ud83d\\udd67',\n 'clock130':'\\ud83d\\udd5c',\n 'clock2':'\\ud83d\\udd51',\n 'clock230':'\\ud83d\\udd5d',\n 'clock3':'\\ud83d\\udd52',\n 'clock330':'\\ud83d\\udd5e',\n 'clock4':'\\ud83d\\udd53',\n 'clock430':'\\ud83d\\udd5f',\n 'clock5':'\\ud83d\\udd54',\n 'clock530':'\\ud83d\\udd60',\n 'clock6':'\\ud83d\\udd55',\n 'clock630':'\\ud83d\\udd61',\n 'clock7':'\\ud83d\\udd56',\n 'clock730':'\\ud83d\\udd62',\n 'clock8':'\\ud83d\\udd57',\n 'clock830':'\\ud83d\\udd63',\n 'clock9':'\\ud83d\\udd58',\n 'clock930':'\\ud83d\\udd64',\n 'closed_book':'\\ud83d\\udcd5',\n 'closed_lock_with_key':'\\ud83d\\udd10',\n 'closed_umbrella':'\\ud83c\\udf02',\n 'cloud':'\\u2601\\ufe0f',\n 'cloud_with_lightning':'\\ud83c\\udf29',\n 'cloud_with_lightning_and_rain':'\\u26c8',\n 'cloud_with_rain':'\\ud83c\\udf27',\n 'cloud_with_snow':'\\ud83c\\udf28',\n 'clown_face':'\\ud83e\\udd21',\n 'clubs':'\\u2663\\ufe0f',\n 'cocktail':'\\ud83c\\udf78',\n 'coffee':'\\u2615\\ufe0f',\n 'coffin':'\\u26b0\\ufe0f',\n 'cold_sweat':'\\ud83d\\ude30',\n 'comet':'\\u2604\\ufe0f',\n 'computer':'\\ud83d\\udcbb',\n 'computer_mouse':'\\ud83d\\uddb1',\n 'confetti_ball':'\\ud83c\\udf8a',\n 'confounded':'\\ud83d\\ude16',\n 'confused':'\\ud83d\\ude15',\n 'congratulations':'\\u3297\\ufe0f',\n 'construction':'\\ud83d\\udea7',\n 'construction_worker_man':'\\ud83d\\udc77',\n 'construction_worker_woman':'\\ud83d\\udc77‍\\u2640\\ufe0f',\n 'control_knobs':'\\ud83c\\udf9b',\n 'convenience_store':'\\ud83c\\udfea',\n 'cookie':'\\ud83c\\udf6a',\n 'cool':'\\ud83c\\udd92',\n 'policeman':'\\ud83d\\udc6e',\n 'copyright':'\\u00a9\\ufe0f',\n 'corn':'\\ud83c\\udf3d',\n 'couch_and_lamp':'\\ud83d\\udecb',\n 'couple':'\\ud83d\\udc6b',\n 'couple_with_heart_woman_man':'\\ud83d\\udc91',\n 'couple_with_heart_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc68',\n 'couple_with_heart_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc69',\n 'couplekiss_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc68',\n 'couplekiss_man_woman':'\\ud83d\\udc8f',\n 'couplekiss_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc69',\n 'cow':'\\ud83d\\udc2e',\n 'cow2':'\\ud83d\\udc04',\n 'cowboy_hat_face':'\\ud83e\\udd20',\n 'crab':'\\ud83e\\udd80',\n 'crayon':'\\ud83d\\udd8d',\n 'credit_card':'\\ud83d\\udcb3',\n 'crescent_moon':'\\ud83c\\udf19',\n 'cricket':'\\ud83c\\udfcf',\n 'crocodile':'\\ud83d\\udc0a',\n 'croissant':'\\ud83e\\udd50',\n 'crossed_fingers':'\\ud83e\\udd1e',\n 'crossed_flags':'\\ud83c\\udf8c',\n 'crossed_swords':'\\u2694\\ufe0f',\n 'crown':'\\ud83d\\udc51',\n 'cry':'\\ud83d\\ude22',\n 'crying_cat_face':'\\ud83d\\ude3f',\n 'crystal_ball':'\\ud83d\\udd2e',\n 'cucumber':'\\ud83e\\udd52',\n 'cupid':'\\ud83d\\udc98',\n 'curly_loop':'\\u27b0',\n 'currency_exchange':'\\ud83d\\udcb1',\n 'curry':'\\ud83c\\udf5b',\n 'custard':'\\ud83c\\udf6e',\n 'customs':'\\ud83d\\udec3',\n 'cyclone':'\\ud83c\\udf00',\n 'dagger':'\\ud83d\\udde1',\n 'dancer':'\\ud83d\\udc83',\n 'dancing_women':'\\ud83d\\udc6f',\n 'dancing_men':'\\ud83d\\udc6f‍\\u2642\\ufe0f',\n 'dango':'\\ud83c\\udf61',\n 'dark_sunglasses':'\\ud83d\\udd76',\n 'dart':'\\ud83c\\udfaf',\n 'dash':'\\ud83d\\udca8',\n 'date':'\\ud83d\\udcc5',\n 'deciduous_tree':'\\ud83c\\udf33',\n 'deer':'\\ud83e\\udd8c',\n 'department_store':'\\ud83c\\udfec',\n 'derelict_house':'\\ud83c\\udfda',\n 'desert':'\\ud83c\\udfdc',\n 'desert_island':'\\ud83c\\udfdd',\n 'desktop_computer':'\\ud83d\\udda5',\n 'male_detective':'\\ud83d\\udd75\\ufe0f',\n 'diamond_shape_with_a_dot_inside':'\\ud83d\\udca0',\n 'diamonds':'\\u2666\\ufe0f',\n 'disappointed':'\\ud83d\\ude1e',\n 'disappointed_relieved':'\\ud83d\\ude25',\n 'dizzy':'\\ud83d\\udcab',\n 'dizzy_face':'\\ud83d\\ude35',\n 'do_not_litter':'\\ud83d\\udeaf',\n 'dog':'\\ud83d\\udc36',\n 'dog2':'\\ud83d\\udc15',\n 'dollar':'\\ud83d\\udcb5',\n 'dolls':'\\ud83c\\udf8e',\n 'dolphin':'\\ud83d\\udc2c',\n 'door':'\\ud83d\\udeaa',\n 'doughnut':'\\ud83c\\udf69',\n 'dove':'\\ud83d\\udd4a',\n 'dragon':'\\ud83d\\udc09',\n 'dragon_face':'\\ud83d\\udc32',\n 'dress':'\\ud83d\\udc57',\n 'dromedary_camel':'\\ud83d\\udc2a',\n 'drooling_face':'\\ud83e\\udd24',\n 'droplet':'\\ud83d\\udca7',\n 'drum':'\\ud83e\\udd41',\n 'duck':'\\ud83e\\udd86',\n 'dvd':'\\ud83d\\udcc0',\n 'e-mail':'\\ud83d\\udce7',\n 'eagle':'\\ud83e\\udd85',\n 'ear':'\\ud83d\\udc42',\n 'ear_of_rice':'\\ud83c\\udf3e',\n 'earth_africa':'\\ud83c\\udf0d',\n 'earth_americas':'\\ud83c\\udf0e',\n 'earth_asia':'\\ud83c\\udf0f',\n 'egg':'\\ud83e\\udd5a',\n 'eggplant':'\\ud83c\\udf46',\n 'eight_pointed_black_star':'\\u2734\\ufe0f',\n 'eight_spoked_asterisk':'\\u2733\\ufe0f',\n 'electric_plug':'\\ud83d\\udd0c',\n 'elephant':'\\ud83d\\udc18',\n 'email':'\\u2709\\ufe0f',\n 'end':'\\ud83d\\udd1a',\n 'envelope_with_arrow':'\\ud83d\\udce9',\n 'euro':'\\ud83d\\udcb6',\n 'european_castle':'\\ud83c\\udff0',\n 'european_post_office':'\\ud83c\\udfe4',\n 'evergreen_tree':'\\ud83c\\udf32',\n 'exclamation':'\\u2757\\ufe0f',\n 'expressionless':'\\ud83d\\ude11',\n 'eye':'\\ud83d\\udc41',\n 'eye_speech_bubble':'\\ud83d\\udc41‍\\ud83d\\udde8',\n 'eyeglasses':'\\ud83d\\udc53',\n 'eyes':'\\ud83d\\udc40',\n 'face_with_head_bandage':'\\ud83e\\udd15',\n 'face_with_thermometer':'\\ud83e\\udd12',\n 'fist_oncoming':'\\ud83d\\udc4a',\n 'factory':'\\ud83c\\udfed',\n 'fallen_leaf':'\\ud83c\\udf42',\n 'family_man_woman_boy':'\\ud83d\\udc6a',\n 'family_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_woman_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_woman_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_man_woman_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_woman_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'fast_forward':'\\u23e9',\n 'fax':'\\ud83d\\udce0',\n 'fearful':'\\ud83d\\ude28',\n 'feet':'\\ud83d\\udc3e',\n 'female_detective':'\\ud83d\\udd75\\ufe0f‍\\u2640\\ufe0f',\n 'ferris_wheel':'\\ud83c\\udfa1',\n 'ferry':'\\u26f4',\n 'field_hockey':'\\ud83c\\udfd1',\n 'file_cabinet':'\\ud83d\\uddc4',\n 'file_folder':'\\ud83d\\udcc1',\n 'film_projector':'\\ud83d\\udcfd',\n 'film_strip':'\\ud83c\\udf9e',\n 'fire':'\\ud83d\\udd25',\n 'fire_engine':'\\ud83d\\ude92',\n 'fireworks':'\\ud83c\\udf86',\n 'first_quarter_moon':'\\ud83c\\udf13',\n 'first_quarter_moon_with_face':'\\ud83c\\udf1b',\n 'fish':'\\ud83d\\udc1f',\n 'fish_cake':'\\ud83c\\udf65',\n 'fishing_pole_and_fish':'\\ud83c\\udfa3',\n 'fist_raised':'\\u270a',\n 'fist_left':'\\ud83e\\udd1b',\n 'fist_right':'\\ud83e\\udd1c',\n 'flags':'\\ud83c\\udf8f',\n 'flashlight':'\\ud83d\\udd26',\n 'fleur_de_lis':'\\u269c\\ufe0f',\n 'flight_arrival':'\\ud83d\\udeec',\n 'flight_departure':'\\ud83d\\udeeb',\n 'floppy_disk':'\\ud83d\\udcbe',\n 'flower_playing_cards':'\\ud83c\\udfb4',\n 'flushed':'\\ud83d\\ude33',\n 'fog':'\\ud83c\\udf2b',\n 'foggy':'\\ud83c\\udf01',\n 'football':'\\ud83c\\udfc8',\n 'footprints':'\\ud83d\\udc63',\n 'fork_and_knife':'\\ud83c\\udf74',\n 'fountain':'\\u26f2\\ufe0f',\n 'fountain_pen':'\\ud83d\\udd8b',\n 'four_leaf_clover':'\\ud83c\\udf40',\n 'fox_face':'\\ud83e\\udd8a',\n 'framed_picture':'\\ud83d\\uddbc',\n 'free':'\\ud83c\\udd93',\n 'fried_egg':'\\ud83c\\udf73',\n 'fried_shrimp':'\\ud83c\\udf64',\n 'fries':'\\ud83c\\udf5f',\n 'frog':'\\ud83d\\udc38',\n 'frowning':'\\ud83d\\ude26',\n 'frowning_face':'\\u2639\\ufe0f',\n 'frowning_man':'\\ud83d\\ude4d‍\\u2642\\ufe0f',\n 'frowning_woman':'\\ud83d\\ude4d',\n 'middle_finger':'\\ud83d\\udd95',\n 'fuelpump':'\\u26fd\\ufe0f',\n 'full_moon':'\\ud83c\\udf15',\n 'full_moon_with_face':'\\ud83c\\udf1d',\n 'funeral_urn':'\\u26b1\\ufe0f',\n 'game_die':'\\ud83c\\udfb2',\n 'gear':'\\u2699\\ufe0f',\n 'gem':'\\ud83d\\udc8e',\n 'gemini':'\\u264a\\ufe0f',\n 'ghost':'\\ud83d\\udc7b',\n 'gift':'\\ud83c\\udf81',\n 'gift_heart':'\\ud83d\\udc9d',\n 'girl':'\\ud83d\\udc67',\n 'globe_with_meridians':'\\ud83c\\udf10',\n 'goal_net':'\\ud83e\\udd45',\n 'goat':'\\ud83d\\udc10',\n 'golf':'\\u26f3\\ufe0f',\n 'golfing_man':'\\ud83c\\udfcc\\ufe0f',\n 'golfing_woman':'\\ud83c\\udfcc\\ufe0f‍\\u2640\\ufe0f',\n 'gorilla':'\\ud83e\\udd8d',\n 'grapes':'\\ud83c\\udf47',\n 'green_apple':'\\ud83c\\udf4f',\n 'green_book':'\\ud83d\\udcd7',\n 'green_heart':'\\ud83d\\udc9a',\n 'green_salad':'\\ud83e\\udd57',\n 'grey_exclamation':'\\u2755',\n 'grey_question':'\\u2754',\n 'grimacing':'\\ud83d\\ude2c',\n 'grin':'\\ud83d\\ude01',\n 'grinning':'\\ud83d\\ude00',\n 'guardsman':'\\ud83d\\udc82',\n 'guardswoman':'\\ud83d\\udc82‍\\u2640\\ufe0f',\n 'guitar':'\\ud83c\\udfb8',\n 'gun':'\\ud83d\\udd2b',\n 'haircut_woman':'\\ud83d\\udc87',\n 'haircut_man':'\\ud83d\\udc87‍\\u2642\\ufe0f',\n 'hamburger':'\\ud83c\\udf54',\n 'hammer':'\\ud83d\\udd28',\n 'hammer_and_pick':'\\u2692',\n 'hammer_and_wrench':'\\ud83d\\udee0',\n 'hamster':'\\ud83d\\udc39',\n 'hand':'\\u270b',\n 'handbag':'\\ud83d\\udc5c',\n 'handshake':'\\ud83e\\udd1d',\n 'hankey':'\\ud83d\\udca9',\n 'hatched_chick':'\\ud83d\\udc25',\n 'hatching_chick':'\\ud83d\\udc23',\n 'headphones':'\\ud83c\\udfa7',\n 'hear_no_evil':'\\ud83d\\ude49',\n 'heart':'\\u2764\\ufe0f',\n 'heart_decoration':'\\ud83d\\udc9f',\n 'heart_eyes':'\\ud83d\\ude0d',\n 'heart_eyes_cat':'\\ud83d\\ude3b',\n 'heartbeat':'\\ud83d\\udc93',\n 'heartpulse':'\\ud83d\\udc97',\n 'hearts':'\\u2665\\ufe0f',\n 'heavy_check_mark':'\\u2714\\ufe0f',\n 'heavy_division_sign':'\\u2797',\n 'heavy_dollar_sign':'\\ud83d\\udcb2',\n 'heavy_heart_exclamation':'\\u2763\\ufe0f',\n 'heavy_minus_sign':'\\u2796',\n 'heavy_multiplication_x':'\\u2716\\ufe0f',\n 'heavy_plus_sign':'\\u2795',\n 'helicopter':'\\ud83d\\ude81',\n 'herb':'\\ud83c\\udf3f',\n 'hibiscus':'\\ud83c\\udf3a',\n 'high_brightness':'\\ud83d\\udd06',\n 'high_heel':'\\ud83d\\udc60',\n 'hocho':'\\ud83d\\udd2a',\n 'hole':'\\ud83d\\udd73',\n 'honey_pot':'\\ud83c\\udf6f',\n 'horse':'\\ud83d\\udc34',\n 'horse_racing':'\\ud83c\\udfc7',\n 'hospital':'\\ud83c\\udfe5',\n 'hot_pepper':'\\ud83c\\udf36',\n 'hotdog':'\\ud83c\\udf2d',\n 'hotel':'\\ud83c\\udfe8',\n 'hotsprings':'\\u2668\\ufe0f',\n 'hourglass':'\\u231b\\ufe0f',\n 'hourglass_flowing_sand':'\\u23f3',\n 'house':'\\ud83c\\udfe0',\n 'house_with_garden':'\\ud83c\\udfe1',\n 'houses':'\\ud83c\\udfd8',\n 'hugs':'\\ud83e\\udd17',\n 'hushed':'\\ud83d\\ude2f',\n 'ice_cream':'\\ud83c\\udf68',\n 'ice_hockey':'\\ud83c\\udfd2',\n 'ice_skate':'\\u26f8',\n 'icecream':'\\ud83c\\udf66',\n 'id':'\\ud83c\\udd94',\n 'ideograph_advantage':'\\ud83c\\ude50',\n 'imp':'\\ud83d\\udc7f',\n 'inbox_tray':'\\ud83d\\udce5',\n 'incoming_envelope':'\\ud83d\\udce8',\n 'tipping_hand_woman':'\\ud83d\\udc81',\n 'information_source':'\\u2139\\ufe0f',\n 'innocent':'\\ud83d\\ude07',\n 'interrobang':'\\u2049\\ufe0f',\n 'iphone':'\\ud83d\\udcf1',\n 'izakaya_lantern':'\\ud83c\\udfee',\n 'jack_o_lantern':'\\ud83c\\udf83',\n 'japan':'\\ud83d\\uddfe',\n 'japanese_castle':'\\ud83c\\udfef',\n 'japanese_goblin':'\\ud83d\\udc7a',\n 'japanese_ogre':'\\ud83d\\udc79',\n 'jeans':'\\ud83d\\udc56',\n 'joy':'\\ud83d\\ude02',\n 'joy_cat':'\\ud83d\\ude39',\n 'joystick':'\\ud83d\\udd79',\n 'kaaba':'\\ud83d\\udd4b',\n 'key':'\\ud83d\\udd11',\n 'keyboard':'\\u2328\\ufe0f',\n 'keycap_ten':'\\ud83d\\udd1f',\n 'kick_scooter':'\\ud83d\\udef4',\n 'kimono':'\\ud83d\\udc58',\n 'kiss':'\\ud83d\\udc8b',\n 'kissing':'\\ud83d\\ude17',\n 'kissing_cat':'\\ud83d\\ude3d',\n 'kissing_closed_eyes':'\\ud83d\\ude1a',\n 'kissing_heart':'\\ud83d\\ude18',\n 'kissing_smiling_eyes':'\\ud83d\\ude19',\n 'kiwi_fruit':'\\ud83e\\udd5d',\n 'koala':'\\ud83d\\udc28',\n 'koko':'\\ud83c\\ude01',\n 'label':'\\ud83c\\udff7',\n 'large_blue_circle':'\\ud83d\\udd35',\n 'large_blue_diamond':'\\ud83d\\udd37',\n 'large_orange_diamond':'\\ud83d\\udd36',\n 'last_quarter_moon':'\\ud83c\\udf17',\n 'last_quarter_moon_with_face':'\\ud83c\\udf1c',\n 'latin_cross':'\\u271d\\ufe0f',\n 'laughing':'\\ud83d\\ude06',\n 'leaves':'\\ud83c\\udf43',\n 'ledger':'\\ud83d\\udcd2',\n 'left_luggage':'\\ud83d\\udec5',\n 'left_right_arrow':'\\u2194\\ufe0f',\n 'leftwards_arrow_with_hook':'\\u21a9\\ufe0f',\n 'lemon':'\\ud83c\\udf4b',\n 'leo':'\\u264c\\ufe0f',\n 'leopard':'\\ud83d\\udc06',\n 'level_slider':'\\ud83c\\udf9a',\n 'libra':'\\u264e\\ufe0f',\n 'light_rail':'\\ud83d\\ude88',\n 'link':'\\ud83d\\udd17',\n 'lion':'\\ud83e\\udd81',\n 'lips':'\\ud83d\\udc44',\n 'lipstick':'\\ud83d\\udc84',\n 'lizard':'\\ud83e\\udd8e',\n 'lock':'\\ud83d\\udd12',\n 'lock_with_ink_pen':'\\ud83d\\udd0f',\n 'lollipop':'\\ud83c\\udf6d',\n 'loop':'\\u27bf',\n 'loud_sound':'\\ud83d\\udd0a',\n 'loudspeaker':'\\ud83d\\udce2',\n 'love_hotel':'\\ud83c\\udfe9',\n 'love_letter':'\\ud83d\\udc8c',\n 'low_brightness':'\\ud83d\\udd05',\n 'lying_face':'\\ud83e\\udd25',\n 'm':'\\u24c2\\ufe0f',\n 'mag':'\\ud83d\\udd0d',\n 'mag_right':'\\ud83d\\udd0e',\n 'mahjong':'\\ud83c\\udc04\\ufe0f',\n 'mailbox':'\\ud83d\\udceb',\n 'mailbox_closed':'\\ud83d\\udcea',\n 'mailbox_with_mail':'\\ud83d\\udcec',\n 'mailbox_with_no_mail':'\\ud83d\\udced',\n 'man':'\\ud83d\\udc68',\n 'man_artist':'\\ud83d\\udc68‍\\ud83c\\udfa8',\n 'man_astronaut':'\\ud83d\\udc68‍\\ud83d\\ude80',\n 'man_cartwheeling':'\\ud83e\\udd38‍\\u2642\\ufe0f',\n 'man_cook':'\\ud83d\\udc68‍\\ud83c\\udf73',\n 'man_dancing':'\\ud83d\\udd7a',\n 'man_facepalming':'\\ud83e\\udd26‍\\u2642\\ufe0f',\n 'man_factory_worker':'\\ud83d\\udc68‍\\ud83c\\udfed',\n 'man_farmer':'\\ud83d\\udc68‍\\ud83c\\udf3e',\n 'man_firefighter':'\\ud83d\\udc68‍\\ud83d\\ude92',\n 'man_health_worker':'\\ud83d\\udc68‍\\u2695\\ufe0f',\n 'man_in_tuxedo':'\\ud83e\\udd35',\n 'man_judge':'\\ud83d\\udc68‍\\u2696\\ufe0f',\n 'man_juggling':'\\ud83e\\udd39‍\\u2642\\ufe0f',\n 'man_mechanic':'\\ud83d\\udc68‍\\ud83d\\udd27',\n 'man_office_worker':'\\ud83d\\udc68‍\\ud83d\\udcbc',\n 'man_pilot':'\\ud83d\\udc68‍\\u2708\\ufe0f',\n 'man_playing_handball':'\\ud83e\\udd3e‍\\u2642\\ufe0f',\n 'man_playing_water_polo':'\\ud83e\\udd3d‍\\u2642\\ufe0f',\n 'man_scientist':'\\ud83d\\udc68‍\\ud83d\\udd2c',\n 'man_shrugging':'\\ud83e\\udd37‍\\u2642\\ufe0f',\n 'man_singer':'\\ud83d\\udc68‍\\ud83c\\udfa4',\n 'man_student':'\\ud83d\\udc68‍\\ud83c\\udf93',\n 'man_teacher':'\\ud83d\\udc68‍\\ud83c\\udfeb',\n 'man_technologist':'\\ud83d\\udc68‍\\ud83d\\udcbb',\n 'man_with_gua_pi_mao':'\\ud83d\\udc72',\n 'man_with_turban':'\\ud83d\\udc73',\n 'tangerine':'\\ud83c\\udf4a',\n 'mans_shoe':'\\ud83d\\udc5e',\n 'mantelpiece_clock':'\\ud83d\\udd70',\n 'maple_leaf':'\\ud83c\\udf41',\n 'martial_arts_uniform':'\\ud83e\\udd4b',\n 'mask':'\\ud83d\\ude37',\n 'massage_woman':'\\ud83d\\udc86',\n 'massage_man':'\\ud83d\\udc86‍\\u2642\\ufe0f',\n 'meat_on_bone':'\\ud83c\\udf56',\n 'medal_military':'\\ud83c\\udf96',\n 'medal_sports':'\\ud83c\\udfc5',\n 'mega':'\\ud83d\\udce3',\n 'melon':'\\ud83c\\udf48',\n 'memo':'\\ud83d\\udcdd',\n 'men_wrestling':'\\ud83e\\udd3c‍\\u2642\\ufe0f',\n 'menorah':'\\ud83d\\udd4e',\n 'mens':'\\ud83d\\udeb9',\n 'metal':'\\ud83e\\udd18',\n 'metro':'\\ud83d\\ude87',\n 'microphone':'\\ud83c\\udfa4',\n 'microscope':'\\ud83d\\udd2c',\n 'milk_glass':'\\ud83e\\udd5b',\n 'milky_way':'\\ud83c\\udf0c',\n 'minibus':'\\ud83d\\ude90',\n 'minidisc':'\\ud83d\\udcbd',\n 'mobile_phone_off':'\\ud83d\\udcf4',\n 'money_mouth_face':'\\ud83e\\udd11',\n 'money_with_wings':'\\ud83d\\udcb8',\n 'moneybag':'\\ud83d\\udcb0',\n 'monkey':'\\ud83d\\udc12',\n 'monkey_face':'\\ud83d\\udc35',\n 'monorail':'\\ud83d\\ude9d',\n 'moon':'\\ud83c\\udf14',\n 'mortar_board':'\\ud83c\\udf93',\n 'mosque':'\\ud83d\\udd4c',\n 'motor_boat':'\\ud83d\\udee5',\n 'motor_scooter':'\\ud83d\\udef5',\n 'motorcycle':'\\ud83c\\udfcd',\n 'motorway':'\\ud83d\\udee3',\n 'mount_fuji':'\\ud83d\\uddfb',\n 'mountain':'\\u26f0',\n 'mountain_biking_man':'\\ud83d\\udeb5',\n 'mountain_biking_woman':'\\ud83d\\udeb5‍\\u2640\\ufe0f',\n 'mountain_cableway':'\\ud83d\\udea0',\n 'mountain_railway':'\\ud83d\\ude9e',\n 'mountain_snow':'\\ud83c\\udfd4',\n 'mouse':'\\ud83d\\udc2d',\n 'mouse2':'\\ud83d\\udc01',\n 'movie_camera':'\\ud83c\\udfa5',\n 'moyai':'\\ud83d\\uddff',\n 'mrs_claus':'\\ud83e\\udd36',\n 'muscle':'\\ud83d\\udcaa',\n 'mushroom':'\\ud83c\\udf44',\n 'musical_keyboard':'\\ud83c\\udfb9',\n 'musical_note':'\\ud83c\\udfb5',\n 'musical_score':'\\ud83c\\udfbc',\n 'mute':'\\ud83d\\udd07',\n 'nail_care':'\\ud83d\\udc85',\n 'name_badge':'\\ud83d\\udcdb',\n 'national_park':'\\ud83c\\udfde',\n 'nauseated_face':'\\ud83e\\udd22',\n 'necktie':'\\ud83d\\udc54',\n 'negative_squared_cross_mark':'\\u274e',\n 'nerd_face':'\\ud83e\\udd13',\n 'neutral_face':'\\ud83d\\ude10',\n 'new':'\\ud83c\\udd95',\n 'new_moon':'\\ud83c\\udf11',\n 'new_moon_with_face':'\\ud83c\\udf1a',\n 'newspaper':'\\ud83d\\udcf0',\n 'newspaper_roll':'\\ud83d\\uddde',\n 'next_track_button':'\\u23ed',\n 'ng':'\\ud83c\\udd96',\n 'no_good_man':'\\ud83d\\ude45‍\\u2642\\ufe0f',\n 'no_good_woman':'\\ud83d\\ude45',\n 'night_with_stars':'\\ud83c\\udf03',\n 'no_bell':'\\ud83d\\udd15',\n 'no_bicycles':'\\ud83d\\udeb3',\n 'no_entry':'\\u26d4\\ufe0f',\n 'no_entry_sign':'\\ud83d\\udeab',\n 'no_mobile_phones':'\\ud83d\\udcf5',\n 'no_mouth':'\\ud83d\\ude36',\n 'no_pedestrians':'\\ud83d\\udeb7',\n 'no_smoking':'\\ud83d\\udead',\n 'non-potable_water':'\\ud83d\\udeb1',\n 'nose':'\\ud83d\\udc43',\n 'notebook':'\\ud83d\\udcd3',\n 'notebook_with_decorative_cover':'\\ud83d\\udcd4',\n 'notes':'\\ud83c\\udfb6',\n 'nut_and_bolt':'\\ud83d\\udd29',\n 'o':'\\u2b55\\ufe0f',\n 'o2':'\\ud83c\\udd7e\\ufe0f',\n 'ocean':'\\ud83c\\udf0a',\n 'octopus':'\\ud83d\\udc19',\n 'oden':'\\ud83c\\udf62',\n 'office':'\\ud83c\\udfe2',\n 'oil_drum':'\\ud83d\\udee2',\n 'ok':'\\ud83c\\udd97',\n 'ok_hand':'\\ud83d\\udc4c',\n 'ok_man':'\\ud83d\\ude46‍\\u2642\\ufe0f',\n 'ok_woman':'\\ud83d\\ude46',\n 'old_key':'\\ud83d\\udddd',\n 'older_man':'\\ud83d\\udc74',\n 'older_woman':'\\ud83d\\udc75',\n 'om':'\\ud83d\\udd49',\n 'on':'\\ud83d\\udd1b',\n 'oncoming_automobile':'\\ud83d\\ude98',\n 'oncoming_bus':'\\ud83d\\ude8d',\n 'oncoming_police_car':'\\ud83d\\ude94',\n 'oncoming_taxi':'\\ud83d\\ude96',\n 'open_file_folder':'\\ud83d\\udcc2',\n 'open_hands':'\\ud83d\\udc50',\n 'open_mouth':'\\ud83d\\ude2e',\n 'open_umbrella':'\\u2602\\ufe0f',\n 'ophiuchus':'\\u26ce',\n 'orange_book':'\\ud83d\\udcd9',\n 'orthodox_cross':'\\u2626\\ufe0f',\n 'outbox_tray':'\\ud83d\\udce4',\n 'owl':'\\ud83e\\udd89',\n 'ox':'\\ud83d\\udc02',\n 'package':'\\ud83d\\udce6',\n 'page_facing_up':'\\ud83d\\udcc4',\n 'page_with_curl':'\\ud83d\\udcc3',\n 'pager':'\\ud83d\\udcdf',\n 'paintbrush':'\\ud83d\\udd8c',\n 'palm_tree':'\\ud83c\\udf34',\n 'pancakes':'\\ud83e\\udd5e',\n 'panda_face':'\\ud83d\\udc3c',\n 'paperclip':'\\ud83d\\udcce',\n 'paperclips':'\\ud83d\\udd87',\n 'parasol_on_ground':'\\u26f1',\n 'parking':'\\ud83c\\udd7f\\ufe0f',\n 'part_alternation_mark':'\\u303d\\ufe0f',\n 'partly_sunny':'\\u26c5\\ufe0f',\n 'passenger_ship':'\\ud83d\\udef3',\n 'passport_control':'\\ud83d\\udec2',\n 'pause_button':'\\u23f8',\n 'peace_symbol':'\\u262e\\ufe0f',\n 'peach':'\\ud83c\\udf51',\n 'peanuts':'\\ud83e\\udd5c',\n 'pear':'\\ud83c\\udf50',\n 'pen':'\\ud83d\\udd8a',\n 'pencil2':'\\u270f\\ufe0f',\n 'penguin':'\\ud83d\\udc27',\n 'pensive':'\\ud83d\\ude14',\n 'performing_arts':'\\ud83c\\udfad',\n 'persevere':'\\ud83d\\ude23',\n 'person_fencing':'\\ud83e\\udd3a',\n 'pouting_woman':'\\ud83d\\ude4e',\n 'phone':'\\u260e\\ufe0f',\n 'pick':'\\u26cf',\n 'pig':'\\ud83d\\udc37',\n 'pig2':'\\ud83d\\udc16',\n 'pig_nose':'\\ud83d\\udc3d',\n 'pill':'\\ud83d\\udc8a',\n 'pineapple':'\\ud83c\\udf4d',\n 'ping_pong':'\\ud83c\\udfd3',\n 'pisces':'\\u2653\\ufe0f',\n 'pizza':'\\ud83c\\udf55',\n 'place_of_worship':'\\ud83d\\uded0',\n 'plate_with_cutlery':'\\ud83c\\udf7d',\n 'play_or_pause_button':'\\u23ef',\n 'point_down':'\\ud83d\\udc47',\n 'point_left':'\\ud83d\\udc48',\n 'point_right':'\\ud83d\\udc49',\n 'point_up':'\\u261d\\ufe0f',\n 'point_up_2':'\\ud83d\\udc46',\n 'police_car':'\\ud83d\\ude93',\n 'policewoman':'\\ud83d\\udc6e‍\\u2640\\ufe0f',\n 'poodle':'\\ud83d\\udc29',\n 'popcorn':'\\ud83c\\udf7f',\n 'post_office':'\\ud83c\\udfe3',\n 'postal_horn':'\\ud83d\\udcef',\n 'postbox':'\\ud83d\\udcee',\n 'potable_water':'\\ud83d\\udeb0',\n 'potato':'\\ud83e\\udd54',\n 'pouch':'\\ud83d\\udc5d',\n 'poultry_leg':'\\ud83c\\udf57',\n 'pound':'\\ud83d\\udcb7',\n 'rage':'\\ud83d\\ude21',\n 'pouting_cat':'\\ud83d\\ude3e',\n 'pouting_man':'\\ud83d\\ude4e‍\\u2642\\ufe0f',\n 'pray':'\\ud83d\\ude4f',\n 'prayer_beads':'\\ud83d\\udcff',\n 'pregnant_woman':'\\ud83e\\udd30',\n 'previous_track_button':'\\u23ee',\n 'prince':'\\ud83e\\udd34',\n 'princess':'\\ud83d\\udc78',\n 'printer':'\\ud83d\\udda8',\n 'purple_heart':'\\ud83d\\udc9c',\n 'purse':'\\ud83d\\udc5b',\n 'pushpin':'\\ud83d\\udccc',\n 'put_litter_in_its_place':'\\ud83d\\udeae',\n 'question':'\\u2753',\n 'rabbit':'\\ud83d\\udc30',\n 'rabbit2':'\\ud83d\\udc07',\n 'racehorse':'\\ud83d\\udc0e',\n 'racing_car':'\\ud83c\\udfce',\n 'radio':'\\ud83d\\udcfb',\n 'radio_button':'\\ud83d\\udd18',\n 'radioactive':'\\u2622\\ufe0f',\n 'railway_car':'\\ud83d\\ude83',\n 'railway_track':'\\ud83d\\udee4',\n 'rainbow':'\\ud83c\\udf08',\n 'rainbow_flag':'\\ud83c\\udff3\\ufe0f‍\\ud83c\\udf08',\n 'raised_back_of_hand':'\\ud83e\\udd1a',\n 'raised_hand_with_fingers_splayed':'\\ud83d\\udd90',\n 'raised_hands':'\\ud83d\\ude4c',\n 'raising_hand_woman':'\\ud83d\\ude4b',\n 'raising_hand_man':'\\ud83d\\ude4b‍\\u2642\\ufe0f',\n 'ram':'\\ud83d\\udc0f',\n 'ramen':'\\ud83c\\udf5c',\n 'rat':'\\ud83d\\udc00',\n 'record_button':'\\u23fa',\n 'recycle':'\\u267b\\ufe0f',\n 'red_circle':'\\ud83d\\udd34',\n 'registered':'\\u00ae\\ufe0f',\n 'relaxed':'\\u263a\\ufe0f',\n 'relieved':'\\ud83d\\ude0c',\n 'reminder_ribbon':'\\ud83c\\udf97',\n 'repeat':'\\ud83d\\udd01',\n 'repeat_one':'\\ud83d\\udd02',\n 'rescue_worker_helmet':'\\u26d1',\n 'restroom':'\\ud83d\\udebb',\n 'revolving_hearts':'\\ud83d\\udc9e',\n 'rewind':'\\u23ea',\n 'rhinoceros':'\\ud83e\\udd8f',\n 'ribbon':'\\ud83c\\udf80',\n 'rice':'\\ud83c\\udf5a',\n 'rice_ball':'\\ud83c\\udf59',\n 'rice_cracker':'\\ud83c\\udf58',\n 'rice_scene':'\\ud83c\\udf91',\n 'right_anger_bubble':'\\ud83d\\uddef',\n 'ring':'\\ud83d\\udc8d',\n 'robot':'\\ud83e\\udd16',\n 'rocket':'\\ud83d\\ude80',\n 'rofl':'\\ud83e\\udd23',\n 'roll_eyes':'\\ud83d\\ude44',\n 'roller_coaster':'\\ud83c\\udfa2',\n 'rooster':'\\ud83d\\udc13',\n 'rose':'\\ud83c\\udf39',\n 'rosette':'\\ud83c\\udff5',\n 'rotating_light':'\\ud83d\\udea8',\n 'round_pushpin':'\\ud83d\\udccd',\n 'rowing_man':'\\ud83d\\udea3',\n 'rowing_woman':'\\ud83d\\udea3‍\\u2640\\ufe0f',\n 'rugby_football':'\\ud83c\\udfc9',\n 'running_man':'\\ud83c\\udfc3',\n 'running_shirt_with_sash':'\\ud83c\\udfbd',\n 'running_woman':'\\ud83c\\udfc3‍\\u2640\\ufe0f',\n 'sa':'\\ud83c\\ude02\\ufe0f',\n 'sagittarius':'\\u2650\\ufe0f',\n 'sake':'\\ud83c\\udf76',\n 'sandal':'\\ud83d\\udc61',\n 'santa':'\\ud83c\\udf85',\n 'satellite':'\\ud83d\\udce1',\n 'saxophone':'\\ud83c\\udfb7',\n 'school':'\\ud83c\\udfeb',\n 'school_satchel':'\\ud83c\\udf92',\n 'scissors':'\\u2702\\ufe0f',\n 'scorpion':'\\ud83e\\udd82',\n 'scorpius':'\\u264f\\ufe0f',\n 'scream':'\\ud83d\\ude31',\n 'scream_cat':'\\ud83d\\ude40',\n 'scroll':'\\ud83d\\udcdc',\n 'seat':'\\ud83d\\udcba',\n 'secret':'\\u3299\\ufe0f',\n 'see_no_evil':'\\ud83d\\ude48',\n 'seedling':'\\ud83c\\udf31',\n 'selfie':'\\ud83e\\udd33',\n 'shallow_pan_of_food':'\\ud83e\\udd58',\n 'shamrock':'\\u2618\\ufe0f',\n 'shark':'\\ud83e\\udd88',\n 'shaved_ice':'\\ud83c\\udf67',\n 'sheep':'\\ud83d\\udc11',\n 'shell':'\\ud83d\\udc1a',\n 'shield':'\\ud83d\\udee1',\n 'shinto_shrine':'\\u26e9',\n 'ship':'\\ud83d\\udea2',\n 'shirt':'\\ud83d\\udc55',\n 'shopping':'\\ud83d\\udecd',\n 'shopping_cart':'\\ud83d\\uded2',\n 'shower':'\\ud83d\\udebf',\n 'shrimp':'\\ud83e\\udd90',\n 'signal_strength':'\\ud83d\\udcf6',\n 'six_pointed_star':'\\ud83d\\udd2f',\n 'ski':'\\ud83c\\udfbf',\n 'skier':'\\u26f7',\n 'skull':'\\ud83d\\udc80',\n 'skull_and_crossbones':'\\u2620\\ufe0f',\n 'sleeping':'\\ud83d\\ude34',\n 'sleeping_bed':'\\ud83d\\udecc',\n 'sleepy':'\\ud83d\\ude2a',\n 'slightly_frowning_face':'\\ud83d\\ude41',\n 'slightly_smiling_face':'\\ud83d\\ude42',\n 'slot_machine':'\\ud83c\\udfb0',\n 'small_airplane':'\\ud83d\\udee9',\n 'small_blue_diamond':'\\ud83d\\udd39',\n 'small_orange_diamond':'\\ud83d\\udd38',\n 'small_red_triangle':'\\ud83d\\udd3a',\n 'small_red_triangle_down':'\\ud83d\\udd3b',\n 'smile':'\\ud83d\\ude04',\n 'smile_cat':'\\ud83d\\ude38',\n 'smiley':'\\ud83d\\ude03',\n 'smiley_cat':'\\ud83d\\ude3a',\n 'smiling_imp':'\\ud83d\\ude08',\n 'smirk':'\\ud83d\\ude0f',\n 'smirk_cat':'\\ud83d\\ude3c',\n 'smoking':'\\ud83d\\udeac',\n 'snail':'\\ud83d\\udc0c',\n 'snake':'\\ud83d\\udc0d',\n 'sneezing_face':'\\ud83e\\udd27',\n 'snowboarder':'\\ud83c\\udfc2',\n 'snowflake':'\\u2744\\ufe0f',\n 'snowman':'\\u26c4\\ufe0f',\n 'snowman_with_snow':'\\u2603\\ufe0f',\n 'sob':'\\ud83d\\ude2d',\n 'soccer':'\\u26bd\\ufe0f',\n 'soon':'\\ud83d\\udd1c',\n 'sos':'\\ud83c\\udd98',\n 'sound':'\\ud83d\\udd09',\n 'space_invader':'\\ud83d\\udc7e',\n 'spades':'\\u2660\\ufe0f',\n 'spaghetti':'\\ud83c\\udf5d',\n 'sparkle':'\\u2747\\ufe0f',\n 'sparkler':'\\ud83c\\udf87',\n 'sparkles':'\\u2728',\n 'sparkling_heart':'\\ud83d\\udc96',\n 'speak_no_evil':'\\ud83d\\ude4a',\n 'speaker':'\\ud83d\\udd08',\n 'speaking_head':'\\ud83d\\udde3',\n 'speech_balloon':'\\ud83d\\udcac',\n 'speedboat':'\\ud83d\\udea4',\n 'spider':'\\ud83d\\udd77',\n 'spider_web':'\\ud83d\\udd78',\n 'spiral_calendar':'\\ud83d\\uddd3',\n 'spiral_notepad':'\\ud83d\\uddd2',\n 'spoon':'\\ud83e\\udd44',\n 'squid':'\\ud83e\\udd91',\n 'stadium':'\\ud83c\\udfdf',\n 'star':'\\u2b50\\ufe0f',\n 'star2':'\\ud83c\\udf1f',\n 'star_and_crescent':'\\u262a\\ufe0f',\n 'star_of_david':'\\u2721\\ufe0f',\n 'stars':'\\ud83c\\udf20',\n 'station':'\\ud83d\\ude89',\n 'statue_of_liberty':'\\ud83d\\uddfd',\n 'steam_locomotive':'\\ud83d\\ude82',\n 'stew':'\\ud83c\\udf72',\n 'stop_button':'\\u23f9',\n 'stop_sign':'\\ud83d\\uded1',\n 'stopwatch':'\\u23f1',\n 'straight_ruler':'\\ud83d\\udccf',\n 'strawberry':'\\ud83c\\udf53',\n 'stuck_out_tongue':'\\ud83d\\ude1b',\n 'stuck_out_tongue_closed_eyes':'\\ud83d\\ude1d',\n 'stuck_out_tongue_winking_eye':'\\ud83d\\ude1c',\n 'studio_microphone':'\\ud83c\\udf99',\n 'stuffed_flatbread':'\\ud83e\\udd59',\n 'sun_behind_large_cloud':'\\ud83c\\udf25',\n 'sun_behind_rain_cloud':'\\ud83c\\udf26',\n 'sun_behind_small_cloud':'\\ud83c\\udf24',\n 'sun_with_face':'\\ud83c\\udf1e',\n 'sunflower':'\\ud83c\\udf3b',\n 'sunglasses':'\\ud83d\\ude0e',\n 'sunny':'\\u2600\\ufe0f',\n 'sunrise':'\\ud83c\\udf05',\n 'sunrise_over_mountains':'\\ud83c\\udf04',\n 'surfing_man':'\\ud83c\\udfc4',\n 'surfing_woman':'\\ud83c\\udfc4‍\\u2640\\ufe0f',\n 'sushi':'\\ud83c\\udf63',\n 'suspension_railway':'\\ud83d\\ude9f',\n 'sweat':'\\ud83d\\ude13',\n 'sweat_drops':'\\ud83d\\udca6',\n 'sweat_smile':'\\ud83d\\ude05',\n 'sweet_potato':'\\ud83c\\udf60',\n 'swimming_man':'\\ud83c\\udfca',\n 'swimming_woman':'\\ud83c\\udfca‍\\u2640\\ufe0f',\n 'symbols':'\\ud83d\\udd23',\n 'synagogue':'\\ud83d\\udd4d',\n 'syringe':'\\ud83d\\udc89',\n 'taco':'\\ud83c\\udf2e',\n 'tada':'\\ud83c\\udf89',\n 'tanabata_tree':'\\ud83c\\udf8b',\n 'taurus':'\\u2649\\ufe0f',\n 'taxi':'\\ud83d\\ude95',\n 'tea':'\\ud83c\\udf75',\n 'telephone_receiver':'\\ud83d\\udcde',\n 'telescope':'\\ud83d\\udd2d',\n 'tennis':'\\ud83c\\udfbe',\n 'tent':'\\u26fa\\ufe0f',\n 'thermometer':'\\ud83c\\udf21',\n 'thinking':'\\ud83e\\udd14',\n 'thought_balloon':'\\ud83d\\udcad',\n 'ticket':'\\ud83c\\udfab',\n 'tickets':'\\ud83c\\udf9f',\n 'tiger':'\\ud83d\\udc2f',\n 'tiger2':'\\ud83d\\udc05',\n 'timer_clock':'\\u23f2',\n 'tipping_hand_man':'\\ud83d\\udc81‍\\u2642\\ufe0f',\n 'tired_face':'\\ud83d\\ude2b',\n 'tm':'\\u2122\\ufe0f',\n 'toilet':'\\ud83d\\udebd',\n 'tokyo_tower':'\\ud83d\\uddfc',\n 'tomato':'\\ud83c\\udf45',\n 'tongue':'\\ud83d\\udc45',\n 'top':'\\ud83d\\udd1d',\n 'tophat':'\\ud83c\\udfa9',\n 'tornado':'\\ud83c\\udf2a',\n 'trackball':'\\ud83d\\uddb2',\n 'tractor':'\\ud83d\\ude9c',\n 'traffic_light':'\\ud83d\\udea5',\n 'train':'\\ud83d\\ude8b',\n 'train2':'\\ud83d\\ude86',\n 'tram':'\\ud83d\\ude8a',\n 'triangular_flag_on_post':'\\ud83d\\udea9',\n 'triangular_ruler':'\\ud83d\\udcd0',\n 'trident':'\\ud83d\\udd31',\n 'triumph':'\\ud83d\\ude24',\n 'trolleybus':'\\ud83d\\ude8e',\n 'trophy':'\\ud83c\\udfc6',\n 'tropical_drink':'\\ud83c\\udf79',\n 'tropical_fish':'\\ud83d\\udc20',\n 'truck':'\\ud83d\\ude9a',\n 'trumpet':'\\ud83c\\udfba',\n 'tulip':'\\ud83c\\udf37',\n 'tumbler_glass':'\\ud83e\\udd43',\n 'turkey':'\\ud83e\\udd83',\n 'turtle':'\\ud83d\\udc22',\n 'tv':'\\ud83d\\udcfa',\n 'twisted_rightwards_arrows':'\\ud83d\\udd00',\n 'two_hearts':'\\ud83d\\udc95',\n 'two_men_holding_hands':'\\ud83d\\udc6c',\n 'two_women_holding_hands':'\\ud83d\\udc6d',\n 'u5272':'\\ud83c\\ude39',\n 'u5408':'\\ud83c\\ude34',\n 'u55b6':'\\ud83c\\ude3a',\n 'u6307':'\\ud83c\\ude2f\\ufe0f',\n 'u6708':'\\ud83c\\ude37\\ufe0f',\n 'u6709':'\\ud83c\\ude36',\n 'u6e80':'\\ud83c\\ude35',\n 'u7121':'\\ud83c\\ude1a\\ufe0f',\n 'u7533':'\\ud83c\\ude38',\n 'u7981':'\\ud83c\\ude32',\n 'u7a7a':'\\ud83c\\ude33',\n 'umbrella':'\\u2614\\ufe0f',\n 'unamused':'\\ud83d\\ude12',\n 'underage':'\\ud83d\\udd1e',\n 'unicorn':'\\ud83e\\udd84',\n 'unlock':'\\ud83d\\udd13',\n 'up':'\\ud83c\\udd99',\n 'upside_down_face':'\\ud83d\\ude43',\n 'v':'\\u270c\\ufe0f',\n 'vertical_traffic_light':'\\ud83d\\udea6',\n 'vhs':'\\ud83d\\udcfc',\n 'vibration_mode':'\\ud83d\\udcf3',\n 'video_camera':'\\ud83d\\udcf9',\n 'video_game':'\\ud83c\\udfae',\n 'violin':'\\ud83c\\udfbb',\n 'virgo':'\\u264d\\ufe0f',\n 'volcano':'\\ud83c\\udf0b',\n 'volleyball':'\\ud83c\\udfd0',\n 'vs':'\\ud83c\\udd9a',\n 'vulcan_salute':'\\ud83d\\udd96',\n 'walking_man':'\\ud83d\\udeb6',\n 'walking_woman':'\\ud83d\\udeb6‍\\u2640\\ufe0f',\n 'waning_crescent_moon':'\\ud83c\\udf18',\n 'waning_gibbous_moon':'\\ud83c\\udf16',\n 'warning':'\\u26a0\\ufe0f',\n 'wastebasket':'\\ud83d\\uddd1',\n 'watch':'\\u231a\\ufe0f',\n 'water_buffalo':'\\ud83d\\udc03',\n 'watermelon':'\\ud83c\\udf49',\n 'wave':'\\ud83d\\udc4b',\n 'wavy_dash':'\\u3030\\ufe0f',\n 'waxing_crescent_moon':'\\ud83c\\udf12',\n 'wc':'\\ud83d\\udebe',\n 'weary':'\\ud83d\\ude29',\n 'wedding':'\\ud83d\\udc92',\n 'weight_lifting_man':'\\ud83c\\udfcb\\ufe0f',\n 'weight_lifting_woman':'\\ud83c\\udfcb\\ufe0f‍\\u2640\\ufe0f',\n 'whale':'\\ud83d\\udc33',\n 'whale2':'\\ud83d\\udc0b',\n 'wheel_of_dharma':'\\u2638\\ufe0f',\n 'wheelchair':'\\u267f\\ufe0f',\n 'white_check_mark':'\\u2705',\n 'white_circle':'\\u26aa\\ufe0f',\n 'white_flag':'\\ud83c\\udff3\\ufe0f',\n 'white_flower':'\\ud83d\\udcae',\n 'white_large_square':'\\u2b1c\\ufe0f',\n 'white_medium_small_square':'\\u25fd\\ufe0f',\n 'white_medium_square':'\\u25fb\\ufe0f',\n 'white_small_square':'\\u25ab\\ufe0f',\n 'white_square_button':'\\ud83d\\udd33',\n 'wilted_flower':'\\ud83e\\udd40',\n 'wind_chime':'\\ud83c\\udf90',\n 'wind_face':'\\ud83c\\udf2c',\n 'wine_glass':'\\ud83c\\udf77',\n 'wink':'\\ud83d\\ude09',\n 'wolf':'\\ud83d\\udc3a',\n 'woman':'\\ud83d\\udc69',\n 'woman_artist':'\\ud83d\\udc69‍\\ud83c\\udfa8',\n 'woman_astronaut':'\\ud83d\\udc69‍\\ud83d\\ude80',\n 'woman_cartwheeling':'\\ud83e\\udd38‍\\u2640\\ufe0f',\n 'woman_cook':'\\ud83d\\udc69‍\\ud83c\\udf73',\n 'woman_facepalming':'\\ud83e\\udd26‍\\u2640\\ufe0f',\n 'woman_factory_worker':'\\ud83d\\udc69‍\\ud83c\\udfed',\n 'woman_farmer':'\\ud83d\\udc69‍\\ud83c\\udf3e',\n 'woman_firefighter':'\\ud83d\\udc69‍\\ud83d\\ude92',\n 'woman_health_worker':'\\ud83d\\udc69‍\\u2695\\ufe0f',\n 'woman_judge':'\\ud83d\\udc69‍\\u2696\\ufe0f',\n 'woman_juggling':'\\ud83e\\udd39‍\\u2640\\ufe0f',\n 'woman_mechanic':'\\ud83d\\udc69‍\\ud83d\\udd27',\n 'woman_office_worker':'\\ud83d\\udc69‍\\ud83d\\udcbc',\n 'woman_pilot':'\\ud83d\\udc69‍\\u2708\\ufe0f',\n 'woman_playing_handball':'\\ud83e\\udd3e‍\\u2640\\ufe0f',\n 'woman_playing_water_polo':'\\ud83e\\udd3d‍\\u2640\\ufe0f',\n 'woman_scientist':'\\ud83d\\udc69‍\\ud83d\\udd2c',\n 'woman_shrugging':'\\ud83e\\udd37‍\\u2640\\ufe0f',\n 'woman_singer':'\\ud83d\\udc69‍\\ud83c\\udfa4',\n 'woman_student':'\\ud83d\\udc69‍\\ud83c\\udf93',\n 'woman_teacher':'\\ud83d\\udc69‍\\ud83c\\udfeb',\n 'woman_technologist':'\\ud83d\\udc69‍\\ud83d\\udcbb',\n 'woman_with_turban':'\\ud83d\\udc73‍\\u2640\\ufe0f',\n 'womans_clothes':'\\ud83d\\udc5a',\n 'womans_hat':'\\ud83d\\udc52',\n 'women_wrestling':'\\ud83e\\udd3c‍\\u2640\\ufe0f',\n 'womens':'\\ud83d\\udeba',\n 'world_map':'\\ud83d\\uddfa',\n 'worried':'\\ud83d\\ude1f',\n 'wrench':'\\ud83d\\udd27',\n 'writing_hand':'\\u270d\\ufe0f',\n 'x':'\\u274c',\n 'yellow_heart':'\\ud83d\\udc9b',\n 'yen':'\\ud83d\\udcb4',\n 'yin_yang':'\\u262f\\ufe0f',\n 'yum':'\\ud83d\\ude0b',\n 'zap':'\\u26a1\\ufe0f',\n 'zipper_mouth_face':'\\ud83e\\udd10',\n 'zzz':'\\ud83d\\udca4',\n\n /* special emojis :P */\n 'octocat': '\":octocat:\"',\n 'showdown': 'S'\n};\n\r\n/**\n * Created by Estevao on 31-05-2015.\n */\n\n/**\n * Showdown Converter class\n * @class\n * @param {object} [converterOptions]\n * @returns {Converter}\n */\nshowdown.Converter = function (converterOptions) {\n 'use strict';\n\n var\n /**\n * Options used by this converter\n * @private\n * @type {{}}\n */\n options = {},\n\n /**\n * Language extensions used by this converter\n * @private\n * @type {Array}\n */\n langExtensions = [],\n\n /**\n * Output modifiers extensions used by this converter\n * @private\n * @type {Array}\n */\n outputModifiers = [],\n\n /**\n * Event listeners\n * @private\n * @type {{}}\n */\n listeners = {},\n\n /**\n * The flavor set in this converter\n */\n setConvFlavor = setFlavor,\n\n /**\n * Metadata of the document\n * @type {{parsed: {}, raw: string, format: string}}\n */\n metadata = {\n parsed: {},\n raw: '',\n format: ''\n };\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor () {\n converterOptions = converterOptions || {};\n\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n } else {\n throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +\n ' was passed instead.');\n }\n\n if (options.extensions) {\n showdown.helper.forEach(options.extensions, _parseExtension);\n }\n }\n\n /**\n * Parse extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseExtension (ext, name) {\n\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n ext = showdown.helper.stdExtName(ext);\n name = ext;\n\n // LEGACY_SUPPORT CODE\n if (showdown.extensions[ext]) {\n console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +\n 'Please inform the developer that the extension should be updated!');\n legacyExtensionLoading(showdown.extensions[ext], ext);\n return;\n // END LEGACY SUPPORT CODE\n\n } else if (!showdown.helper.isUndefined(extensions[ext])) {\n ext = extensions[ext];\n\n } else {\n throw Error('Extension \"' + ext + '\" could not be loaded. It was either not found or is not a valid extension.');\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExt = validate(ext, name);\n if (!validExt.valid) {\n throw Error(validExt.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n }\n if (ext[i].hasOwnProperty('listeners')) {\n for (var ln in ext[i].listeners) {\n if (ext[i].listeners.hasOwnProperty(ln)) {\n listen(ln, ext[i].listeners[ln]);\n }\n }\n }\n }\n\n }\n\n /**\n * LEGACY_SUPPORT\n * @param {*} ext\n * @param {string} name\n */\n function legacyExtensionLoading (ext, name) {\n if (typeof ext === 'function') {\n ext = ext(new showdown.Converter());\n }\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n var valid = validate(ext, name);\n\n if (!valid.valid) {\n throw Error(valid.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n default:// should never reach here\n throw Error('Extension loader error: Type unrecognized!!!');\n }\n }\n }\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n */\n function listen (name, callback) {\n if (!showdown.helper.isString(name)) {\n throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');\n }\n\n if (typeof callback !== 'function') {\n throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');\n }\n\n if (!listeners.hasOwnProperty(name)) {\n listeners[name] = [];\n }\n listeners[name].push(callback);\n }\n\n function rTrimInputText (text) {\n var rsp = text.match(/^\\s*/)[0].length,\n rgx = new RegExp('^\\\\s{0,' + rsp + '}', 'gm');\n return text.replace(rgx, '');\n }\n\n /**\n * Dispatch an event\n * @private\n * @param {string} evtName Event name\n * @param {string} text Text\n * @param {{}} options Converter Options\n * @param {{}} globals\n * @returns {string}\n */\n this._dispatch = function dispatch (evtName, text, options, globals) {\n if (listeners.hasOwnProperty(evtName)) {\n for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n var nText = listeners[evtName][ei](evtName, text, this, options, globals);\n if (nText && typeof nText !== 'undefined') {\n text = nText;\n }\n }\n }\n return text;\n };\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n * @returns {showdown.Converter}\n */\n this.listen = function (name, callback) {\n listen(name, callback);\n return this;\n };\n\n /**\n * Converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.makeHtml = function (text) {\n //check if text is not falsy\n if (!text) {\n return text;\n }\n\n var globals = {\n gHtmlBlocks: [],\n gHtmlMdBlocks: [],\n gHtmlSpans: [],\n gUrls: {},\n gTitles: {},\n gDimensions: {},\n gListLevel: 0,\n hashLinkCounts: {},\n langExtensions: langExtensions,\n outputModifiers: outputModifiers,\n converter: this,\n ghCodeBlocks: [],\n metadata: {\n parsed: {},\n raw: '',\n format: ''\n }\n };\n\n // This lets us use ¨ trema as an escape char to avoid md5 hashes\n // The choice of character is arbitrary; anything that isn't\n // magic in Markdown will work.\n text = text.replace(/¨/g, '¨T');\n\n // Replace $ with ¨D\n // RegExp interprets $ as a special character\n // when it's in a replacement string\n text = text.replace(/\\$/g, '¨D');\n\n // Standardize line endings\n text = text.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n text = text.replace(/\\r/g, '\\n'); // Mac to Unix\n\n // Stardardize line spaces\n text = text.replace(/\\u00A0/g, ' ');\n\n if (options.smartIndentationFix) {\n text = rTrimInputText(text);\n }\n\n // Make sure text begins and ends with a couple of newlines:\n text = '\\n\\n' + text + '\\n\\n';\n\n // detab\n text = showdown.subParser('detab')(text, options, globals);\n\n /**\n * Strip any lines consisting only of spaces and tabs.\n * This makes subsequent regexs easier to write, because we can\n * match consecutive blank lines with /\\n+/ instead of something\n * contorted like /[ \\t]*\\n+/\n */\n text = text.replace(/^[ \\t]+$/mg, '');\n\n //run languageExtensions\n showdown.helper.forEach(langExtensions, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // run the sub parsers\n text = showdown.subParser('metadata')(text, options, globals);\n text = showdown.subParser('hashPreCodeTags')(text, options, globals);\n text = showdown.subParser('githubCodeBlocks')(text, options, globals);\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('hashCodeTags')(text, options, globals);\n text = showdown.subParser('stripLinkDefinitions')(text, options, globals);\n text = showdown.subParser('blockGamut')(text, options, globals);\n text = showdown.subParser('unhashHTMLSpans')(text, options, globals);\n text = showdown.subParser('unescapeSpecialChars')(text, options, globals);\n\n // attacklab: Restore dollar signs\n text = text.replace(/¨D/g, '$$');\n\n // attacklab: Restore tremas\n text = text.replace(/¨T/g, '¨');\n\n // render a complete html document instead of a partial if the option is enabled\n text = showdown.subParser('completeHTMLDocument')(text, options, globals);\n\n // Run output modifiers\n showdown.helper.forEach(outputModifiers, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // update metadata\n metadata = globals.metadata;\n return text;\n };\n\n /**\n * Converts an HTML string into a markdown string\n * @param src\n * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.\n * @returns {string}\n */\n this.makeMarkdown = this.makeMd = function (src, HTMLParser) {\n\n // replace \\r\\n with \\n\n src = src.replace(/\\r\\n/g, '\\n');\n src = src.replace(/\\r/g, '\\n'); // old macs\n\n // due to an edge case, we need to find this: > <\n // to prevent removing of non silent white spaces\n // ex: this is sparta\n src = src.replace(/>[ \\t]+¨NBSP;<');\n\n if (!HTMLParser) {\n if (window && window.document) {\n HTMLParser = window.document;\n } else {\n throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');\n }\n }\n\n var doc = HTMLParser.createElement('div');\n doc.innerHTML = src;\n\n var globals = {\n preList: substitutePreCodeTags(doc)\n };\n\n // remove all newlines and collapse spaces\n clean(doc);\n\n // some stuff, like accidental reference links must now be escaped\n // TODO\n // doc.innerHTML = doc.innerHTML.replace(/\\[[\\S\\t ]]/);\n\n var nodes = doc.childNodes,\n mdDoc = '';\n\n for (var i = 0; i < nodes.length; i++) {\n mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);\n }\n\n function clean (node) {\n for (var n = 0; n < node.childNodes.length; ++n) {\n var child = node.childNodes[n];\n if (child.nodeType === 3) {\n if (!/\\S/.test(child.nodeValue)) {\n node.removeChild(child);\n --n;\n } else {\n child.nodeValue = child.nodeValue.split('\\n').join(' ');\n child.nodeValue = child.nodeValue.replace(/(\\s)+/g, '$1');\n }\n } else if (child.nodeType === 1) {\n clean(child);\n }\n }\n }\n\n // find all pre tags and replace contents with placeholder\n // we need this so that we can remove all indentation from html\n // to ease up parsing\n function substitutePreCodeTags (doc) {\n\n var pres = doc.querySelectorAll('pre'),\n presPH = [];\n\n for (var i = 0; i < pres.length; ++i) {\n\n if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {\n var content = pres[i].firstChild.innerHTML.trim(),\n language = pres[i].firstChild.getAttribute('data-language') || '';\n\n // if data-language attribute is not defined, then we look for class language-*\n if (language === '') {\n var classes = pres[i].firstChild.className.split(' ');\n for (var c = 0; c < classes.length; ++c) {\n var matches = classes[c].match(/^language-(.+)$/);\n if (matches !== null) {\n language = matches[1];\n break;\n }\n }\n }\n\n // unescape html entities in content\n content = showdown.helper.unescapeHTMLEntities(content);\n\n presPH.push(content);\n pres[i].outerHTML = '';\n } else {\n presPH.push(pres[i].innerHTML);\n pres[i].innerHTML = '';\n pres[i].setAttribute('prenum', i.toString());\n }\n }\n return presPH;\n }\n\n return mdDoc;\n };\n\n /**\n * Set an option of this Converter instance\n * @param {string} key\n * @param {*} value\n */\n this.setOption = function (key, value) {\n options[key] = value;\n };\n\n /**\n * Get the option of this Converter instance\n * @param {string} key\n * @returns {*}\n */\n this.getOption = function (key) {\n return options[key];\n };\n\n /**\n * Get the options of this Converter instance\n * @returns {{}}\n */\n this.getOptions = function () {\n return options;\n };\n\n /**\n * Add extension to THIS converter\n * @param {{}} extension\n * @param {string} [name=null]\n */\n this.addExtension = function (extension, name) {\n name = name || null;\n _parseExtension(extension, name);\n };\n\n /**\n * Use a global registered extension with THIS converter\n * @param {string} extensionName Name of the previously registered extension\n */\n this.useExtension = function (extensionName) {\n _parseExtension(extensionName);\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function (name) {\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n var preset = flavor[name];\n setConvFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n options[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function () {\n return setConvFlavor;\n };\n\n /**\n * Remove an extension from THIS converter.\n * Note: This is a costly operation. It's better to initialize a new converter\n * and specify the extensions you wish to use\n * @param {Array} extension\n */\n this.removeExtension = function (extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n var ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions[i].splice(i, 1);\n }\n }\n for (var ii = 0; ii < outputModifiers.length; ++i) {\n if (outputModifiers[ii] === ext) {\n outputModifiers[ii].splice(i, 1);\n }\n }\n }\n };\n\n /**\n * Get all extension of THIS converter\n * @returns {{language: Array, output: Array}}\n */\n this.getAllExtensions = function () {\n return {\n language: langExtensions,\n output: outputModifiers\n };\n };\n\n /**\n * Get the metadata of the previously parsed document\n * @param raw\n * @returns {string|{}}\n */\n this.getMetadata = function (raw) {\n if (raw) {\n return metadata.raw;\n } else {\n return metadata.parsed;\n }\n };\n\n /**\n * Get the metadata format of the previously parsed document\n * @returns {string}\n */\n this.getMetadataFormat = function () {\n return metadata.format;\n };\n\n /**\n * Private: set a single key, value metadata pair\n * @param {string} key\n * @param {string} value\n */\n this._setMetadataPair = function (key, value) {\n metadata.parsed[key] = value;\n };\n\n /**\n * Private: set metadata format\n * @param {string} format\n */\n this._setMetadataFormat = function (format) {\n metadata.format = format;\n };\n\n /**\n * Private: set metadata raw text\n * @param {string} raw\n */\n this._setMetadataRaw = function (raw) {\n metadata.raw = raw;\n };\n};\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('anchors', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('anchors.before', text, options, globals);\n\n var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {\n if (showdown.helper.isUndefined(title)) {\n title = '';\n }\n linkId = linkId.toLowerCase();\n\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n } else if (!url) {\n if (!linkId) {\n // lower-case and turn embedded newlines into spaces\n linkId = linkText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {\n url = globals.gUrls[linkId];\n if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {\n title = globals.gTitles[linkId];\n }\n } else {\n return wholeMatch;\n }\n }\n\n //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n\n var result = '';\n\n return result;\n };\n\n // First, handle reference-style links: [link text] [id]\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)] ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n\n // Next, inline-style links: [link text](url \"optional title\")\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // normal cases\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]??(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // handle reference-style shortcuts: [link text]\n // These must come last in case you've also got [link test][1]\n // or [link test](/foo)\n text = text.replace(/\\[([^\\[\\]]+)]()()()()()/g, writeAnchorTag);\n\n // Lastly handle GithubMentions if option is enabled\n if (options.ghMentions) {\n text = text.replace(/(^|\\s)(\\\\)?(@([a-z\\d]+(?:[a-z\\d.-]+?[a-z\\d]+)*))/gmi, function (wm, st, escape, mentions, username) {\n if (escape === '\\\\') {\n return st + mentions;\n }\n\n //check if options.ghMentionsLink is a string\n if (!showdown.helper.isString(options.ghMentionsLink)) {\n throw new Error('ghMentionsLink option must be a string');\n }\n var lnk = options.ghMentionsLink.replace(/\\{u}/g, username),\n target = '';\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return st + '' + mentions + '';\n });\n }\n\n text = globals.converter._dispatch('anchors.after', text, options, globals);\n return text;\n});\n\r\n// url allowed chars [a-z\\d_.~:/?#[]@!$&'()*+,;=-]\n\nvar simpleURLRegex = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+?\\.[^'\">\\s]+?)()(\\1)?(?=\\s|$)(?![\"<>])/gi,\n simpleURLRegex2 = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]])?(\\1)?(?=\\s|$)(?![\"<>])/gi,\n delimUrlRegex = /()<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>()/gi,\n simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,\n delimMailRegex = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,\n\n replaceLink = function (options) {\n 'use strict';\n return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {\n link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var lnkTxt = link,\n append = '',\n target = '',\n lmc = leadingMagicChars || '',\n tmc = trailingMagicChars || '';\n if (/^www\\./i.test(link)) {\n link = link.replace(/^www\\./i, 'http://www.');\n }\n if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {\n append = trailingPunctuation;\n }\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return lmc + '' + lnkTxt + '' + append + tmc;\n };\n },\n\n replaceMail = function (options, globals) {\n 'use strict';\n return function (wholeMatch, b, mail) {\n var href = 'mailto:';\n b = b || '';\n mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);\n if (options.encodeEmails) {\n href = showdown.helper.encodeEmailAddress(href + mail);\n mail = showdown.helper.encodeEmailAddress(mail);\n } else {\n href = href + mail;\n }\n return b + '' + mail + '';\n };\n };\n\nshowdown.subParser('autoLinks', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('autoLinks.before', text, options, globals);\n\n text = text.replace(delimUrlRegex, replaceLink(options));\n text = text.replace(delimMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('autoLinks.after', text, options, globals);\n\n return text;\n});\n\nshowdown.subParser('simplifiedAutoLinks', function (text, options, globals) {\n 'use strict';\n\n if (!options.simplifiedAutoLink) {\n return text;\n }\n\n text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);\n\n if (options.excludeTrailingPunctuationFromURLs) {\n text = text.replace(simpleURLRegex2, replaceLink(options));\n } else {\n text = text.replace(simpleURLRegex, replaceLink(options));\n }\n text = text.replace(simpleMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * These are all the transformations that form block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('blockGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockGamut.before', text, options, globals);\n\n // we parse blockquotes first so that we can have headings and hrs\n // inside blockquotes\n text = showdown.subParser('blockQuotes')(text, options, globals);\n text = showdown.subParser('headers')(text, options, globals);\n\n // Do Horizontal Rules:\n text = showdown.subParser('horizontalRule')(text, options, globals);\n\n text = showdown.subParser('lists')(text, options, globals);\n text = showdown.subParser('codeBlocks')(text, options, globals);\n text = showdown.subParser('tables')(text, options, globals);\n\n // We already ran _HashHTMLBlocks() before, in Markdown(), but that\n // was to escape raw HTML in the original Markdown source. This time,\n // we're escaping the markup we've just created, so that we don't wrap\n //

tags around block-level tags.\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('paragraphs')(text, options, globals);\n\n text = globals.converter._dispatch('blockGamut.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('blockQuotes', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockQuotes.before', text, options, globals);\n\n // add a couple extra lines after the text and endtext mark\n text = text + '\\n\\n';\n\n var rgx = /(^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+/gm;\n\n if (options.splitAdjacentBlockquotes) {\n rgx = /^ {0,3}>[\\s\\S]*?(?:\\n\\n)/gm;\n }\n\n text = text.replace(rgx, function (bq) {\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n bq = bq.replace(/^[ \\t]*>[ \\t]?/gm, ''); // trim one level of quoting\n\n // attacklab: clean up hack\n bq = bq.replace(/¨0/g, '');\n\n bq = bq.replace(/^[ \\t]+$/gm, ''); // trim whitespace-only lines\n bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);\n bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse\n\n bq = bq.replace(/(^|\\n)/g, '$1 ');\n // These leading spaces screw with

 content, so we need to fix that:\n    bq = bq.replace(/(\\s*
[^\\r]+?<\\/pre>)/gm, function (wholeMatch, m1) {\n      var pre = m1;\n      // attacklab: hack around Konqueror 3.5.4 bug:\n      pre = pre.replace(/^  /mg, '¨0');\n      pre = pre.replace(/¨0/g, '');\n      return pre;\n    });\n\n    return showdown.subParser('hashBlock')('
\\n' + bq + '\\n
', options, globals);\n });\n\n text = globals.converter._dispatch('blockQuotes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Process Markdown `
` blocks.\n */\nshowdown.subParser('codeBlocks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);\n\n  // sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var pattern = /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n  text = text.replace(pattern, function (wholeMatch, m1, m2) {\n    var codeblock = m1,\n        nextChar = m2,\n        end = '\\n';\n\n    codeblock = showdown.subParser('outdent')(codeblock, options, globals);\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing newlines\n\n    if (options.omitExtraWLInCodeBlocks) {\n      end = '';\n    }\n\n    codeblock = '
' + codeblock + end + '
';\n\n return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;\n });\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n\n text = globals.converter._dispatch('codeBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n * * Backtick quotes are used for spans.\n *\n * * You can use multiple backticks as the delimiters if you want to\n * include literal backticks in the code span. So, this input:\n *\n * Just type ``foo `bar` baz`` at the prompt.\n *\n * Will translate to:\n *\n *

Just type foo `bar` baz at the prompt.

\n *\n * There's no arbitrary limit to the number of backticks you\n * can use as delimters. If you need three consecutive backticks\n * in your code, use four for delimiters, etc.\n *\n * * You can use spaces to get literal backticks at the edges:\n *\n * ... type `` `bar` `` ...\n *\n * Turns to:\n *\n * ... type `bar` ...\n */\nshowdown.subParser('codeSpans', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('codeSpans.before', text, options, globals);\n\n if (typeof text === 'undefined') {\n text = '';\n }\n text = text.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n function (wholeMatch, m1, m2, m3) {\n var c = m3;\n c = c.replace(/^([ \\t]*)/g, '');\t// leading whitespace\n c = c.replace(/[ \\t]*$/g, '');\t// trailing whitespace\n c = showdown.subParser('encodeCode')(c, options, globals);\n c = m1 + '' + c + '';\n c = showdown.subParser('hashHTMLSpans')(c, options, globals);\n return c;\n }\n );\n\n text = globals.converter._dispatch('codeSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Create a full HTML document from the processed markdown\n */\nshowdown.subParser('completeHTMLDocument', function (text, options, globals) {\n 'use strict';\n\n if (!options.completeHTMLDocument) {\n return text;\n }\n\n text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);\n\n var doctype = 'html',\n doctypeParsed = '\\n',\n title = '',\n charset = '\\n',\n lang = '',\n metadata = '';\n\n if (typeof globals.metadata.parsed.doctype !== 'undefined') {\n doctypeParsed = '\\n';\n doctype = globals.metadata.parsed.doctype.toString().toLowerCase();\n if (doctype === 'html' || doctype === 'html5') {\n charset = '';\n }\n }\n\n for (var meta in globals.metadata.parsed) {\n if (globals.metadata.parsed.hasOwnProperty(meta)) {\n switch (meta.toLowerCase()) {\n case 'doctype':\n break;\n\n case 'title':\n title = '' + globals.metadata.parsed.title + '\\n';\n break;\n\n case 'charset':\n if (doctype === 'html' || doctype === 'html5') {\n charset = '\\n';\n } else {\n charset = '\\n';\n }\n break;\n\n case 'language':\n case 'lang':\n lang = ' lang=\"' + globals.metadata.parsed[meta] + '\"';\n metadata += '\\n';\n break;\n\n default:\n metadata += '\\n';\n }\n }\n }\n\n text = doctypeParsed + '\\n\\n' + title + charset + metadata + '\\n\\n' + text.trim() + '\\n\\n';\n\n text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Convert all tabs to spaces\n */\nshowdown.subParser('detab', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('detab.before', text, options, globals);\n\n // expand first n-1 tabs\n text = text.replace(/\\t(?=\\t)/g, ' '); // g_tab_width\n\n // replace the nth with two sentinels\n text = text.replace(/\\t/g, '¨A¨B');\n\n // use the sentinel to anchor our regex so it doesn't explode\n text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {\n var leadingText = m1,\n numSpaces = 4 - leadingText.length % 4; // g_tab_width\n\n // there *must* be a better way to do this:\n for (var i = 0; i < numSpaces; i++) {\n leadingText += ' ';\n }\n\n return leadingText;\n });\n\n // clean up sentinels\n text = text.replace(/¨A/g, ' '); // g_tab_width\n text = text.replace(/¨B/g, '');\n\n text = globals.converter._dispatch('detab.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('ellipsis', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('ellipsis.before', text, options, globals);\n\n text = text.replace(/\\.\\.\\./g, '…');\n\n text = globals.converter._dispatch('ellipsis.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Turn emoji codes into emojis\n *\n * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis\n */\nshowdown.subParser('emoji', function (text, options, globals) {\n 'use strict';\n\n if (!options.emoji) {\n return text;\n }\n\n text = globals.converter._dispatch('emoji.before', text, options, globals);\n\n var emojiRgx = /:([\\S]+?):/g;\n\n text = text.replace(emojiRgx, function (wm, emojiCode) {\n if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {\n return showdown.helper.emojis[emojiCode];\n }\n return wm;\n });\n\n text = globals.converter._dispatch('emoji.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Smart processing for ampersands and angle brackets that need to be encoded.\n */\nshowdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);\n\n // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:\n // http://bumppo.net/projects/amputator/\n text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g, '&');\n\n // Encode naked <'s\n text = text.replace(/<(?![a-z\\/?$!])/gi, '<');\n\n // Encode <\n text = text.replace(/\n text = text.replace(/>/g, '>');\n\n text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Returns the string, with after processing the following backslash escape sequences.\n *\n * attacklab: The polite way to do this is with the new escapeCharacters() function:\n *\n * text = escapeCharacters(text,\"\\\\\",true);\n * text = escapeCharacters(text,\"`*_{}[]()>#+-.!\",true);\n *\n * ...but we're sidestepping its use of the (slow) RegExp constructor\n * as an optimization for Firefox. This function gets called a LOT.\n */\nshowdown.subParser('encodeBackslashEscapes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);\n\n text = text.replace(/\\\\(\\\\)/g, showdown.helper.escapeCharactersCallback);\n text = text.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Encode/escape certain characters inside Markdown code runs.\n * The point is that in code, these characters are literals,\n * and lose their special Markdown meanings.\n */\nshowdown.subParser('encodeCode', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('encodeCode.before', text, options, globals);\n\n // Encode all ampersands; HTML entities are not\n // entities within a Markdown code span.\n text = text\n .replace(/&/g, '&')\n // Do the angle bracket song and dance:\n .replace(//g, '>')\n // Now, escape characters that are magic in Markdown:\n .replace(/([*_{}\\[\\]\\\\=~-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeCode.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Within tags -- meaning between < and > -- encode [\\ ` * _ ~ =] so they\n * don't conflict with their use in Markdown for code, italics and strong.\n */\nshowdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);\n\n // Build a regex to find HTML tags.\n var tags = /<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,\n comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;\n\n text = text.replace(tags, function (wholeMatch) {\n return wholeMatch\n .replace(/(.)<\\/?code>(?=.)/g, '$1`')\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = text.replace(comments, function (wholeMatch) {\n return wholeMatch\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Handle github codeblocks prior to running HashHTML so that\n * HTML contained within the codeblock gets escaped properly\n * Example:\n * ```ruby\n * def hello_world(x)\n * puts \"Hello, #{x}\"\n * end\n * ```\n */\nshowdown.subParser('githubCodeBlocks', function (text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(/(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g, function (wholeMatch, delim, language, codeblock) {\n var end = (options.omitExtraWLInCodeBlocks) ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock = '
' + codeblock + end + '
';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n });\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n\r\nshowdown.subParser('hashBlock', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashBlock.before', text, options, globals);\n text = text.replace(/(^\\n+|\\n+$)/g, '');\n text = '\\n\\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\\n\\n';\n text = globals.converter._dispatch('hashBlock.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape elements that should not be parsed as markdown\n */\nshowdown.subParser('hashCodeTags', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);\n\n var repFunc = function (wholeMatch, match, left, right) {\n var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';\n };\n\n // Hash naked \n text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim');\n\n text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('hashElement', function (text, options, globals) {\n 'use strict';\n\n return function (wholeMatch, m1) {\n var blockText = m1;\n\n // Undo double lines\n blockText = blockText.replace(/\\n\\n/g, '\\n');\n blockText = blockText.replace(/^\\n/, '');\n\n // strip trailing blank lines\n blockText = blockText.replace(/\\n+$/g, '');\n\n // Replace the element text with a marker (\"¨KxK\" where x is its key)\n blockText = '\\n\\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\\n\\n';\n\n return blockText;\n };\n});\n\r\nshowdown.subParser('hashHTMLBlocks', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);\n\n var blockTags = [\n 'pre',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'table',\n 'dl',\n 'ol',\n 'ul',\n 'script',\n 'noscript',\n 'form',\n 'fieldset',\n 'iframe',\n 'math',\n 'style',\n 'section',\n 'header',\n 'footer',\n 'nav',\n 'article',\n 'aside',\n 'address',\n 'audio',\n 'canvas',\n 'figure',\n 'hgroup',\n 'output',\n 'video',\n 'p'\n ],\n repFunc = function (wholeMatch, match, left, right) {\n var txt = wholeMatch;\n // check if this html element is marked as markdown\n // if so, it's contents should be parsed as markdown\n if (left.search(/\\bmarkdown\\b/) !== -1) {\n txt = left + globals.converter.makeHtml(match) + right;\n }\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n };\n\n if (options.backslashEscapesHTMLTags) {\n // encode backslash escaped HTML tags\n text = text.replace(/\\\\<(\\/?[^>]+?)>/g, function (wm, inside) {\n return '<' + inside + '>';\n });\n }\n\n // hash HTML Blocks\n for (var i = 0; i < blockTags.length; ++i) {\n\n var opTagPos,\n rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\\\b[^>]*>)', 'im'),\n patLeft = '<' + blockTags[i] + '\\\\b[^>]*>',\n patRight = '';\n // 1. Look for the first position of the first opening HTML tag in the text\n while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {\n\n // if the HTML tag is \\ escaped, we need to escape it and break\n\n\n //2. Split the text in that position\n var subTexts = showdown.helper.splitAtIndex(text, opTagPos),\n //3. Match recursively\n newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');\n\n // prevent an infinite loop\n if (newSubText1 === subTexts[1]) {\n break;\n }\n text = subTexts[0].concat(newSubText1);\n }\n }\n // HR SPECIAL CASE\n text = text.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n // Special case for standalone HTML comments\n text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n }, '^ {0,3}', 'gm');\n\n // PHP and ASP-style processor instructions ( and <%...%>)\n text = text.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash span elements that should not be parsed as markdown\n */\nshowdown.subParser('hashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);\n\n function hashHTMLSpan (html) {\n return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';\n }\n\n // Hash Self Closing tags\n text = text.replace(/<[^>]+?\\/>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags without properties\n text = text.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags with properties\n text = text.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash self closing tags without />\n text = text.replace(/<[^>]+?>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/\n\n text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);\n return text;\n});\n\n/**\n * Unhash HTML spans\n */\nshowdown.subParser('unhashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);\n\n for (var i = 0; i < globals.gHtmlSpans.length; ++i) {\n var repText = globals.gHtmlSpans[i],\n // limiter to prevent infinite loop (assume 10 as limit for recurse)\n limit = 0;\n\n while (/¨C(\\d+)C/.test(repText)) {\n var num = RegExp.$1;\n repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);\n if (limit === 10) {\n console.error('maximum nesting of 10 spans reached!!!');\n break;\n }\n ++limit;\n }\n text = text.replace('¨C' + i + 'C', repText);\n }\n\n text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape
 elements that should not be parsed as markdown\n */\nshowdown.subParser('hashPreCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    // encode html entities\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  };\n\n  // Hash 
\n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\\\s*]*>', '^ {0,3}\\\\s*
', 'gim');\n\n text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('headers', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('headers.before', text, options, globals);\n\n var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),\n\n // Set text-style headers:\n //\tHeader 1\n //\t========\n //\n //\tHeader 2\n //\t--------\n //\n setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,\n setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n\n text = text.replace(setextRegexH1, function (wholeMatch, m1) {\n\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n text = text.replace(setextRegexH2, function (matchFound, m1) {\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart + 1,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n // atx-style headers:\n // # Header 1\n // ## Header 2\n // ## Header 2 with closing hashes ##\n // ...\n // ###### Header 6\n //\n var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n\n text = text.replace(atxStyle, function (wholeMatch, m1, m2) {\n var hText = m2;\n if (options.customizedHeaderId) {\n hText = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, '');\n }\n\n var span = showdown.subParser('spanGamut')(hText, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m2) + '\"',\n hLevel = headerLevelStart - 1 + m1.length,\n header = '' + span + '';\n\n return showdown.subParser('hashBlock')(header, options, globals);\n });\n\n function headerId (m) {\n var title,\n prefix;\n\n // It is separate from other options to allow combining prefix and customized\n if (options.customizedHeaderId) {\n var match = m.match(/\\{([^{]+?)}\\s*$/);\n if (match && match[1]) {\n m = match[1];\n }\n }\n\n title = m;\n\n // Prefix id to prevent causing inadvertent pre-existing style matches.\n if (showdown.helper.isString(options.prefixHeaderId)) {\n prefix = options.prefixHeaderId;\n } else if (options.prefixHeaderId === true) {\n prefix = 'section-';\n } else {\n prefix = '';\n }\n\n if (!options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (options.ghCompatibleHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '')\n .replace(/¨T/g, '')\n .replace(/¨D/g, '')\n // replace rest of the chars (&~$ are repeated as they might have been escaped)\n // borrowed from github's redcarpet (some they should produce similar results)\n .replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g, '')\n .toLowerCase();\n } else if (options.rawHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '&')\n .replace(/¨T/g, '¨')\n .replace(/¨D/g, '$')\n // replace \" and '\n .replace(/[\"']/g, '-')\n .toLowerCase();\n } else {\n title = title\n .replace(/[^\\w]/g, '')\n .toLowerCase();\n }\n\n if (options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (globals.hashLinkCounts[title]) {\n title = title + '-' + (globals.hashLinkCounts[title]++);\n } else {\n globals.hashLinkCounts[title] = 1;\n }\n return title;\n }\n\n text = globals.converter._dispatch('headers.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('horizontalRule', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('horizontalRule.before', text, options, globals);\n\n var key = showdown.subParser('hashBlock')('
', options, globals);\n text = text.replace(/^ {0,2}( ?-){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n\n text = globals.converter._dispatch('horizontalRule.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown image shortcuts into tags.\n */\nshowdown.subParser('images', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('images.before', text, options, globals);\n\n var inlineRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n crazyRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g,\n base64RegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n referenceRegExp = /!\\[([^\\]]*?)] ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g,\n refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n\n function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {\n url = url.replace(/\\s/g, '');\n return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);\n }\n\n function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {\n\n var gUrls = globals.gUrls,\n gTitles = globals.gTitles,\n gDims = globals.gDimensions;\n\n linkId = linkId.toLowerCase();\n\n if (!title) {\n title = '';\n }\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n\n } else if (url === '' || url === null) {\n if (linkId === '' || linkId === null) {\n // lower-case and turn embedded newlines into spaces\n linkId = altText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(gUrls[linkId])) {\n url = gUrls[linkId];\n if (!showdown.helper.isUndefined(gTitles[linkId])) {\n title = gTitles[linkId];\n }\n if (!showdown.helper.isUndefined(gDims[linkId])) {\n width = gDims[linkId].width;\n height = gDims[linkId].height;\n }\n } else {\n return wholeMatch;\n }\n }\n\n altText = altText\n .replace(/\"/g, '"')\n //altText = showdown.helper.escapeCharacters(altText, '*_', false);\n .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n //url = showdown.helper.escapeCharacters(url, '*_', false);\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var result = '\"'x \"optional title\")\n\n // base64 encoded images\n text = text.replace(base64RegExp, writeImageTagBase64);\n\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(crazyRegExp, writeImageTag);\n\n // normal cases\n text = text.replace(inlineRegExp, writeImageTag);\n\n // handle reference-style shortcuts: ![img text]\n text = text.replace(refShortcutRegExp, writeImageTag);\n\n text = globals.converter._dispatch('images.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('italicsAndBold', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);\n\n // it's faster to have 3 separate regexes for each case than have just one\n // because of backtracing, in some cases, it could lead to an exponential effect\n // called \"catastrophic backtrace\". Ominous!\n\n function parseInside (txt, left, right) {\n /*\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n */\n return left + txt + right;\n }\n\n // Parse underscores\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/_([^\\s_][\\s\\S]*?)_/g, function (wm, m) {\n // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n // Now parse asterisks\n if (options.literalMidWordAsterisks) {\n text = text.replace(/([^*]|^)\\B\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*\\*(\\S[\\s\\S]*?)\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*(\\S[\\s\\S]*?)\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n } else {\n text = text.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g, function (wm, m) {\n // !/^\\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n\n text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Form HTML ordered (numbered) and unordered (bulleted) lists.\n */\nshowdown.subParser('lists', function (text, options, globals) {\n 'use strict';\n\n /**\n * Process the contents of a single ordered or unordered list, splitting it\n * into individual list items.\n * @param {string} listStr\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function processListItems (listStr, trimTrailing) {\n // The $g_list_level global keeps track of when we're inside a list.\n // Each time we enter a list, we increment it; when we leave a list,\n // we decrement. If it's zero, we're not in a list anymore.\n //\n // We do this because when we're not inside a list, we want to treat\n // something like this:\n //\n // I recommend upgrading to version\n // 8. Oops, now this line is treated\n // as a sub-list.\n //\n // As a single paragraph, despite the fact that the second line starts\n // with a digit-period-space sequence.\n //\n // Whereas when we're inside a list (or sub-list), that line will be\n // treated as the start of a sub-list. What a kludge, huh? This is\n // an aspect of Markdown's syntax that's hard to parse perfectly\n // without resorting to mind-reading. Perhaps the solution is to\n // change the syntax rules such that sub-lists must start with a\n // starting cardinal number; e.g. \"1.\" or \"a.\".\n globals.gListLevel++;\n\n // trim trailing blank lines:\n listStr = listStr.replace(/\\n{2,}$/, '\\n');\n\n // attacklab: add sentinel to emulate \\z\n listStr += '¨0';\n\n var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[ \\t]+))/gm,\n isParagraphed = (/\\n[ \\t]*\\n(?!¨0)/.test(listStr));\n\n // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,\n // which is a syntax breaking change\n // activating this option reverts to old behavior\n if (options.disableForced4SpacesIndentedSublists) {\n rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[ \\t]+))/gm;\n }\n\n listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {\n checked = (checked && checked.trim() !== '');\n\n var item = showdown.subParser('outdent')(m4, options, globals),\n bulletStyle = '';\n\n // Support for github tasklists\n if (taskbtn && options.tasklists) {\n bulletStyle = ' class=\"task-list-item\" style=\"list-style-type: none;\"';\n item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function () {\n var otp = '
  • a
  • \n // instead of:\n //
    • - - a
    \n // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n return '¨A' + wm2;\n });\n\n // m1 - Leading line or\n // Has a double return (multi paragraph) or\n // Has sublist\n if (m1 || (item.search(/\\n{2,}/) > -1)) {\n item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n item = showdown.subParser('blockGamut')(item, options, globals);\n } else {\n // Recursion for sub-lists:\n item = showdown.subParser('lists')(item, options, globals);\n item = item.replace(/\\n$/, ''); // chomp(item)\n item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n // Colapse double linebreaks\n item = item.replace(/\\n\\n+/g, '\\n\\n');\n if (isParagraphed) {\n item = showdown.subParser('paragraphs')(item, options, globals);\n } else {\n item = showdown.subParser('spanGamut')(item, options, globals);\n }\n }\n\n // now we need to remove the marker (¨A)\n item = item.replace('¨A', '');\n // we can finally wrap the line in list item tags\n item = '' + item + '\\n';\n\n return item;\n });\n\n // attacklab: strip sentinel\n listStr = listStr.replace(/¨0/g, '');\n\n globals.gListLevel--;\n\n if (trimTrailing) {\n listStr = listStr.replace(/\\s+$/, '');\n }\n\n return listStr;\n }\n\n function styleStartNumber (list, listType) {\n // check if ol and starts by a number different than 1\n if (listType === 'ol') {\n var res = list.match(/^ *(\\d+)\\./);\n if (res && res[1] !== '1') {\n return ' start=\"' + res[1] + '\"';\n }\n }\n return '';\n }\n\n /**\n * Check and parse consecutive lists (better fix for issue #142)\n * @param {string} list\n * @param {string} listType\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function parseConsecutiveLists (list, listType, trimTrailing) {\n // check if we caught 2 or more consecutive lists by mistake\n // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n result = '';\n\n if (list.search(counterRxg) !== -1) {\n (function parseCL (txt) {\n var pos = txt.search(counterRxg),\n style = styleStartNumber(list, listType);\n if (pos !== -1) {\n // slice\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\\n';\n\n // invert counterType and listType\n listType = (listType === 'ul') ? 'ol' : 'ul';\n counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n //recurse\n parseCL(txt.slice(pos));\n } else {\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt, !!trimTrailing) + '\\n';\n }\n })(list);\n } else {\n var style = styleStartNumber(list, listType);\n result = '\\n\\n<' + listType + style + '>\\n' + processListItems(list, !!trimTrailing) + '\\n';\n }\n\n return result;\n }\n\n /** Start of list parsing **/\n text = globals.converter._dispatch('lists.before', text, options, globals);\n // add sentinel to hack around khtml/safari bug:\n // http://bugs.webkit.org/show_bug.cgi?id=11231\n text += '¨0';\n\n if (globals.gListLevel) {\n text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, list, m2) {\n var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, true);\n }\n );\n } else {\n text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, m1, list, m3) {\n var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, false);\n }\n );\n }\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n text = globals.converter._dispatch('lists.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Parse metadata at the top of the document\n */\nshowdown.subParser('metadata', function (text, options, globals) {\n 'use strict';\n\n if (!options.metadata) {\n return text;\n }\n\n text = globals.converter._dispatch('metadata.before', text, options, globals);\n\n function parseMetadataContents (content) {\n // raw is raw so it's not changed in any way\n globals.metadata.raw = content;\n\n // escape chars forbidden in html attributes\n // double quotes\n content = content\n // ampersand first\n .replace(/&/g, '&')\n // double quotes\n .replace(/\"/g, '"');\n\n content = content.replace(/\\n {4}/g, ' ');\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm, function (wm, key, value) {\n globals.metadata.parsed[key] = value;\n return '';\n });\n }\n\n text = text.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/, function (wholematch, format, content) {\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/, function (wholematch, format, content) {\n if (format) {\n globals.metadata.format = format;\n }\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/¨M/g, '');\n\n text = globals.converter._dispatch('metadata.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n // attacklab: clean up hack\n text = text.replace(/¨0/g, '');\n\n text = globals.converter._dispatch('outdent.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n\n var grafs = text.split(/\\n{2,}/g),\n grafsOut = [],\n end = grafs.length; // Wrap

    tags\n\n for (var i = 0; i < end; i++) {\n var str = grafs[i];\n // if this is an HTML marker, copy it\n if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n grafsOut.push(str);\n\n // test for presence of characters to prevent empty lines being parsed\n // as paragraphs (resulting in undesired extra empty paragraphs)\n } else if (str.search(/\\S/) >= 0) {\n str = showdown.subParser('spanGamut')(str, options, globals);\n str = str.replace(/^([ \\t]*)/g, '

    ');\n str += '

    ';\n grafsOut.push(str);\n }\n }\n\n /** Unhashify HTML blocks */\n end = grafsOut.length;\n for (i = 0; i < end; i++) {\n var blockText = '',\n grafsOutIt = grafsOut[i],\n codeFlag = false;\n // if this is a marker for an html block...\n // use RegExp.test instead of string.search because of QML bug\n while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,\n num = RegExp.$2;\n\n if (delim === 'K') {\n blockText = globals.gHtmlBlocks[num];\n } else {\n // we need to check if ghBlock is a false positive\n if (codeFlag) {\n // use encoded version of all text\n blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n }\n }\n blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n // Check if grafsOutIt is a pre->code\n if (/^]*>\\s*]*>/.test(grafsOutIt)) {\n codeFlag = true;\n }\n }\n grafsOut[i] = grafsOutIt;\n }\n text = grafsOut.join('\\n');\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n\r\n/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n 'use strict';\n\n if (ext.filter) {\n text = ext.filter(text, globals.converter, options);\n\n } else if (ext.regex) {\n // TODO remove this when old extension loading mechanism is deprecated\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n re = new RegExp(re, 'g');\n }\n text = text.replace(re, ext.replace);\n }\n\n return text;\n});\n\r\n/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n text = showdown.subParser('codeSpans')(text, options, globals);\n text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n // Process anchor and image tags. Images must come first,\n // because ![foo][f] looks like an anchor.\n text = showdown.subParser('images')(text, options, globals);\n text = showdown.subParser('anchors')(text, options, globals);\n\n // Make links out of things like ``\n // Must come after anchors, because you can use < and >\n // delimiters in inline links like [this]().\n text = showdown.subParser('autoLinks')(text, options, globals);\n text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n text = showdown.subParser('emoji')(text, options, globals);\n text = showdown.subParser('underline')(text, options, globals);\n text = showdown.subParser('italicsAndBold')(text, options, globals);\n text = showdown.subParser('strikethrough')(text, options, globals);\n text = showdown.subParser('ellipsis')(text, options, globals);\n\n // we need to hash HTML tags inside spans\n text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n // now we encode amps and angles\n text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n // Do hard breaks\n if (options.simpleLineBreaks) {\n // GFM style hard breaks\n // only add line breaks if the text does not contain a block (special case for lists)\n if (!/\\n\\n¨K/.test(text)) {\n text = text.replace(/\\n+/g, '
    \\n');\n }\n } else {\n // Vanilla hard breaks\n text = text.replace(/ +\\n/g, '
    \\n');\n }\n\n text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('strikethrough', function (text, options, globals) {\n 'use strict';\n\n function parseInside (txt) {\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n return '' + txt + '';\n }\n\n if (options.strikethrough) {\n text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n }\n\n return text;\n});\n\r\n/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n 'use strict';\n\n var regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n base64Regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n text += '¨0';\n\n var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n linkId = linkId.toLowerCase();\n if (url.match(/^data:.+?\\/.+?;base64,/)) {\n // remove newlines\n globals.gUrls[linkId] = url.replace(/\\s/g, '');\n } else {\n globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive\n }\n\n if (blankLines) {\n // Oops, found blank lines, so it's not a title.\n // Put back the parenthetical statement we stole.\n return blankLines + title;\n\n } else {\n if (title) {\n globals.gTitles[linkId] = title.replace(/\"|'/g, '"');\n }\n if (options.parseImgDimensions && width && height) {\n globals.gDimensions[linkId] = {\n width: width,\n height: height\n };\n }\n }\n // Completely remove the definition from the text\n return '';\n };\n\n // first we try to find base64 link references\n text = text.replace(base64Regex, replaceFunc);\n\n text = text.replace(regex, replaceFunc);\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return text;\n});\n\r\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles (sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders (header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function parseCells (cell, style) {\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable (headers, cells) {\n var tb = '\\n\\n\\n',\n tblLgn = headers.length;\n\n for (var i = 0; i < tblLgn; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n\\n';\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i][ii];\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTable (rawTable) {\n var i, tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n tableLines.shift();\n tableLines.shift();\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i]\n .split('|')\n .map(function (s) {\n return s.trim();\n })\n );\n }\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n }\n row.push(parseCells(rawCells[i][ii], styles[ii]));\n }\n cells.push(row);\n }\n\n return buildTable(headers, cells);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('underline', function (text, options, globals) {\n 'use strict';\n\n if (!options.underline) {\n return text;\n }\n\n text = globals.converter._dispatch('underline.before', text, options, globals);\n\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n }\n\n // escape remaining underscores to prevent them being parsed by italic and bold\n text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('underline.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n\n text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('makeMarkdown.blockquote', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);\n\n if (innerTxt === '') {\n continue;\n }\n txt += innerTxt;\n }\n }\n // cleanup\n txt = txt.trim();\n txt = '> ' + txt.split('\\n').join('\\n> ');\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.codeBlock', function (node, globals) {\n 'use strict';\n\n var lang = node.getAttribute('language'),\n num = node.getAttribute('precodenum');\n return '```' + lang + '\\n' + globals.preList[num] + '\\n```';\n});\n\r\nshowdown.subParser('makeMarkdown.codeSpan', function (node) {\n 'use strict';\n\n return '`' + node.innerHTML + '`';\n});\n\r\nshowdown.subParser('makeMarkdown.emphasis', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '*';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '*';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {\n 'use strict';\n\n var headerMark = new Array(headerLevel + 1).join('#'),\n txt = '';\n\n if (node.hasChildNodes()) {\n txt = headerMark + ' ';\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.hr', function () {\n 'use strict';\n\n return '---';\n});\n\r\nshowdown.subParser('makeMarkdown.image', function (node) {\n 'use strict';\n\n var txt = '';\n if (node.hasAttribute('src')) {\n txt += '![' + node.getAttribute('alt') + '](';\n txt += '<' + node.getAttribute('src') + '>';\n if (node.hasAttribute('width') && node.hasAttribute('height')) {\n txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');\n }\n\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.links', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes() && node.hasAttribute('href')) {\n var children = node.childNodes,\n childrenLength = children.length;\n txt = '[';\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '](';\n txt += '<' + node.getAttribute('href') + '>';\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.list', function (node, globals, type) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var listItems = node.childNodes,\n listItemsLenght = listItems.length,\n listNum = node.getAttribute('start') || 1;\n\n for (var i = 0; i < listItemsLenght; ++i) {\n if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {\n continue;\n }\n\n // define the bullet to use in list\n var bullet = '';\n if (type === 'ol') {\n bullet = listNum.toString() + '. ';\n } else {\n bullet = '- ';\n }\n\n // parse list item\n txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);\n ++listNum;\n }\n\n // add comment at the end to prevent consecutive lists to be parsed as one\n txt += '\\n\\n';\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.listItem', function (node, globals) {\n 'use strict';\n\n var listItemTxt = '';\n\n var children = node.childNodes,\n childrenLenght = children.length;\n\n for (var i = 0; i < childrenLenght; ++i) {\n listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n // if it's only one liner, we need to add a newline at the end\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt += '\\n';\n } else {\n // it's multiparagraph, so we need to indent\n listItemTxt = listItemTxt\n .split('\\n')\n .join('\\n ')\n .replace(/^ {4}$/gm, '')\n .replace(/\\n\\n+/g, '\\n\\n');\n }\n\n return listItemTxt;\n});\n\r\n\n\nshowdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {\n 'use strict';\n\n spansOnly = spansOnly || false;\n\n var txt = '';\n\n // edge case of text without wrapper paragraph\n if (node.nodeType === 3) {\n return showdown.subParser('makeMarkdown.txt')(node, globals);\n }\n\n // HTML comment\n if (node.nodeType === 8) {\n return '\\n\\n';\n }\n\n // process only node elements\n if (node.nodeType !== 1) {\n return '';\n }\n\n var tagName = node.tagName.toLowerCase();\n\n switch (tagName) {\n\n //\n // BLOCKS\n //\n case 'h1':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\\n\\n'; }\n break;\n case 'h2':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\\n\\n'; }\n break;\n case 'h3':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\\n\\n'; }\n break;\n case 'h4':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\\n\\n'; }\n break;\n case 'h5':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\\n\\n'; }\n break;\n case 'h6':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\\n\\n'; }\n break;\n\n case 'p':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\\n\\n'; }\n break;\n\n case 'blockquote':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\\n\\n'; }\n break;\n\n case 'hr':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\\n\\n'; }\n break;\n\n case 'ol':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\\n\\n'; }\n break;\n\n case 'ul':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\\n\\n'; }\n break;\n\n case 'precode':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\\n\\n'; }\n break;\n\n case 'pre':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\\n\\n'; }\n break;\n\n case 'table':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\\n\\n'; }\n break;\n\n //\n // SPANS\n //\n case 'code':\n txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);\n break;\n\n case 'em':\n case 'i':\n txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);\n break;\n\n case 'strong':\n case 'b':\n txt = showdown.subParser('makeMarkdown.strong')(node, globals);\n break;\n\n case 'del':\n txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);\n break;\n\n case 'a':\n txt = showdown.subParser('makeMarkdown.links')(node, globals);\n break;\n\n case 'img':\n txt = showdown.subParser('makeMarkdown.image')(node, globals);\n break;\n\n default:\n txt = node.outerHTML + '\\n\\n';\n }\n\n // common normalization\n // TODO eventually\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.paragraph', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n\n // some text normalization\n txt = txt.trim();\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.pre', function (node, globals) {\n 'use strict';\n\n var num = node.getAttribute('prenum');\n return '
    ' + globals.preList[num] + '
    ';\n});\n\r\nshowdown.subParser('makeMarkdown.strikethrough', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '~~';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '~~';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.strong', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '**';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '**';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.table', function (node, globals) {\n 'use strict';\n\n var txt = '',\n tableArray = [[], []],\n headings = node.querySelectorAll('thead>tr>th'),\n rows = node.querySelectorAll('tbody>tr'),\n i, ii;\n for (i = 0; i < headings.length; ++i) {\n var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),\n allign = '---';\n\n if (headings[i].hasAttribute('style')) {\n var style = headings[i].getAttribute('style').toLowerCase().replace(/\\s/g, '');\n switch (style) {\n case 'text-align:left;':\n allign = ':---';\n break;\n case 'text-align:right;':\n allign = '---:';\n break;\n case 'text-align:center;':\n allign = ':---:';\n break;\n }\n }\n tableArray[0][i] = headContent.trim();\n tableArray[1][i] = allign;\n }\n\n for (i = 0; i < rows.length; ++i) {\n var r = tableArray.push([]) - 1,\n cols = rows[i].getElementsByTagName('td');\n\n for (ii = 0; ii < headings.length; ++ii) {\n var cellContent = ' ';\n if (typeof cols[ii] !== 'undefined') {\n cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);\n }\n tableArray[r].push(cellContent);\n }\n }\n\n var cellSpacesCount = 3;\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n var strLen = tableArray[i][ii].length;\n if (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n }\n }\n\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n if (i === 1) {\n if (tableArray[i][ii].slice(-1) === ':') {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');\n }\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);\n }\n }\n txt += '| ' + tableArray[i].join(' | ') + ' |\\n';\n }\n\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.tableCell', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);\n }\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.txt', function (node) {\n 'use strict';\n\n var txt = node.nodeValue;\n\n // multiple spaces are collapsed\n txt = txt.replace(/ +/g, ' ');\n\n // replace the custom ¨NBSP; with a space\n txt = txt.replace(/¨NBSP;/g, ' ');\n\n // \", <, > and & should replace escaped html entities\n txt = showdown.helper.unescapeHTMLEntities(txt);\n\n // escape markdown magic characters\n // emphasis, strong and strikethrough - can appear everywhere\n // we also escape pipe (|) because of tables\n // and escape ` because of code blocks and spans\n txt = txt.replace(/([*_~|`])/g, '\\\\$1');\n\n // escape > because of blockquotes\n txt = txt.replace(/^(\\s*)>/g, '\\\\$1>');\n\n // hash character, only troublesome at the beginning of a line because of headers\n txt = txt.replace(/^#/gm, '\\\\#');\n\n // horizontal rules\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/, '$1\\\\$2$3');\n\n // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, '$1\\\\.');\n\n // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)\n txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\\\$2');\n\n // images and links, ] followed by ( is problematic, so we escape it\n txt = txt.replace(/]([\\s]*)\\(/g, '\\\\]$1\\\\(');\n\n // reference URIs must also be escaped\n txt = txt.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm, '\\\\[$1]:');\n\n return txt;\n});\n\r\nvar root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n define(function () {\n 'use strict';\n return showdown;\n });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n module.exports = showdown;\n\n// Regular Browser loader\n} else {\n root.showdown = showdown;\n}\n}).call(this);\r\n\n//# sourceMappingURL=showdown.js.map\r\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA,SAMA;AACA;AACA;AACA;;;;;A","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"0.plugin.js","sources":["/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/cron-validator/lib/index.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-orchestrator.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/command-utils.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/boldCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/codeCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/defaults.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/headerCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/imageCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/italicCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/linkCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/listCommands.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/quoteCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/save-image-command.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/commands/default-commands/strikeThroughCommand.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Preview.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ReactMde.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/SuggestionsDropdown.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/TextArea.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/Toolbar.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButton.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/ToolbarButtonGroup.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/grip-svg.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/components/index.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/MdeFontAwesomeIcon.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/SvgIcon.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/icons/index.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/l18n/react-mde.en.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/ClassNames.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/InsertTextAtPosition.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/MarkdownUtil.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/Math.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/TextAreaCaretPosition.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/util/files.js","webpack:////Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css?f5f1","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/showdown/dist/showdown.js","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css"],"sourcesContent":["\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// This comes from the fact that parseInt trims characters coming\n// after digits and consider it a valid int, so `1*` becomes `1`.\nvar safeParseInt = function (value) {\n if (/^\\d+$/.test(value)) {\n return Number(value);\n }\n else {\n return NaN;\n }\n};\nvar isWildcard = function (value) {\n return value === '*';\n};\nvar isQuestionMark = function (value) {\n return value === '?';\n};\nvar isInRange = function (value, start, stop) {\n return value >= start && value <= stop;\n};\nvar isValidRange = function (value, start, stop) {\n var sides = value.split('-');\n switch (sides.length) {\n case 1:\n return isWildcard(value) || isInRange(safeParseInt(value), start, stop);\n case 2:\n var _a = sides.map(function (side) { return safeParseInt(side); }), small = _a[0], big = _a[1];\n return small <= big && isInRange(small, start, stop) && isInRange(big, start, stop);\n default:\n return false;\n }\n};\nvar isValidStep = function (value) {\n return value === undefined || value.search(/[^\\d]/) === -1;\n};\nvar validateForRange = function (value, start, stop) {\n if (value.search(/[^\\d-,\\/*]/) !== -1) {\n return false;\n }\n var list = value.split(',');\n return list.every(function (condition) {\n var splits = condition.split('/');\n // Prevents `*/ * * * *` from being accepted.\n if (condition.trim().endsWith('/')) {\n return false;\n }\n // Prevents `*/*/* * * * *` from being accepted\n if (splits.length > 2) {\n return false;\n }\n // If we don't have a `/`, right will be undefined which is considered a valid step if we don't a `/`.\n var left = splits[0], right = splits[1];\n return isValidRange(left, start, stop) && isValidStep(right);\n });\n};\nvar hasValidSeconds = function (seconds) {\n return validateForRange(seconds, 0, 59);\n};\nvar hasValidMinutes = function (minutes) {\n return validateForRange(minutes, 0, 59);\n};\nvar hasValidHours = function (hours) {\n return validateForRange(hours, 0, 23);\n};\nvar hasValidDays = function (days, allowBlankDay) {\n return (allowBlankDay && isQuestionMark(days)) || validateForRange(days, 1, 31);\n};\nvar monthAlias = {\n jan: '1',\n feb: '2',\n mar: '3',\n apr: '4',\n may: '5',\n jun: '6',\n jul: '7',\n aug: '8',\n sep: '9',\n oct: '10',\n nov: '11',\n dec: '12'\n};\nvar hasValidMonths = function (months, alias) {\n // Prevents alias to be used as steps\n if (months.search(/\\/[a-zA-Z]/) !== -1) {\n return false;\n }\n if (alias) {\n var remappedMonths = months.toLowerCase().replace(/[a-z]{3}/g, function (match) {\n return monthAlias[match] === undefined ? match : monthAlias[match];\n });\n // If any invalid alias was used, it won't pass the other checks as there will be non-numeric values in the months\n return validateForRange(remappedMonths, 1, 12);\n }\n return validateForRange(months, 1, 12);\n};\nvar weekdaysAlias = {\n sun: '0',\n mon: '1',\n tue: '2',\n wed: '3',\n thu: '4',\n fri: '5',\n sat: '6'\n};\nvar hasValidWeekdays = function (weekdays, alias, allowBlankDay) {\n // If there is a question mark, checks if the allowBlankDay flag is set\n if (allowBlankDay && isQuestionMark(weekdays)) {\n return true;\n }\n else if (!allowBlankDay && isQuestionMark(weekdays)) {\n return false;\n }\n // Prevents alias to be used as steps\n if (weekdays.search(/\\/[a-zA-Z]/) !== -1) {\n return false;\n }\n if (alias) {\n var remappedWeekdays = weekdays.toLowerCase().replace(/[a-z]{3}/g, function (match) {\n return weekdaysAlias[match] === undefined ? match : weekdaysAlias[match];\n });\n // If any invalid alias was used, it won't pass the other checks as there will be non-numeric values in the weekdays\n return validateForRange(remappedWeekdays, 0, 6);\n }\n return validateForRange(weekdays, 0, 6);\n};\nvar hasCompatibleDayFormat = function (days, weekdays, allowBlankDay) {\n return !(allowBlankDay && isQuestionMark(days) && isQuestionMark(weekdays));\n};\nvar split = function (cron) {\n return cron.trim().split(/\\s+/);\n};\nvar defaultOptions = {\n alias: false,\n seconds: false,\n allowBlankDay: false\n};\nexports.isValidCron = function (cron, options) {\n options = __assign(__assign({}, defaultOptions), options);\n var splits = split(cron);\n if (splits.length > (options.seconds ? 6 : 5) || splits.length < 5) {\n return false;\n }\n var checks = [];\n if (splits.length === 6) {\n var seconds = splits.shift();\n if (seconds) {\n checks.push(hasValidSeconds(seconds));\n }\n }\n // We could only check the steps gradually and return false on the first invalid block,\n // However, this won't have any performance impact so why bother for now.\n var minutes = splits[0], hours = splits[1], days = splits[2], months = splits[3], weekdays = splits[4];\n checks.push(hasValidMinutes(minutes));\n checks.push(hasValidHours(hours));\n checks.push(hasValidDays(days, options.allowBlankDay));\n checks.push(hasValidMonths(months, options.alias));\n checks.push(hasValidWeekdays(weekdays, options.alias, options.allowBlankDay));\n checks.push(hasCompatibleDayFormat(days, weekdays, options.allowBlankDay));\n return checks.every(Boolean);\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar __1 = require(\"..\");\nvar InsertTextAtPosition_1 = require(\"../util/InsertTextAtPosition\");\nvar command_utils_1 = require(\"./command-utils\");\nvar defaults_1 = require(\"./default-commands/defaults\");\nvar TextAreaTextApi = /** @class */ (function () {\n function TextAreaTextApi(textAreaRef) {\n this.textAreaRef = textAreaRef;\n }\n TextAreaTextApi.prototype.replaceSelection = function (text) {\n var textArea = this.textAreaRef.current;\n InsertTextAtPosition_1.insertText(textArea, text);\n return getStateFromTextArea(textArea);\n };\n TextAreaTextApi.prototype.setSelectionRange = function (selection) {\n var textArea = this.textAreaRef.current;\n textArea.focus();\n textArea.selectionStart = selection.start;\n textArea.selectionEnd = selection.end;\n return getStateFromTextArea(textArea);\n };\n TextAreaTextApi.prototype.getState = function () {\n var textArea = this.textAreaRef.current;\n return getStateFromTextArea(textArea);\n };\n return TextAreaTextApi;\n}());\nexports.TextAreaTextApi = TextAreaTextApi;\nfunction getStateFromTextArea(textArea) {\n return {\n selection: {\n start: textArea.selectionStart,\n end: textArea.selectionEnd\n },\n text: textArea.value,\n selectedText: textArea.value.slice(textArea.selectionStart, textArea.selectionEnd)\n };\n}\nexports.getStateFromTextArea = getStateFromTextArea;\nvar CommandOrchestrator = /** @class */ (function () {\n function CommandOrchestrator(customCommands, textArea, l18n, pasteOptions) {\n var _this = this;\n this.getCommand = function (name) {\n var command = _this.commandMap[name];\n if (!command) {\n throw new Error(\"Cannot execute command. Command not found: \" + name);\n }\n return command;\n };\n /**\n * Tries to find a command the wants to handle the keyboard event.\n * If a command is found, it is executed and the function returns\n */\n this.handlePossibleKeyCommand = function (e) {\n for (var _i = 0, _a = _this.keyActivatedCommands; _i < _a.length; _i++) {\n var commandName = _a[_i];\n if (_this.getCommand(commandName).handleKeyCommand(e)) {\n _this.executeCommand(commandName).then(function (r) { });\n return true;\n }\n }\n return false;\n };\n if (pasteOptions && !pasteOptions.saveImage) {\n throw new Error(\"paste options are incomplete. saveImage are required \");\n }\n this.commandMap = __assign(__assign({}, __1.getDefaultCommandMap()), (customCommands || {}));\n this.pasteOptions = pasteOptions;\n this.keyActivatedCommands = command_utils_1.extractKeyActivatedCommands(customCommands);\n this.textAreaRef = textArea;\n this.textApi = new TextAreaTextApi(textArea);\n this.l18n = l18n;\n }\n CommandOrchestrator.prototype.executeCommand = function (commandName, context) {\n return __awaiter(this, void 0, void 0, function () {\n var command, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.isExecuting) {\n // The simplest thing to do is to ignore commands while\n // there is already a command executing. The alternative would be to queue commands\n // but there is no guarantee that the state after one command executes will still be compatible\n // with the next one. In fact, it is likely not to be.\n return [2 /*return*/];\n }\n this.isExecuting = true;\n command = this.commandMap[commandName];\n result = command.execute({\n initialState: getStateFromTextArea(this.textAreaRef.current),\n textApi: this.textApi,\n l18n: this.l18n,\n context: context\n });\n return [4 /*yield*/, result];\n case 1:\n _a.sent();\n this.isExecuting = false;\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Executes the paste command\n */\n CommandOrchestrator.prototype.executePasteCommand = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (this.pasteOptions) {\n return [2 /*return*/, this.executeCommand(this.pasteOptions.command || defaults_1.getDefaultSaveImageCommandName(), {\n saveImage: this.pasteOptions.saveImage,\n event: event\n })];\n }\n return [2 /*return*/];\n });\n });\n };\n /**\n * Returns a command by name\n * @param name\n */\n CommandOrchestrator.prototype.getCommandByName = function (name) {\n return this.commandMap[name];\n };\n return CommandOrchestrator;\n}());\nexports.CommandOrchestrator = CommandOrchestrator;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Returns a flat array of commands that can be activated by the keyboard.\n * When keydowns happen, these commands 'handleKeyCommand' will be executed, in this order,\n * and the first that returns true will be executed.\n */\nfunction extractKeyActivatedCommands(commandMap) {\n var result = [];\n for (var command in commandMap) {\n if (commandMap.hasOwnProperty(command)) {\n if (commandMap[command].handleKeyCommand) {\n result.push(command);\n }\n }\n }\n return result;\n}\nexports.extractKeyActivatedCommands = extractKeyActivatedCommands;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.boldCommand = {\n buttonProps: { \"aria-label\": \"Add bold text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the bold mark up\n var state2 = textApi.replaceSelection(\"**\" + state1.selectedText + \"**\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state2.selection.end - 2 - state1.selectedText.length,\n end: state2.selection.end - 2\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"b\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.codeCommand = {\n buttonProps: { \"aria-label\": \"Insert code\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // when there's no breaking line\n if (state1.selectedText.indexOf(\"\\n\") === -1) {\n textApi.replaceSelection(\"`\" + state1.selectedText + \"`\");\n // Adjust the selection to not contain the **\n var selectionStart_1 = state1.selection.start + 1;\n var selectionEnd_1 = selectionStart_1 + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart_1,\n end: selectionEnd_1\n });\n return;\n }\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n textApi.replaceSelection(breaksBefore + \"```\\n\" + state1.selectedText + \"\\n```\" + breaksAfter);\n var selectionStart = state1.selection.start + breaksBeforeCount + 4;\n var selectionEnd = selectionStart + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar headerCommand_1 = require(\"./headerCommand\");\nvar boldCommand_1 = require(\"./boldCommand\");\nvar italicCommand_1 = require(\"./italicCommand\");\nvar strikeThroughCommand_1 = require(\"./strikeThroughCommand\");\nvar linkCommand_1 = require(\"./linkCommand\");\nvar quoteCommand_1 = require(\"./quoteCommand\");\nvar codeCommand_1 = require(\"./codeCommand\");\nvar listCommands_1 = require(\"./listCommands\");\nvar imageCommand_1 = require(\"./imageCommand\");\nvar save_image_command_1 = require(\"./save-image-command\");\nfunction getDefaultToolbarCommands() {\n return [\n [\"header\", \"bold\", \"italic\", \"strikethrough\"],\n [\"link\", \"quote\", \"code\", \"image\"],\n [\"unordered-list\", \"ordered-list\", \"checked-list\"]\n ];\n}\nexports.getDefaultToolbarCommands = getDefaultToolbarCommands;\nfunction getDefaultCommandMap() {\n return {\n header: headerCommand_1.headerCommand,\n bold: boldCommand_1.boldCommand,\n italic: italicCommand_1.italicCommand,\n strikethrough: strikeThroughCommand_1.strikeThroughCommand,\n link: linkCommand_1.linkCommand,\n quote: quoteCommand_1.quoteCommand,\n code: codeCommand_1.codeCommand,\n image: imageCommand_1.imageCommand,\n \"unordered-list\": listCommands_1.unorderedListCommand,\n \"ordered-list\": listCommands_1.orderedListCommand,\n \"checked-list\": listCommands_1.checkedListCommand,\n \"save-image\": save_image_command_1.saveImageCommand\n };\n}\nexports.getDefaultCommandMap = getDefaultCommandMap;\nfunction getDefaultSaveImageCommandName() {\n return \"save-image\";\n}\nexports.getDefaultSaveImageCommandName = getDefaultSaveImageCommandName;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nfunction setHeader(initialState, api, prefix) {\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = api.setSelectionRange(newSelectionRange);\n // Add the prefix to the selection\n var state2 = api.replaceSelection(\"\" + prefix + state1.selectedText);\n // Adjust the selection to not contain the prefix\n api.setSelectionRange({\n start: state2.selection.end - state1.selectedText.length,\n end: state2.selection.end\n });\n}\nexports.headerCommand = {\n buttonProps: { \"aria-label\": \"Add header\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n setHeader(initialState, textApi, \"### \");\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.imageCommand = {\n buttonProps: { \"aria-label\": \"Add image\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Replaces the current selection with the whole word selected\n var state1 = textApi.setSelectionRange(MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n }));\n // Replaces the current selection with the image\n var imageTemplate = state1.selectedText || \"https://example.com/your-image.png\";\n textApi.replaceSelection(\"![](\" + imageTemplate + \")\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state1.selection.start + 4,\n end: state1.selection.start + 4 + imageTemplate.length\n });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.italicCommand = {\n buttonProps: { \"aria-label\": \"Add italic text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the italic mark up\n var state2 = textApi.replaceSelection(\"*\" + state1.selectedText + \"*\");\n // Adjust the selection to not contain the *\n textApi.setSelectionRange({\n start: state2.selection.end - 1 - state1.selectedText.length,\n end: state2.selection.end - 1\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"i\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.linkCommand = {\n buttonProps: { \"aria-label\": \"Add a link\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the bold mark up\n var state2 = textApi.replaceSelection(\"[\" + state1.selectedText + \"](url)\");\n // Adjust the selection to not contain the **\n textApi.setSelectionRange({\n start: state2.selection.end - 6 - state1.selectedText.length,\n end: state2.selection.end - 6\n });\n },\n handleKeyCommand: function (e) { return (e.ctrlKey || e.metaKey) && e.key == \"k\"; }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\n/**\n * Inserts insertionString before each line\n */\nfunction insertBeforeEachLine(selectedText, insertBefore) {\n var lines = selectedText.split(/\\n/);\n var insertionLength = 0;\n var modifiedText = lines\n .map(function (item, index) {\n if (typeof insertBefore === \"string\") {\n insertionLength += insertBefore.length;\n return insertBefore + item;\n }\n else if (typeof insertBefore === \"function\") {\n var insertionResult = insertBefore(item, index);\n insertionLength += insertionResult.length;\n return insertBefore(item, index) + item;\n }\n throw Error(\"insertion is expected to be either a string or a function\");\n })\n .join(\"\\n\");\n return { modifiedText: modifiedText, insertionLength: insertionLength };\n}\nexports.insertBeforeEachLine = insertBeforeEachLine;\nexports.makeList = function (state0, api, insertBefore) {\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: state0.text,\n selection: state0.selection\n });\n var state1 = api.setSelectionRange(newSelectionRange);\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n var modifiedText = insertBeforeEachLine(state1.selectedText, insertBefore);\n api.replaceSelection(\"\" + breaksBefore + modifiedText.modifiedText + breaksAfter);\n // Specifically when the text has only one line, we can exclude the \"- \", for example, from the selection\n var oneLinerOffset = state1.selectedText.indexOf(\"\\n\") === -1 ? modifiedText.insertionLength : 0;\n var selectionStart = state1.selection.start + breaksBeforeCount + oneLinerOffset;\n var selectionEnd = selectionStart + modifiedText.modifiedText.length - oneLinerOffset;\n // Adjust the selection to not contain the **\n api.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n};\nexports.unorderedListCommand = {\n buttonProps: { \"aria-label\": \"Add unordered list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, \"- \");\n }\n};\nexports.orderedListCommand = {\n buttonProps: { \"aria-label\": \"Add ordered list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, function (item, index) { return index + 1 + \". \"; });\n }\n};\nexports.checkedListCommand = {\n buttonProps: { \"aria-label\": \"Add checked list\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n exports.makeList(initialState, textApi, function (item, index) { return \"- [ ] \"; });\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.quoteCommand = {\n buttonProps: { \"aria-label\": \"Insert a quote\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n var breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(state1.text, state1.selection.start);\n var breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n var breaksAfterCount = MarkdownUtil_1.getBreaksNeededForEmptyLineAfter(state1.text, state1.selection.end);\n var breaksAfter = Array(breaksAfterCount + 1).join(\"\\n\");\n // Replaces the current selection with the quote mark up\n textApi.replaceSelection(breaksBefore + \"> \" + state1.selectedText + breaksAfter);\n var selectionStart = state1.selection.start + breaksBeforeCount + 2;\n var selectionEnd = selectionStart + state1.selectedText.length;\n textApi.setSelectionRange({\n start: selectionStart,\n end: selectionEnd\n });\n }\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar files_1 = require(\"../../util/files\");\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.saveImageCommand = {\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi, context = _a.context, l18n = _a.l18n;\n return __awaiter(this, void 0, void 0, function () {\n var pasteContext, event, saveImage, items, _b, _c, _i, index, item, breaksBeforeCount, breaksBefore, placeHolder, blob, blobContents, savingImage, imageUrl, newState, uploadingText, realImageMarkdown, selectionDelta;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!context && !isPasteContext(context)) {\n throw new Error(\"wrong context\");\n }\n pasteContext = context;\n event = pasteContext.event, saveImage = pasteContext.saveImage;\n items = event.clipboardData.items;\n _b = [];\n for (_c in items)\n _b.push(_c);\n _i = 0;\n _d.label = 1;\n case 1:\n if (!(_i < _b.length)) return [3 /*break*/, 5];\n index = _b[_i];\n item = items[index];\n if (!(item.kind === \"file\")) return [3 /*break*/, 4];\n breaksBeforeCount = MarkdownUtil_1.getBreaksNeededForEmptyLineBefore(initialState.text, initialState.selection.start);\n breaksBefore = Array(breaksBeforeCount + 1).join(\"\\n\");\n placeHolder = breaksBefore + \"![\" + l18n.uploadingImage + \"]()\";\n textApi.replaceSelection(placeHolder);\n blob = item.getAsFile();\n return [4 /*yield*/, files_1.readFileAsync(blob)];\n case 2:\n blobContents = _d.sent();\n savingImage = saveImage(blobContents);\n return [4 /*yield*/, savingImage.next()];\n case 3:\n imageUrl = (_d.sent()).value;\n newState = textApi.getState();\n uploadingText = newState.text.substr(initialState.selection.start, placeHolder.length);\n if (uploadingText === placeHolder) {\n // In this case, the user did not touch the placeholder. Good user\n // we will replace it with the real one that came from the server\n textApi.setSelectionRange({\n start: initialState.selection.start,\n end: initialState.selection.start + placeHolder.length\n });\n realImageMarkdown = breaksBefore + \"![image](\" + imageUrl + \")\";\n selectionDelta = realImageMarkdown.length - placeHolder.length;\n textApi.replaceSelection(realImageMarkdown);\n textApi.setSelectionRange({\n start: newState.selection.start + selectionDelta,\n end: newState.selection.end + selectionDelta\n });\n }\n _d.label = 4;\n case 4:\n _i++;\n return [3 /*break*/, 1];\n case 5: return [2 /*return*/];\n }\n });\n });\n }\n};\nfunction isPasteContext(context) {\n return context.type === \"paste\";\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil_1 = require(\"../../util/MarkdownUtil\");\nexports.strikeThroughCommand = {\n buttonProps: { \"aria-label\": \"Add strikethrough text\" },\n execute: function (_a) {\n var initialState = _a.initialState, textApi = _a.textApi;\n // Adjust the selection to encompass the whole word if the caret is inside one\n var newSelectionRange = MarkdownUtil_1.selectWord({\n text: initialState.text,\n selection: initialState.selection\n });\n var state1 = textApi.setSelectionRange(newSelectionRange);\n // Replaces the current selection with the strikethrough mark up\n var state2 = textApi.replaceSelection(\"~~\" + state1.selectedText + \"~~\");\n // Adjust the selection to not contain the ~~\n textApi.setSelectionRange({\n start: state2.selection.end - 2 - state1.selectedText.length,\n end: state2.selection.end - 2\n });\n }\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar Preview = /** @class */ (function (_super) {\n __extends(Preview, _super);\n function Preview(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n loading: true\n };\n return _this;\n }\n Preview.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, markdown = _a.markdown, generateMarkdownPreview = _a.generateMarkdownPreview;\n generateMarkdownPreview(markdown).then(function (preview) {\n _this.setState({\n preview: preview,\n loading: false\n });\n });\n };\n Preview.prototype.componentWillReceiveProps = function (nextProps) {\n var _this = this;\n if (nextProps.markdown !== this.props.markdown) {\n nextProps.generateMarkdownPreview(nextProps.markdown).then(function (preview) {\n _this.setState({\n preview: preview,\n loading: false\n });\n });\n }\n };\n Preview.prototype.render = function () {\n var _a = this.props, classes = _a.classes, minHeight = _a.minHeight, loadingPreview = _a.loadingPreview, refObject = _a.refObject;\n var _b = this.state, preview = _b.preview, loading = _b.loading;\n var finalHtml = loading ? loadingPreview : preview;\n var content;\n if (typeof finalHtml === \"string\") {\n content = (React.createElement(\"div\", { className: \"mde-preview-content\", dangerouslySetInnerHTML: { __html: finalHtml || \"

     

    \" }, ref: refObject }));\n }\n else {\n content = React.createElement(\"div\", { className: \"mde-preview-content\" }, finalHtml);\n }\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"mde-preview\", classes, { loading: loading }), style: { minHeight: minHeight + 10 }, \"data-testid\": \"mde-preview\" }, content));\n };\n return Preview;\n}(React.Component));\nexports.Preview = Preview;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar _1 = require(\".\");\nvar defaults_1 = require(\"../commands/default-commands/defaults\");\nvar react_mde_en_1 = require(\"../l18n/react-mde.en\");\nvar icons_1 = require(\"../icons\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar command_orchestrator_1 = require(\"../commands/command-orchestrator\");\nvar grip_svg_1 = require(\"./grip-svg\");\nvar ReactMde = /** @class */ (function (_super) {\n __extends(ReactMde, _super);\n function ReactMde(props) {\n var _a;\n var _this = _super.call(this, props) || this;\n // resizeYStart will be null when it is not resizing\n _this.gripDrag = null;\n _this.handleTextChange = function (value) {\n var onChange = _this.props.onChange;\n onChange(value);\n };\n _this.handleGripMouseDown = function (event) {\n _this.gripDrag = {\n originalHeight: _this.state.editorHeight,\n originalDragY: event.clientY\n };\n };\n _this.handleGripMouseUp = function () {\n _this.gripDrag = null;\n };\n _this.handleGripMouseMove = function (event) {\n if (_this.gripDrag !== null) {\n var newHeight = _this.gripDrag.originalHeight +\n event.clientY -\n _this.gripDrag.originalDragY;\n if (newHeight >= _this.props.minEditorHeight &&\n newHeight <= _this.props.maxEditorHeight) {\n _this.setState(__assign(__assign({}, _this.state), { editorHeight: _this.gripDrag.originalHeight +\n (event.clientY - _this.gripDrag.originalDragY) }));\n }\n }\n };\n _this.handlePaste = function (event) { return __awaiter(_this, void 0, void 0, function () {\n var paste;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n paste = this.props.paste;\n if (!paste || !paste.saveImage) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, this.commandOrchestrator.executePasteCommand(event)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n _this.handleTabChange = function (newTab) {\n var onTabChange = _this.props.onTabChange;\n onTabChange(newTab);\n };\n _this.handleCommand = function (commandName) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.commandOrchestrator.executeCommand(commandName)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n _this.finalRefs = __assign({}, (props.refs || {}));\n if (!_this.finalRefs.textarea) {\n _this.finalRefs.textarea = React.createRef();\n }\n if (!_this.finalRefs.preview) {\n _this.finalRefs.preview = React.createRef();\n }\n _this.commandOrchestrator = new command_orchestrator_1.CommandOrchestrator(_this.props.commands, _this.finalRefs.textarea, _this.props.l18n, _this.props.paste);\n var minEditorHeight = Math.min(props.maxEditorHeight, props.minEditorHeight);\n _this.state = {\n editorHeight: (_a = props.initialEditorHeight, (_a !== null && _a !== void 0 ? _a : minEditorHeight))\n };\n return _this;\n }\n ReactMde.prototype.componentDidMount = function () {\n document.addEventListener(\"mousemove\", this.handleGripMouseMove);\n document.addEventListener(\"mouseup\", this.handleGripMouseUp);\n };\n ReactMde.prototype.render = function () {\n var _this = this;\n var _a, _b, _c, _d, _e, _f;\n var _g = this.props, getIcon = _g.getIcon, toolbarCommands = _g.toolbarCommands, classes = _g.classes, loadingPreview = _g.loadingPreview, readOnly = _g.readOnly, disablePreview = _g.disablePreview, value = _g.value, l18n = _g.l18n, minPreviewHeight = _g.minPreviewHeight, childProps = _g.childProps, selectedTab = _g.selectedTab, generateMarkdownPreview = _g.generateMarkdownPreview, loadSuggestions = _g.loadSuggestions, suggestionTriggerCharacters = _g.suggestionTriggerCharacters, textAreaComponent = _g.textAreaComponent;\n var finalChildProps = childProps || {};\n var toolbarButtons = toolbarCommands.map(function (group) {\n return group.map(function (commandName) {\n var command = _this.commandOrchestrator.getCommand(commandName);\n return {\n commandName: commandName,\n buttonContent: command.icon\n ? command.icon(getIcon)\n : getIcon(commandName),\n buttonProps: command.buttonProps,\n buttonComponentClass: command.buttonComponentClass\n };\n });\n });\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"react-mde\", \"react-mde-tabbed-layout\", (_a = classes) === null || _a === void 0 ? void 0 : _a.reactMde) },\n React.createElement(_1.Toolbar, { classes: (_b = classes) === null || _b === void 0 ? void 0 : _b.toolbar, buttons: toolbarButtons, onCommand: this.handleCommand, onTabChange: this.handleTabChange, tab: selectedTab, readOnly: readOnly, disablePreview: disablePreview, l18n: l18n, buttonProps: finalChildProps.commandButtons, writeButtonProps: finalChildProps.writeButton, previewButtonProps: finalChildProps.previewButton }),\n React.createElement(\"div\", { className: ClassNames_1.classNames({ invisible: selectedTab !== \"write\" }) },\n React.createElement(_1.TextArea, { classes: (_c = classes) === null || _c === void 0 ? void 0 : _c.textArea, suggestionsDropdownClasses: (_d = classes) === null || _d === void 0 ? void 0 : _d.suggestionsDropdown, refObject: this.finalRefs.textarea, onChange: this.handleTextChange, onPaste: this.handlePaste, readOnly: readOnly, textAreaComponent: textAreaComponent, textAreaProps: childProps && childProps.textArea, height: this.state.editorHeight, value: value, suggestionTriggerCharacters: suggestionTriggerCharacters, loadSuggestions: loadSuggestions, onPossibleKeyCommand: this.commandOrchestrator.handlePossibleKeyCommand }),\n React.createElement(\"div\", { className: ClassNames_1.classNames(\"grip\", (_e = classes) === null || _e === void 0 ? void 0 : _e.grip), onMouseDown: this.handleGripMouseDown },\n React.createElement(grip_svg_1.GripSvg, null))),\n selectedTab !== \"write\" && (React.createElement(_1.Preview, { classes: (_f = classes) === null || _f === void 0 ? void 0 : _f.preview, refObject: this.finalRefs.preview, loadingPreview: loadingPreview, minHeight: minPreviewHeight, generateMarkdownPreview: generateMarkdownPreview, markdown: value }))));\n };\n ReactMde.defaultProps = {\n commands: defaults_1.getDefaultCommandMap(),\n toolbarCommands: defaults_1.getDefaultToolbarCommands(),\n getIcon: function (name) { return React.createElement(icons_1.SvgIcon, { icon: name }); },\n readOnly: false,\n l18n: react_mde_en_1.enL18n,\n minEditorHeight: 200,\n maxEditorHeight: 500,\n minPreviewHeight: 200,\n selectedTab: \"write\",\n disablePreview: false,\n suggestionTriggerCharacters: [\"@\"]\n };\n return ReactMde;\n}(React.Component));\nexports.ReactMde = ReactMde;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar react_1 = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nexports.SuggestionsDropdown = function (_a) {\n var classes = _a.classes, suggestions = _a.suggestions, caret = _a.caret, onSuggestionSelected = _a.onSuggestionSelected, focusIndex = _a.focusIndex, textAreaRef = _a.textAreaRef;\n var handleSuggestionClick = react_1.useCallback(function (event) {\n event.preventDefault();\n var index = parseInt(event.currentTarget.attributes[\"data-index\"].value);\n onSuggestionSelected(index);\n }, [suggestions]);\n // onMouseDown should be cancelled because onClick will handle it propertly. This way, the textarea does not lose\n // focus\n var handleMouseDown = react_1.useCallback(function (event) { return event.preventDefault(); }, []);\n return (React.createElement(\"ul\", { className: ClassNames_1.classNames(\"mde-suggestions\", classes), style: {\n left: caret.left - textAreaRef.current.scrollLeft,\n top: caret.top - textAreaRef.current.scrollTop\n } }, suggestions.map(function (s, i) { return (React.createElement(\"li\", { onClick: handleSuggestionClick, onMouseDown: handleMouseDown, key: i, \"aria-selected\": focusIndex === i ? \"true\" : \"false\", \"data-index\": \"\" + i }, s.preview)); })));\n};\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar TextAreaCaretPosition_1 = require(\"../util/TextAreaCaretPosition\");\nvar InsertTextAtPosition_1 = require(\"../util/InsertTextAtPosition\");\nvar Math_1 = require(\"../util/Math\");\nvar SuggestionsDropdown_1 = require(\"./SuggestionsDropdown\");\nvar TextArea = /** @class */ (function (_super) {\n __extends(TextArea, _super);\n function TextArea(props) {\n var _this = _super.call(this, props) || this;\n _this.currentLoadSuggestionsPromise = Promise.resolve(undefined);\n /**\n * suggestionsPromiseIndex exists as a means to cancel what happens when the suggestions promise finishes loading.\n *\n * When the user is searching for suggestions, there is a promise that, when resolved, causes a re-render.\n * However, in case there is another promise to be resolved after the current one, it does not make sense to re-render\n * only to re-render again after the next one is complete.\n *\n * When there is a promise loading and the user cancels the suggestion, you don't want the status to go back to \"active\"\n * when the promise resolves.\n *\n * suggestionsPromiseIndex increments every time the mentions query\n */\n _this.suggestionsPromiseIndex = 0;\n _this.getTextArea = function () {\n return _this.props.refObject.current;\n };\n _this.handleOnChange = function (event) {\n var onChange = _this.props.onChange;\n onChange(event.target.value);\n };\n _this.handleBlur = function () {\n var mention = _this.state.mention;\n if (mention) {\n _this.setState({ mention: { status: \"inactive\", suggestions: [] } });\n }\n };\n _this.startLoadingSuggestions = function (text) {\n var promiseIndex = ++_this.suggestionsPromiseIndex;\n var loadSuggestions = _this.props.loadSuggestions;\n _this.currentLoadSuggestionsPromise = _this.currentLoadSuggestionsPromise\n .then(function () { return loadSuggestions(text, _this.state.mention.triggeredBy); })\n .then(function (suggestions) {\n if (_this.state.mention.status === \"inactive\") {\n // This means this promise resolved too late when the status has already been set to inactice\n return;\n }\n else if (_this.suggestionsPromiseIndex === promiseIndex) {\n if (!suggestions || !suggestions.length) {\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n }\n else {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"active\", suggestions: suggestions, focusIndex: 0 })\n });\n }\n _this.suggestionsPromiseIndex = 0;\n }\n return Promise.resolve();\n });\n };\n _this.loadEmptySuggestion = function (target, key) {\n var caret = TextAreaCaretPosition_1.getCaretCoordinates(target, key);\n _this.startLoadingSuggestions(\"\");\n _this.setState({\n mention: {\n status: \"loading\",\n startPosition: target.selectionStart + 1,\n caret: caret,\n suggestions: [],\n triggeredBy: key\n }\n });\n };\n _this.handleSuggestionSelected = function (index) {\n var mention = _this.state.mention;\n _this.getTextArea().selectionStart = mention.startPosition - 1;\n var textForInsert = _this.props.value.substr(_this.getTextArea().selectionStart, _this.getTextArea().selectionEnd - _this.getTextArea().selectionStart);\n InsertTextAtPosition_1.insertText(_this.getTextArea(), mention.suggestions[index].value + \" \");\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n };\n _this.handleKeyDown = function (event) {\n if (_this.props.onPossibleKeyCommand) {\n var handled = _this.props.onPossibleKeyCommand(event);\n if (handled) {\n event.preventDefault();\n // If the keydown resulted in a command being executed, we will just close the suggestions if they are open.\n // Resetting suggestionsPromiseIndex will cause any promise that is yet to be resolved to have no effect\n // when they finish loading.\n // TODO: The code below is duplicate, we need to clean this up\n _this.suggestionsPromiseIndex = 0;\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n return;\n }\n }\n if (!_this.suggestionsEnabled()) {\n return;\n }\n var key = event.key, shiftKey = event.shiftKey, currentTarget = event.currentTarget;\n var selectionStart = currentTarget.selectionStart;\n var mention = _this.state.mention;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \"Escape\" ||\n (key === \"Backspace\" &&\n selectionStart <= _this.state.mention.startPosition)) {\n // resetting suggestionsPromiseIndex will cause any promise that is yet to be resolved to have no effect\n // when they finish loading.\n _this.suggestionsPromiseIndex = 0;\n _this.setState({\n mention: {\n status: \"inactive\",\n suggestions: []\n }\n });\n }\n else if (mention.status === \"active\" &&\n (key === \"ArrowUp\" || key === \"ArrowDown\") &&\n !shiftKey) {\n event.preventDefault();\n var focusDelta = key === \"ArrowUp\" ? -1 : 1;\n _this.setState({\n mention: __assign(__assign({}, mention), { focusIndex: Math_1.mod(mention.focusIndex + focusDelta, mention.suggestions.length) })\n });\n }\n else if (key === \"Enter\" &&\n mention.status === \"active\" &&\n mention.suggestions.length) {\n event.preventDefault();\n _this.handleSuggestionSelected(mention.focusIndex);\n }\n break;\n default:\n // Ignore\n }\n };\n _this.handleKeyUp = function (event) {\n var key = event.key;\n var mention = _this.state.mention;\n var _a = _this.props, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, value = _a.value;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \"Backspace\") {\n var searchText = value.substr(mention.startPosition, _this.getTextArea().selectionStart - mention.startPosition);\n _this.startLoadingSuggestions(searchText);\n if (mention.status !== \"loading\") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"loading\" })\n });\n }\n }\n break;\n case \"inactive\":\n if (key === \"Backspace\") {\n var prevChar = value.charAt(_this.getTextArea().selectionStart - 1);\n var isAtMention = suggestionTriggerCharacters.includes(value.charAt(_this.getTextArea().selectionStart - 1));\n if (isAtMention) {\n _this.loadEmptySuggestion(event.currentTarget, prevChar);\n }\n }\n break;\n default:\n // Ignore\n }\n };\n _this.handleKeyPress = function (event) {\n var _a = _this.props, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, value = _a.value;\n var mention = _this.state.mention;\n var key = event.key;\n switch (mention.status) {\n case \"loading\":\n case \"active\":\n if (key === \" \") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"inactive\" })\n });\n return;\n }\n var searchText = value.substr(mention.startPosition, _this.getTextArea().selectionStart - mention.startPosition) + key;\n // In this case, the mentions box was open but the user typed something else\n _this.startLoadingSuggestions(searchText);\n if (mention.status !== \"loading\") {\n _this.setState({\n mention: __assign(__assign({}, _this.state.mention), { status: \"loading\" })\n });\n }\n break;\n case \"inactive\":\n if (suggestionTriggerCharacters.indexOf(event.key) === -1 ||\n !/\\s|\\(|\\[|^.{0}$/.test(value.charAt(_this.getTextArea().selectionStart - 1))) {\n return;\n }\n _this.loadEmptySuggestion(event.currentTarget, event.key);\n break;\n }\n };\n _this.state = { mention: { status: \"inactive\", suggestions: [] } };\n return _this;\n }\n TextArea.prototype.suggestionsEnabled = function () {\n return (this.props.suggestionTriggerCharacters &&\n this.props.suggestionTriggerCharacters.length &&\n this.props.loadSuggestions);\n };\n TextArea.prototype.render = function () {\n var _this = this;\n var _a = this.props, classes = _a.classes, readOnly = _a.readOnly, textAreaProps = _a.textAreaProps, height = _a.height, value = _a.value, suggestionTriggerCharacters = _a.suggestionTriggerCharacters, loadSuggestions = _a.loadSuggestions, suggestionsDropdownClasses = _a.suggestionsDropdownClasses, textAreaComponent = _a.textAreaComponent, onPaste = _a.onPaste;\n var suggestionsEnabled = suggestionTriggerCharacters &&\n suggestionTriggerCharacters.length &&\n loadSuggestions;\n var mention = this.state.mention;\n var TextAreaComponent = (textAreaComponent ||\n \"textarea\");\n return (React.createElement(\"div\", { className: \"mde-textarea-wrapper\" },\n React.createElement(TextAreaComponent, __assign({ className: ClassNames_1.classNames(\"mde-text\", classes), style: { height: height }, ref: this.props.refObject, readOnly: readOnly, value: value, \"data-testid\": \"text-area\" }, textAreaProps, { onChange: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onChange) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleOnChange(event);\n }, onBlur: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onBlur) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleBlur();\n }\n }, onKeyDown: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyDown(event);\n }, onKeyUp: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyUp) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyUp(event);\n }\n }, onKeyPress: function (event) {\n var _a, _b, _c;\n if (suggestionsEnabled) {\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onKeyPress) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n _this.handleKeyPress(event);\n }\n }, onPaste: function (event) {\n var _a, _b, _c;\n (_c = (_a = textAreaProps) === null || _a === void 0 ? void 0 : (_b = _a).onPaste) === null || _c === void 0 ? void 0 : _c.call(_b, event);\n onPaste(event);\n } })),\n mention.status === \"active\" && mention.suggestions.length && (React.createElement(SuggestionsDropdown_1.SuggestionsDropdown, { classes: suggestionsDropdownClasses, caret: mention.caret, suggestions: mention.suggestions, onSuggestionSelected: this.handleSuggestionSelected, focusIndex: mention.focusIndex, textAreaRef: this.props.refObject }))));\n };\n return TextArea;\n}(React.Component));\nexports.TextArea = TextArea;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nvar ToolbarButtonGroup_1 = require(\"./ToolbarButtonGroup\");\nvar ToolbarButton_1 = require(\"./ToolbarButton\");\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n function Toolbar() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleTabChange = function (tab) {\n var onTabChange = _this.props.onTabChange;\n onTabChange(tab);\n };\n return _this;\n }\n Toolbar.prototype.render = function () {\n var _this = this;\n var l18n = this.props.l18n;\n var _a = this.props, classes = _a.classes, children = _a.children, buttons = _a.buttons, onCommand = _a.onCommand, readOnly = _a.readOnly, disablePreview = _a.disablePreview, writeButtonProps = _a.writeButtonProps, previewButtonProps = _a.previewButtonProps, buttonProps = _a.buttonProps;\n if ((!buttons || buttons.length === 0) && !children) {\n return null;\n }\n var writePreviewTabs = (React.createElement(\"div\", { className: \"mde-tabs\" },\n React.createElement(\"button\", __assign({ type: \"button\", className: ClassNames_1.classNames({ selected: this.props.tab === \"write\" }), onClick: function () { return _this.handleTabChange(\"write\"); } }, writeButtonProps), l18n.write),\n React.createElement(\"button\", __assign({ type: \"button\", className: ClassNames_1.classNames({ selected: this.props.tab === \"preview\" }), onClick: function () { return _this.handleTabChange(\"preview\"); } }, previewButtonProps), l18n.preview)));\n return (React.createElement(\"div\", { className: ClassNames_1.classNames(\"mde-header\", classes) },\n !disablePreview && writePreviewTabs,\n buttons.map(function (commandGroup, i) { return (React.createElement(ToolbarButtonGroup_1.ToolbarButtonGroup, { key: i, hidden: _this.props.tab === \"preview\" }, commandGroup.map(function (c, j) {\n return (React.createElement(ToolbarButton_1.ToolbarButton, { key: j, name: c.commandName, buttonContent: c.buttonContent, buttonProps: __assign(__assign({}, (buttonProps || {})), c.buttonProps), onClick: function () { return onCommand(c.commandName); }, readOnly: readOnly, buttonComponentClass: c.buttonComponentClass }));\n }))); })));\n };\n return Toolbar;\n}(React.Component));\nexports.Toolbar = Toolbar;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar defaultButtonProps = {\n tabIndex: -1\n};\nexports.ToolbarButton = function (props) {\n var buttonComponentClass = props.buttonComponentClass, buttonContent = props.buttonContent, buttonProps = props.buttonProps, onClick = props.onClick, readOnly = props.readOnly, name = props.name;\n var finalButtonProps = __assign(__assign({}, defaultButtonProps), (buttonProps || {}));\n var finalButtonComponent = buttonComponentClass || \"button\";\n return (React.createElement(\"li\", { className: \"mde-header-item\" }, React.createElement(finalButtonComponent, __assign(__assign({ \"data-name\": name }, finalButtonProps), {\n onClick: onClick,\n disabled: readOnly,\n type: \"button\"\n }), buttonContent)));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar ClassNames_1 = require(\"../util/ClassNames\");\nexports.ToolbarButtonGroup = function (props) {\n return (React.createElement(\"ul\", { className: ClassNames_1.classNames(\"mde-header-group\", { hidden: props.hidden }) }, props.children));\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nfunction GripSvg() {\n return (React.createElement(\"svg\", { \"aria-hidden\": \"true\", \"data-prefix\": \"far\", \"data-icon\": \"ellipsis-h\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", className: \"icon\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z\", className: \"\" })));\n}\nexports.GripSvg = GripSvg;\n","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./ToolbarButtonGroup\"));\n__export(require(\"./ToolbarButton\"));\n__export(require(\"../icons/MdeFontAwesomeIcon\"));\n__export(require(\"./Preview\"));\n__export(require(\"./TextArea\"));\n__export(require(\"./Toolbar\"));\n__export(require(\"./ReactMde\"));\n__export(require(\"./SuggestionsDropdown\"));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nexports.MdeFontAwesomeIcon = function (_a) {\n var icon = _a.icon;\n var transformedIcon = icon;\n switch (icon) {\n case \"header\":\n transformedIcon = \"heading\";\n break;\n case \"quote\":\n transformedIcon = \"quote-right\";\n break;\n case \"unordered-list\":\n transformedIcon = \"tasks\";\n break;\n case \"ordered-list\":\n transformedIcon = \"list-ol\";\n break;\n case \"checked-list\":\n transformedIcon = \"tasks\";\n break;\n default:\n transformedIcon = icon;\n }\n return React.createElement(\"i\", { className: \"fas fa-\" + transformedIcon, \"aria-hidden\": \"true\" });\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar checkedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"tasks\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z\" })));\nvar orderedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"list-ol\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\" })));\nvar unorderedListIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"list-ul\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z\" })));\nvar imageIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"image\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z\" })));\nvar codeIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"code\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 640 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z\" })));\nvar quoteIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"quote-right\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M512 80v128c0 137.018-63.772 236.324-193.827 271.172-15.225 4.08-30.173-7.437-30.173-23.199v-33.895c0-10.057 6.228-19.133 15.687-22.55C369.684 375.688 408 330.054 408 256h-72c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h128c26.51 0 48 21.49 48 48zM176 32H48C21.49 32 0 53.49 0 80v128c0 26.51 21.49 48 48 48h72c0 74.054-38.316 119.688-104.313 143.528C6.228 402.945 0 412.021 0 422.078v33.895c0 15.762 14.948 27.279 30.173 23.199C160.228 444.324 224 345.018 224 208V80c0-26.51-21.49-48-48-48z\" })));\nvar linkIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"link\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z\" })));\nvar strikeThroughIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"strikethrough\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z\" })));\nvar italicIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"italic\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 320 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z\" })));\nvar headerIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"heading\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 512 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z\" })));\nvar boldIcon = (React.createElement(\"svg\", { className: \"svg-icon\", \"aria-hidden\": \"true\", \"data-prefix\": \"fas\", \"data-icon\": \"bold\", role: \"img\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 384 512\", \"data-fa-i2svg\": \"\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z\" })));\nexports.SvgIcon = function (_a) {\n var icon = _a.icon;\n switch (icon) {\n case \"header\":\n return headerIcon;\n case \"bold\":\n return boldIcon;\n case \"italic\":\n return italicIcon;\n case \"strikethrough\":\n return strikeThroughIcon;\n case \"link\":\n return linkIcon;\n case \"quote\":\n return quoteIcon;\n case \"code\":\n return codeIcon;\n case \"image\":\n return imageIcon;\n case \"unordered-list\":\n return unorderedListIcon;\n case \"ordered-list\":\n return orderedListIcon;\n case \"checked-list\":\n return checkedListIcon;\n default:\n return null;\n }\n};\n","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./MdeFontAwesomeIcon\"));\n__export(require(\"./SvgIcon\"));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MarkdownUtil = require(\"./util/MarkdownUtil\");\nexports.MarkdownUtil = MarkdownUtil;\nvar components_1 = require(\"./components\");\nexports.TextArea = components_1.TextArea;\nexports.SuggestionsDropdown = components_1.SuggestionsDropdown;\nexports.Preview = components_1.Preview;\nexports.Toolbar = components_1.Toolbar;\nexports.ToolbarButtonGroup = components_1.ToolbarButtonGroup;\nvar icons_1 = require(\"./icons\");\nexports.SvgIcon = icons_1.SvgIcon;\nexports.MdeFontAwesomeIcon = icons_1.MdeFontAwesomeIcon;\nvar defaults_1 = require(\"./commands/default-commands/defaults\");\nexports.getDefaultCommandMap = defaults_1.getDefaultCommandMap;\nexports.getDefaultToolbarCommands = defaults_1.getDefaultToolbarCommands;\nexports.default = components_1.ReactMde;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enL18n = {\n write: \"Write\",\n preview: \"Preview\",\n uploadingImage: \"Uploading image...\"\n};\n","\"use strict\";\n/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isString(classValue) {\n return typeof classValue === \"string\";\n}\nfunction isNonEmptyArray(classValue) {\n return Array.isArray(classValue) && classValue.length > 0;\n}\nfunction isClassDictionary(classValue) {\n return typeof classValue === \"object\";\n}\nfunction classNames() {\n var classValues = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n classValues[_i] = arguments[_i];\n }\n var classes = [];\n for (var i = 0; i < classValues.length; i++) {\n var classValue = classValues[i];\n if (!classValue)\n continue;\n if (isString(classValue)) {\n classes.push(classValue);\n }\n else if (isNonEmptyArray(classValue)) {\n var inner = classNames.apply(null, classValue);\n if (inner) {\n classes.push(inner);\n }\n }\n else if (isClassDictionary(classValue)) {\n for (var key in classValue) {\n if (classValue.hasOwnProperty(key) && classValue[key]) {\n classes.push(key);\n }\n }\n }\n }\n return classes.join(\" \");\n}\nexports.classNames = classNames;\n","\"use strict\";\n/*!\n * The MIT License\n Copyright (c) 2018 Dmitriy Kubyshkin\n Copied from https://github.com/grassator/insert-text-at-cursor\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Inserts the given text at the cursor. If the element contains a selection, the selection\n * will be replaced by the text.\n */\nfunction insertText(input, text) {\n // Most of the used APIs only work with the field selected\n input.focus();\n // IE 8-10\n if (document.selection) {\n var ieRange = document.selection.createRange();\n ieRange.text = text;\n // Move cursor after the inserted text\n ieRange.collapse(false /* to the end */);\n ieRange.select();\n return;\n }\n // Webkit + Edge\n var isSuccess = document.execCommand(\"insertText\", false, text);\n if (!isSuccess) {\n var start = input.selectionStart;\n var end = input.selectionEnd;\n // Firefox (non-standard method)\n if (typeof input.setRangeText === \"function\") {\n input.setRangeText(text);\n }\n else {\n if (canManipulateViaTextNodes(input)) {\n var textNode = document.createTextNode(text);\n var node = input.firstChild;\n // If textarea is empty, just insert the text\n if (!node) {\n input.appendChild(textNode);\n }\n else {\n // Otherwise we need to find a nodes for start and end\n var offset = 0;\n var startNode = null;\n var endNode = null;\n // To make a change we just need a Range, not a Selection\n var range = document.createRange();\n while (node && (startNode === null || endNode === null)) {\n var nodeLength = node.nodeValue.length;\n // if start of the selection falls into current node\n if (start >= offset && start <= offset + nodeLength) {\n range.setStart((startNode = node), start - offset);\n }\n // if end of the selection falls into current node\n if (end >= offset && end <= offset + nodeLength) {\n range.setEnd((endNode = node), end - offset);\n }\n offset += nodeLength;\n node = node.nextSibling;\n }\n // If there is some text selected, remove it as we should replace it\n if (start !== end) {\n range.deleteContents();\n }\n // Finally insert a new node. The browser will automatically\n // split start and end nodes into two if necessary\n range.insertNode(textNode);\n }\n }\n else {\n // For the text input the only way is to replace the whole value :(\n var value = input.value;\n input.value = value.slice(0, start) + text + value.slice(end);\n }\n }\n // Correct the cursor position to be at the end of the insertion\n input.setSelectionRange(start + text.length, start + text.length);\n // Notify any possible listeners of the change\n var e = document.createEvent(\"UIEvent\");\n e.initEvent(\"input\", true, false);\n input.dispatchEvent(e);\n }\n}\nexports.insertText = insertText;\nfunction canManipulateViaTextNodes(input) {\n if (input.nodeName !== \"TEXTAREA\") {\n return false;\n }\n var browserSupportsTextareaTextNodes;\n if (typeof browserSupportsTextareaTextNodes === \"undefined\") {\n var textarea = document.createElement(\"textarea\");\n textarea.value = \"1\";\n browserSupportsTextareaTextNodes = !!textarea.firstChild;\n }\n return browserSupportsTextareaTextNodes;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction getSurroundingWord(text, position) {\n if (!text)\n throw Error(\"Argument 'text' should be truthy\");\n var isWordDelimiter = function (c) { return c === \" \" || c.charCodeAt(0) === 10; };\n // leftIndex is initialized to 0 because if selection is 0, it won't even enter the iteration\n var start = 0;\n // rightIndex is initialized to text.length because if selection is equal to text.length it won't even enter the interation\n var end = text.length;\n // iterate to the left\n for (var i = position; i - 1 > -1; i--) {\n if (isWordDelimiter(text[i - 1])) {\n start = i;\n break;\n }\n }\n // iterate to the right\n for (var i = position; i < text.length; i++) {\n if (isWordDelimiter(text[i])) {\n end = i;\n break;\n }\n }\n return { start: start, end: end };\n}\nexports.getSurroundingWord = getSurroundingWord;\n/**\n * If the cursor is inside a word and (selection.start === selection.end)\n * returns a new Selection where the whole word is selected\n * @param text\n * @param selection\n */\nfunction selectWord(_a) {\n var text = _a.text, selection = _a.selection;\n if (text && text.length && selection.start === selection.end) {\n // the user is pointing to a word\n return getSurroundingWord(text, selection.start);\n }\n return selection;\n}\nexports.selectWord = selectWord;\n/**\n * Gets the number of line-breaks that would have to be inserted before the given 'startPosition'\n * to make sure there's an empty line between 'startPosition' and the previous text\n */\nfunction getBreaksNeededForEmptyLineBefore(text, startPosition) {\n if (text === void 0) { text = \"\"; }\n if (startPosition === 0)\n return 0;\n // rules:\n // - If we're in the first line, no breaks are needed\n // - Otherwise there must be 2 breaks before the previous character. Depending on how many breaks exist already, we\n // may need to insert 0, 1 or 2 breaks\n var neededBreaks = 2;\n var isInFirstLine = true;\n for (var i = startPosition - 1; i >= 0 && neededBreaks >= 0; i--) {\n switch (text.charCodeAt(i)) {\n case 32: // blank space\n continue;\n case 10: // line break\n neededBreaks--;\n isInFirstLine = false;\n break;\n default:\n return neededBreaks;\n }\n }\n return isInFirstLine ? 0 : neededBreaks;\n}\nexports.getBreaksNeededForEmptyLineBefore = getBreaksNeededForEmptyLineBefore;\n/**\n * Gets the number of line-breaks that would have to be inserted after the given 'startPosition'\n * to make sure there's an empty line between 'startPosition' and the next text\n */\nfunction getBreaksNeededForEmptyLineAfter(text, startPosition) {\n if (text === void 0) { text = \"\"; }\n if (startPosition === text.length - 1)\n return 0;\n // rules:\n // - If we're in the first line, no breaks are needed\n // - Otherwise there must be 2 breaks before the previous character. Depending on how many breaks exist already, we\n // may need to insert 0, 1 or 2 breaks\n var neededBreaks = 2;\n var isInLastLine = true;\n for (var i = startPosition; i < text.length && neededBreaks >= 0; i++) {\n switch (text.charCodeAt(i)) {\n case 32:\n continue;\n case 10: {\n neededBreaks--;\n isInLastLine = false;\n break;\n }\n default:\n return neededBreaks;\n }\n }\n return isInLastLine ? 0 : neededBreaks;\n}\nexports.getBreaksNeededForEmptyLineAfter = getBreaksNeededForEmptyLineAfter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Calculates modulus, like %, except that it works with negative numbers\n */\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\nexports.mod = mod;\n","\"use strict\";\n/* jshint browser: true */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n \"direction\",\n \"boxSizing\",\n \"width\",\n \"height\",\n \"overflowX\",\n \"overflowY\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderStyle\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n \"fontStyle\",\n \"fontVariant\",\n \"fontWeight\",\n \"fontStretch\",\n \"fontSize\",\n \"fontSizeAdjust\",\n \"lineHeight\",\n \"fontFamily\",\n \"textAlign\",\n \"textTransform\",\n \"textIndent\",\n \"textDecoration\",\n \"letterSpacing\",\n \"wordSpacing\",\n \"tabSize\",\n \"MozTabSize\"\n];\nvar isBrowser = typeof window !== \"undefined\";\nvar isFirefox = isBrowser && window.mozInnerScreenX != null;\nfunction getCaretCoordinates(element, append) {\n if (!isBrowser) {\n throw new Error(\"getCaretCoordinates should only be called in a browser\");\n }\n // The mirror div will replicate the textarea's style\n var div = document.createElement(\"div\");\n div.id = \"input-textarea-caret-position-mirror-div\";\n document.body.appendChild(div);\n var style = div.style;\n var computed = window.getComputedStyle\n ? window.getComputedStyle(element)\n : element.currentStyle; // currentStyle for IE < 9\n // Default textarea styles\n style.whiteSpace = \"pre-wrap\";\n style.wordWrap = \"break-word\"; // only for textarea-s\n // Position off-screen\n style.position = \"absolute\"; // required to return coordinates properly\n style.visibility = \"hidden\"; // not 'display: none' because we want rendering\n // Transfer the element's properties to the div\n properties.forEach(function (prop) {\n style[prop] = computed[prop];\n });\n if (isFirefox) {\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n if (element.scrollHeight > parseInt(computed.height))\n style.overflowY = \"scroll\";\n }\n else {\n style.overflow = \"hidden\"; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n }\n div.textContent = element.value.substring(0, element.selectionStart);\n if (append) {\n div.textContent += append;\n }\n var span = document.createElement(\"span\");\n // Wrapping must be replicated *exactly*, including when a long word gets\n // onto the next line, with whitespace at the end of the line before (#7).\n // The *only* reliable way to do that is to copy the *entire* rest of the\n // textarea's content into the created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(element.selectionEnd) || \".\"; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n var coordinates = {\n top: span.offsetTop + parseInt(computed[\"borderTopWidth\"]),\n left: span.offsetLeft + parseInt(computed[\"borderLeftWidth\"]),\n lineHeight: parseInt(computed[\"lineHeight\"])\n };\n document.body.removeChild(div);\n return coordinates;\n}\nexports.getCaretCoordinates = getCaretCoordinates;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Reads a file and returns an ArrayBuffer\n * @param file\n */\nfunction readFileAsync(file) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onload = function () {\n if (typeof reader.result === \"string\") {\n throw new Error(\"reader.result is expected to be an ArrayBuffer\");\n }\n resolve(reader.result);\n };\n reader.onerror = reject;\n reader.readAsArrayBuffer(file);\n })];\n });\n });\n}\nexports.readFileAsync = readFileAsync;\n","var api = require(\"!../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../../../../../node_modules/css-loader/dist/cjs.js??ref--5-1!./react-mde-all.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\nvar exported = content.locals ? content.locals : {};\n\n\n\nmodule.exports = exported;",";/*! showdown v 1.9.1 - 02-11-2019 */\r\n(function(){\r\n/**\n * Created by Tivie on 13-07-2015.\n */\n\nfunction getDefaultOpts (simple) {\n 'use strict';\n\n var defaultOptions = {\n omitExtraWLInCodeBlocks: {\n defaultValue: false,\n describe: 'Omit the default extra whiteline added to code blocks',\n type: 'boolean'\n },\n noHeaderId: {\n defaultValue: false,\n describe: 'Turn on/off generated header id',\n type: 'boolean'\n },\n prefixHeaderId: {\n defaultValue: false,\n describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \\'section-\\' prefix',\n type: 'string'\n },\n rawPrefixHeaderId: {\n defaultValue: false,\n describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the \" char is used in the prefix)',\n type: 'boolean'\n },\n ghCompatibleHeaderId: {\n defaultValue: false,\n describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',\n type: 'boolean'\n },\n rawHeaderId: {\n defaultValue: false,\n describe: 'Remove only spaces, \\' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',\n type: 'boolean'\n },\n headerLevelStart: {\n defaultValue: false,\n describe: 'The header blocks level start',\n type: 'integer'\n },\n parseImgDimensions: {\n defaultValue: false,\n describe: 'Turn on/off image dimension parsing',\n type: 'boolean'\n },\n simplifiedAutoLink: {\n defaultValue: false,\n describe: 'Turn on/off GFM autolink style',\n type: 'boolean'\n },\n excludeTrailingPunctuationFromURLs: {\n defaultValue: false,\n describe: 'Excludes trailing punctuation from links generated with autoLinking',\n type: 'boolean'\n },\n literalMidWordUnderscores: {\n defaultValue: false,\n describe: 'Parse midword underscores as literal underscores',\n type: 'boolean'\n },\n literalMidWordAsterisks: {\n defaultValue: false,\n describe: 'Parse midword asterisks as literal asterisks',\n type: 'boolean'\n },\n strikethrough: {\n defaultValue: false,\n describe: 'Turn on/off strikethrough support',\n type: 'boolean'\n },\n tables: {\n defaultValue: false,\n describe: 'Turn on/off tables support',\n type: 'boolean'\n },\n tablesHeaderId: {\n defaultValue: false,\n describe: 'Add an id to table headers',\n type: 'boolean'\n },\n ghCodeBlocks: {\n defaultValue: true,\n describe: 'Turn on/off GFM fenced code blocks support',\n type: 'boolean'\n },\n tasklists: {\n defaultValue: false,\n describe: 'Turn on/off GFM tasklist support',\n type: 'boolean'\n },\n smoothLivePreview: {\n defaultValue: false,\n describe: 'Prevents weird effects in live previews due to incomplete input',\n type: 'boolean'\n },\n smartIndentationFix: {\n defaultValue: false,\n description: 'Tries to smartly fix indentation in es6 strings',\n type: 'boolean'\n },\n disableForced4SpacesIndentedSublists: {\n defaultValue: false,\n description: 'Disables the requirement of indenting nested sublists by 4 spaces',\n type: 'boolean'\n },\n simpleLineBreaks: {\n defaultValue: false,\n description: 'Parses simple line breaks as
    (GFM Style)',\n type: 'boolean'\n },\n requireSpaceBeforeHeadingText: {\n defaultValue: false,\n description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',\n type: 'boolean'\n },\n ghMentions: {\n defaultValue: false,\n description: 'Enables github @mentions',\n type: 'boolean'\n },\n ghMentionsLink: {\n defaultValue: 'https://github.com/{u}',\n description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',\n type: 'string'\n },\n encodeEmails: {\n defaultValue: true,\n description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',\n type: 'boolean'\n },\n openLinksInNewWindow: {\n defaultValue: false,\n description: 'Open all links in new windows',\n type: 'boolean'\n },\n backslashEscapesHTMLTags: {\n defaultValue: false,\n description: 'Support for HTML Tag escaping. ex: \\
    foo\\
    ',\n type: 'boolean'\n },\n emoji: {\n defaultValue: false,\n description: 'Enable emoji support. Ex: `this is a :smile: emoji`',\n type: 'boolean'\n },\n underline: {\n defaultValue: false,\n description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``',\n type: 'boolean'\n },\n completeHTMLDocument: {\n defaultValue: false,\n description: 'Outputs a complete html document, including ``, `` and `` tags',\n type: 'boolean'\n },\n metadata: {\n defaultValue: false,\n description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',\n type: 'boolean'\n },\n splitAdjacentBlockquotes: {\n defaultValue: false,\n description: 'Split adjacent blockquote blocks',\n type: 'boolean'\n }\n };\n if (simple === false) {\n return JSON.parse(JSON.stringify(defaultOptions));\n }\n var ret = {};\n for (var opt in defaultOptions) {\n if (defaultOptions.hasOwnProperty(opt)) {\n ret[opt] = defaultOptions[opt].defaultValue;\n }\n }\n return ret;\n}\n\nfunction allOptionsOn () {\n 'use strict';\n var options = getDefaultOpts(true),\n ret = {};\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n ret[opt] = true;\n }\n }\n return ret;\n}\n\r\n/**\n * Created by Tivie on 06-01-2015.\n */\n\n// Private properties\nvar showdown = {},\n parsers = {},\n extensions = {},\n globalOptions = getDefaultOpts(true),\n setFlavor = 'vanilla',\n flavor = {\n github: {\n omitExtraWLInCodeBlocks: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n disableForced4SpacesIndentedSublists: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghCompatibleHeaderId: true,\n ghMentions: true,\n backslashEscapesHTMLTags: true,\n emoji: true,\n splitAdjacentBlockquotes: true\n },\n original: {\n noHeaderId: true,\n ghCodeBlocks: false\n },\n ghost: {\n omitExtraWLInCodeBlocks: true,\n parseImgDimensions: true,\n simplifiedAutoLink: true,\n excludeTrailingPunctuationFromURLs: true,\n literalMidWordUnderscores: true,\n strikethrough: true,\n tables: true,\n tablesHeaderId: true,\n ghCodeBlocks: true,\n tasklists: true,\n smoothLivePreview: true,\n simpleLineBreaks: true,\n requireSpaceBeforeHeadingText: true,\n ghMentions: false,\n encodeEmails: true\n },\n vanilla: getDefaultOpts(true),\n allOn: allOptionsOn()\n };\n\n/**\n * helper namespace\n * @type {{}}\n */\nshowdown.helper = {};\n\n/**\n * TODO LEGACY SUPPORT CODE\n * @type {{}}\n */\nshowdown.extensions = {};\n\n/**\n * Set a global option\n * @static\n * @param {string} key\n * @param {*} value\n * @returns {showdown}\n */\nshowdown.setOption = function (key, value) {\n 'use strict';\n globalOptions[key] = value;\n return this;\n};\n\n/**\n * Get a global option\n * @static\n * @param {string} key\n * @returns {*}\n */\nshowdown.getOption = function (key) {\n 'use strict';\n return globalOptions[key];\n};\n\n/**\n * Get the global options\n * @static\n * @returns {{}}\n */\nshowdown.getOptions = function () {\n 'use strict';\n return globalOptions;\n};\n\n/**\n * Reset global options to the default values\n * @static\n */\nshowdown.resetOptions = function () {\n 'use strict';\n globalOptions = getDefaultOpts(true);\n};\n\n/**\n * Set the flavor showdown should use as default\n * @param {string} name\n */\nshowdown.setFlavor = function (name) {\n 'use strict';\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n showdown.resetOptions();\n var preset = flavor[name];\n setFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n globalOptions[option] = preset[option];\n }\n }\n};\n\n/**\n * Get the currently set flavor\n * @returns {string}\n */\nshowdown.getFlavor = function () {\n 'use strict';\n return setFlavor;\n};\n\n/**\n * Get the options of a specified flavor. Returns undefined if the flavor was not found\n * @param {string} name Name of the flavor\n * @returns {{}|undefined}\n */\nshowdown.getFlavorOptions = function (name) {\n 'use strict';\n if (flavor.hasOwnProperty(name)) {\n return flavor[name];\n }\n};\n\n/**\n * Get the default options\n * @static\n * @param {boolean} [simple=true]\n * @returns {{}}\n */\nshowdown.getDefaultOptions = function (simple) {\n 'use strict';\n return getDefaultOpts(simple);\n};\n\n/**\n * Get or set a subParser\n *\n * subParser(name) - Get a registered subParser\n * subParser(name, func) - Register a subParser\n * @static\n * @param {string} name\n * @param {function} [func]\n * @returns {*}\n */\nshowdown.subParser = function (name, func) {\n 'use strict';\n if (showdown.helper.isString(name)) {\n if (typeof func !== 'undefined') {\n parsers[name] = func;\n } else {\n if (parsers.hasOwnProperty(name)) {\n return parsers[name];\n } else {\n throw Error('SubParser named ' + name + ' not registered!');\n }\n }\n }\n};\n\n/**\n * Gets or registers an extension\n * @static\n * @param {string} name\n * @param {object|function=} ext\n * @returns {*}\n */\nshowdown.extension = function (name, ext) {\n 'use strict';\n\n if (!showdown.helper.isString(name)) {\n throw Error('Extension \\'name\\' must be a string');\n }\n\n name = showdown.helper.stdExtName(name);\n\n // Getter\n if (showdown.helper.isUndefined(ext)) {\n if (!extensions.hasOwnProperty(name)) {\n throw Error('Extension named ' + name + ' is not registered!');\n }\n return extensions[name];\n\n // Setter\n } else {\n // Expand extension if it's wrapped in a function\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n // Ensure extension is an array\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExtension = validate(ext, name);\n\n if (validExtension.valid) {\n extensions[name] = ext;\n } else {\n throw Error(validExtension.error);\n }\n }\n};\n\n/**\n * Gets all extensions registered\n * @returns {{}}\n */\nshowdown.getAllExtensions = function () {\n 'use strict';\n return extensions;\n};\n\n/**\n * Remove an extension\n * @param {string} name\n */\nshowdown.removeExtension = function (name) {\n 'use strict';\n delete extensions[name];\n};\n\n/**\n * Removes all extensions\n */\nshowdown.resetExtensions = function () {\n 'use strict';\n extensions = {};\n};\n\n/**\n * Validate extension\n * @param {array} extension\n * @param {string} name\n * @returns {{valid: boolean, error: string}}\n */\nfunction validate (extension, name) {\n 'use strict';\n\n var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',\n ret = {\n valid: true,\n error: ''\n };\n\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n\n for (var i = 0; i < extension.length; ++i) {\n var baseMsg = errMsg + ' sub-extension ' + i + ': ',\n ext = extension[i];\n if (typeof ext !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';\n return ret;\n }\n\n if (!showdown.helper.isString(ext.type)) {\n ret.valid = false;\n ret.error = baseMsg + 'property \"type\" must be a string, but ' + typeof ext.type + ' given';\n return ret;\n }\n\n var type = ext.type = ext.type.toLowerCase();\n\n // normalize extension type\n if (type === 'language') {\n type = ext.type = 'lang';\n }\n\n if (type === 'html') {\n type = ext.type = 'output';\n }\n\n if (type !== 'lang' && type !== 'output' && type !== 'listener') {\n ret.valid = false;\n ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: \"lang/language\", \"output/html\" or \"listener\"';\n return ret;\n }\n\n if (type === 'listener') {\n if (showdown.helper.isUndefined(ext.listeners)) {\n ret.valid = false;\n ret.error = baseMsg + '. Extensions of type \"listener\" must have a property called \"listeners\"';\n return ret;\n }\n } else {\n if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {\n ret.valid = false;\n ret.error = baseMsg + type + ' extensions must define either a \"regex\" property or a \"filter\" method';\n return ret;\n }\n }\n\n if (ext.listeners) {\n if (typeof ext.listeners !== 'object') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an object but ' + typeof ext.listeners + ' given';\n return ret;\n }\n for (var ln in ext.listeners) {\n if (ext.listeners.hasOwnProperty(ln)) {\n if (typeof ext.listeners[ln] !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"listeners\" property must be an hash of [event name]: [callback]. listeners.' + ln +\n ' must be a function but ' + typeof ext.listeners[ln] + ' given';\n return ret;\n }\n }\n }\n }\n\n if (ext.filter) {\n if (typeof ext.filter !== 'function') {\n ret.valid = false;\n ret.error = baseMsg + '\"filter\" must be a function, but ' + typeof ext.filter + ' given';\n return ret;\n }\n } else if (ext.regex) {\n if (showdown.helper.isString(ext.regex)) {\n ext.regex = new RegExp(ext.regex, 'g');\n }\n if (!(ext.regex instanceof RegExp)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given';\n return ret;\n }\n if (showdown.helper.isUndefined(ext.replace)) {\n ret.valid = false;\n ret.error = baseMsg + '\"regex\" extensions must implement a replace string or function';\n return ret;\n }\n }\n }\n return ret;\n}\n\n/**\n * Validate extension\n * @param {object} ext\n * @returns {boolean}\n */\nshowdown.validateExtension = function (ext) {\n 'use strict';\n\n var validateExtension = validate(ext, null);\n if (!validateExtension.valid) {\n console.warn(validateExtension.error);\n return false;\n }\n return true;\n};\n\r\n/**\n * showdownjs helper functions\n */\n\nif (!showdown.hasOwnProperty('helper')) {\n showdown.helper = {};\n}\n\n/**\n * Check if var is string\n * @static\n * @param {string} a\n * @returns {boolean}\n */\nshowdown.helper.isString = function (a) {\n 'use strict';\n return (typeof a === 'string' || a instanceof String);\n};\n\n/**\n * Check if var is a function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isFunction = function (a) {\n 'use strict';\n var getType = {};\n return a && getType.toString.call(a) === '[object Function]';\n};\n\n/**\n * isArray helper function\n * @static\n * @param {*} a\n * @returns {boolean}\n */\nshowdown.helper.isArray = function (a) {\n 'use strict';\n return Array.isArray(a);\n};\n\n/**\n * Check if value is undefined\n * @static\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n */\nshowdown.helper.isUndefined = function (value) {\n 'use strict';\n return typeof value === 'undefined';\n};\n\n/**\n * ForEach helper function\n * Iterates over Arrays and Objects (own properties only)\n * @static\n * @param {*} obj\n * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object\n */\nshowdown.helper.forEach = function (obj, callback) {\n 'use strict';\n // check if obj is defined\n if (showdown.helper.isUndefined(obj)) {\n throw new Error('obj param is required');\n }\n\n if (showdown.helper.isUndefined(callback)) {\n throw new Error('callback param is required');\n }\n\n if (!showdown.helper.isFunction(callback)) {\n throw new Error('callback param must be a function/closure');\n }\n\n if (typeof obj.forEach === 'function') {\n obj.forEach(callback);\n } else if (showdown.helper.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n callback(obj[i], i, obj);\n }\n } else if (typeof (obj) === 'object') {\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n callback(obj[prop], prop, obj);\n }\n }\n } else {\n throw new Error('obj does not seem to be an array or an iterable object');\n }\n};\n\n/**\n * Standardidize extension name\n * @static\n * @param {string} s extension name\n * @returns {string}\n */\nshowdown.helper.stdExtName = function (s) {\n 'use strict';\n return s.replace(/[_?*+\\/\\\\.^-]/g, '').replace(/\\s/g, '').toLowerCase();\n};\n\nfunction escapeCharactersCallback (wholeMatch, m1) {\n 'use strict';\n var charCodeToEscape = m1.charCodeAt(0);\n return '¨E' + charCodeToEscape + 'E';\n}\n\n/**\n * Callback used to escape characters when passing through String.replace\n * @static\n * @param {string} wholeMatch\n * @param {string} m1\n * @returns {string}\n */\nshowdown.helper.escapeCharactersCallback = escapeCharactersCallback;\n\n/**\n * Escape characters in a string\n * @static\n * @param {string} text\n * @param {string} charsToEscape\n * @param {boolean} afterBackslash\n * @returns {XML|string|void|*}\n */\nshowdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {\n 'use strict';\n // First we have to escape the escape characters so that\n // we can build a character class out of them\n var regexString = '([' + charsToEscape.replace(/([\\[\\]\\\\])/g, '\\\\$1') + '])';\n\n if (afterBackslash) {\n regexString = '\\\\\\\\' + regexString;\n }\n\n var regex = new RegExp(regexString, 'g');\n text = text.replace(regex, escapeCharactersCallback);\n\n return text;\n};\n\n/**\n * Unescape HTML entities\n * @param txt\n * @returns {string}\n */\nshowdown.helper.unescapeHTMLEntities = function (txt) {\n 'use strict';\n\n return txt\n .replace(/"/g, '\"')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/&/g, '&');\n};\n\nvar rgxFindMatchPos = function (str, left, right, flags) {\n 'use strict';\n var f = flags || '',\n g = f.indexOf('g') > -1,\n x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),\n l = new RegExp(left, f.replace(/g/g, '')),\n pos = [],\n t, s, m, start, end;\n\n do {\n t = 0;\n while ((m = x.exec(str))) {\n if (l.test(m[0])) {\n if (!(t++)) {\n s = x.lastIndex;\n start = s - m[0].length;\n }\n } else if (t) {\n if (!--t) {\n end = m.index + m[0].length;\n var obj = {\n left: {start: start, end: s},\n match: {start: s, end: m.index},\n right: {start: m.index, end: end},\n wholeMatch: {start: start, end: end}\n };\n pos.push(obj);\n if (!g) {\n return pos;\n }\n }\n }\n }\n } while (t && (x.lastIndex = s));\n\n return pos;\n};\n\n/**\n * matchRecursiveRegExp\n *\n * (c) 2007 Steven Levithan \n * MIT License\n *\n * Accepts a string to search, a left and right format delimiter\n * as regex patterns, and optional regex flags. Returns an array\n * of matches, allowing nested instances of left/right delimiters.\n * Use the \"g\" flag to return all matches, otherwise only the\n * first is returned. Be careful to ensure that the left and\n * right format delimiters produce mutually exclusive matches.\n * Backreferences are not supported within the right delimiter\n * due to how it is internally combined with the left delimiter.\n * When matching strings whose format delimiters are unbalanced\n * to the left or right, the output is intentionally as a\n * conventional regex library with recursion support would\n * produce, e.g. \"<\" and \">\" both produce [\"x\"] when using\n * \"<\" and \">\" as the delimiters (both strings contain a single,\n * balanced instance of \"\").\n *\n * examples:\n * matchRecursiveRegExp(\"test\", \"\\\\(\", \"\\\\)\")\n * returns: []\n * matchRecursiveRegExp(\">>t<>\", \"<\", \">\", \"g\")\n * returns: [\"t<>\", \"\"]\n * matchRecursiveRegExp(\"
    test
    \", \"]*>\", \"\", \"gi\")\n * returns: [\"test\"]\n */\nshowdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {\n 'use strict';\n\n var matchPos = rgxFindMatchPos (str, left, right, flags),\n results = [];\n\n for (var i = 0; i < matchPos.length; ++i) {\n results.push([\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n ]);\n }\n return results;\n};\n\n/**\n *\n * @param {string} str\n * @param {string|function} replacement\n * @param {string} left\n * @param {string} right\n * @param {string} flags\n * @returns {string}\n */\nshowdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {\n 'use strict';\n\n if (!showdown.helper.isFunction(replacement)) {\n var repStr = replacement;\n replacement = function () {\n return repStr;\n };\n }\n\n var matchPos = rgxFindMatchPos(str, left, right, flags),\n finalStr = str,\n lng = matchPos.length;\n\n if (lng > 0) {\n var bits = [];\n if (matchPos[0].wholeMatch.start !== 0) {\n bits.push(str.slice(0, matchPos[0].wholeMatch.start));\n }\n for (var i = 0; i < lng; ++i) {\n bits.push(\n replacement(\n str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end),\n str.slice(matchPos[i].match.start, matchPos[i].match.end),\n str.slice(matchPos[i].left.start, matchPos[i].left.end),\n str.slice(matchPos[i].right.start, matchPos[i].right.end)\n )\n );\n if (i < lng - 1) {\n bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));\n }\n }\n if (matchPos[lng - 1].wholeMatch.end < str.length) {\n bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));\n }\n finalStr = bits.join('');\n }\n return finalStr;\n};\n\n/**\n * Returns the index within the passed String object of the first occurrence of the specified regex,\n * starting the search at fromIndex. Returns -1 if the value is not found.\n *\n * @param {string} str string to search\n * @param {RegExp} regex Regular expression to search\n * @param {int} [fromIndex = 0] Index to start the search\n * @returns {Number}\n * @throws InvalidArgumentError\n */\nshowdown.helper.regexIndexOf = function (str, regex, fromIndex) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n if (regex instanceof RegExp === false) {\n throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';\n }\n var indexOf = str.substring(fromIndex || 0).search(regex);\n return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf;\n};\n\n/**\n * Splits the passed string object at the defined index, and returns an array composed of the two substrings\n * @param {string} str string to split\n * @param {int} index index to split string at\n * @returns {[string,string]}\n * @throws InvalidArgumentError\n */\nshowdown.helper.splitAtIndex = function (str, index) {\n 'use strict';\n if (!showdown.helper.isString(str)) {\n throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';\n }\n return [str.substring(0, index), str.substring(index)];\n};\n\n/**\n * Obfuscate an e-mail address through the use of Character Entities,\n * transforming ASCII characters into their equivalent decimal or hex entities.\n *\n * Since it has a random component, subsequent calls to this function produce different results\n *\n * @param {string} mail\n * @returns {string}\n */\nshowdown.helper.encodeEmailAddress = function (mail) {\n 'use strict';\n var encode = [\n function (ch) {\n return '&#' + ch.charCodeAt(0) + ';';\n },\n function (ch) {\n return '&#x' + ch.charCodeAt(0).toString(16) + ';';\n },\n function (ch) {\n return ch;\n }\n ];\n\n mail = mail.replace(/./g, function (ch) {\n if (ch === '@') {\n // this *must* be encoded. I insist.\n ch = encode[Math.floor(Math.random() * 2)](ch);\n } else {\n var r = Math.random();\n // roughly 10% raw, 45% hex, 45% dec\n ch = (\n r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch)\n );\n }\n return ch;\n });\n\n return mail;\n};\n\n/**\n *\n * @param str\n * @param targetLength\n * @param padString\n * @returns {string}\n */\nshowdown.helper.padEnd = function padEnd (str, targetLength, padString) {\n 'use strict';\n /*jshint bitwise: false*/\n // eslint-disable-next-line space-infix-ops\n targetLength = targetLength>>0; //floor if number or convert non-number to 0;\n /*jshint bitwise: true*/\n padString = String(padString || ' ');\n if (str.length > targetLength) {\n return String(str);\n } else {\n targetLength = targetLength - str.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed\n }\n return String(str) + padString.slice(0,targetLength);\n }\n};\n\n/**\n * POLYFILLS\n */\n// use this instead of builtin is undefined for IE8 compatibility\nif (typeof console === 'undefined') {\n console = {\n warn: function (msg) {\n 'use strict';\n alert(msg);\n },\n log: function (msg) {\n 'use strict';\n alert(msg);\n },\n error: function (msg) {\n 'use strict';\n throw msg;\n }\n };\n}\n\n/**\n * Common regexes.\n * We declare some common regexes to improve performance\n */\nshowdown.helper.regexes = {\n asteriskDashAndColon: /([*_:~])/g\n};\n\n/**\n * EMOJIS LIST\n */\nshowdown.helper.emojis = {\n '+1':'\\ud83d\\udc4d',\n '-1':'\\ud83d\\udc4e',\n '100':'\\ud83d\\udcaf',\n '1234':'\\ud83d\\udd22',\n '1st_place_medal':'\\ud83e\\udd47',\n '2nd_place_medal':'\\ud83e\\udd48',\n '3rd_place_medal':'\\ud83e\\udd49',\n '8ball':'\\ud83c\\udfb1',\n 'a':'\\ud83c\\udd70\\ufe0f',\n 'ab':'\\ud83c\\udd8e',\n 'abc':'\\ud83d\\udd24',\n 'abcd':'\\ud83d\\udd21',\n 'accept':'\\ud83c\\ude51',\n 'aerial_tramway':'\\ud83d\\udea1',\n 'airplane':'\\u2708\\ufe0f',\n 'alarm_clock':'\\u23f0',\n 'alembic':'\\u2697\\ufe0f',\n 'alien':'\\ud83d\\udc7d',\n 'ambulance':'\\ud83d\\ude91',\n 'amphora':'\\ud83c\\udffa',\n 'anchor':'\\u2693\\ufe0f',\n 'angel':'\\ud83d\\udc7c',\n 'anger':'\\ud83d\\udca2',\n 'angry':'\\ud83d\\ude20',\n 'anguished':'\\ud83d\\ude27',\n 'ant':'\\ud83d\\udc1c',\n 'apple':'\\ud83c\\udf4e',\n 'aquarius':'\\u2652\\ufe0f',\n 'aries':'\\u2648\\ufe0f',\n 'arrow_backward':'\\u25c0\\ufe0f',\n 'arrow_double_down':'\\u23ec',\n 'arrow_double_up':'\\u23eb',\n 'arrow_down':'\\u2b07\\ufe0f',\n 'arrow_down_small':'\\ud83d\\udd3d',\n 'arrow_forward':'\\u25b6\\ufe0f',\n 'arrow_heading_down':'\\u2935\\ufe0f',\n 'arrow_heading_up':'\\u2934\\ufe0f',\n 'arrow_left':'\\u2b05\\ufe0f',\n 'arrow_lower_left':'\\u2199\\ufe0f',\n 'arrow_lower_right':'\\u2198\\ufe0f',\n 'arrow_right':'\\u27a1\\ufe0f',\n 'arrow_right_hook':'\\u21aa\\ufe0f',\n 'arrow_up':'\\u2b06\\ufe0f',\n 'arrow_up_down':'\\u2195\\ufe0f',\n 'arrow_up_small':'\\ud83d\\udd3c',\n 'arrow_upper_left':'\\u2196\\ufe0f',\n 'arrow_upper_right':'\\u2197\\ufe0f',\n 'arrows_clockwise':'\\ud83d\\udd03',\n 'arrows_counterclockwise':'\\ud83d\\udd04',\n 'art':'\\ud83c\\udfa8',\n 'articulated_lorry':'\\ud83d\\ude9b',\n 'artificial_satellite':'\\ud83d\\udef0',\n 'astonished':'\\ud83d\\ude32',\n 'athletic_shoe':'\\ud83d\\udc5f',\n 'atm':'\\ud83c\\udfe7',\n 'atom_symbol':'\\u269b\\ufe0f',\n 'avocado':'\\ud83e\\udd51',\n 'b':'\\ud83c\\udd71\\ufe0f',\n 'baby':'\\ud83d\\udc76',\n 'baby_bottle':'\\ud83c\\udf7c',\n 'baby_chick':'\\ud83d\\udc24',\n 'baby_symbol':'\\ud83d\\udebc',\n 'back':'\\ud83d\\udd19',\n 'bacon':'\\ud83e\\udd53',\n 'badminton':'\\ud83c\\udff8',\n 'baggage_claim':'\\ud83d\\udec4',\n 'baguette_bread':'\\ud83e\\udd56',\n 'balance_scale':'\\u2696\\ufe0f',\n 'balloon':'\\ud83c\\udf88',\n 'ballot_box':'\\ud83d\\uddf3',\n 'ballot_box_with_check':'\\u2611\\ufe0f',\n 'bamboo':'\\ud83c\\udf8d',\n 'banana':'\\ud83c\\udf4c',\n 'bangbang':'\\u203c\\ufe0f',\n 'bank':'\\ud83c\\udfe6',\n 'bar_chart':'\\ud83d\\udcca',\n 'barber':'\\ud83d\\udc88',\n 'baseball':'\\u26be\\ufe0f',\n 'basketball':'\\ud83c\\udfc0',\n 'basketball_man':'\\u26f9\\ufe0f',\n 'basketball_woman':'\\u26f9\\ufe0f‍\\u2640\\ufe0f',\n 'bat':'\\ud83e\\udd87',\n 'bath':'\\ud83d\\udec0',\n 'bathtub':'\\ud83d\\udec1',\n 'battery':'\\ud83d\\udd0b',\n 'beach_umbrella':'\\ud83c\\udfd6',\n 'bear':'\\ud83d\\udc3b',\n 'bed':'\\ud83d\\udecf',\n 'bee':'\\ud83d\\udc1d',\n 'beer':'\\ud83c\\udf7a',\n 'beers':'\\ud83c\\udf7b',\n 'beetle':'\\ud83d\\udc1e',\n 'beginner':'\\ud83d\\udd30',\n 'bell':'\\ud83d\\udd14',\n 'bellhop_bell':'\\ud83d\\udece',\n 'bento':'\\ud83c\\udf71',\n 'biking_man':'\\ud83d\\udeb4',\n 'bike':'\\ud83d\\udeb2',\n 'biking_woman':'\\ud83d\\udeb4‍\\u2640\\ufe0f',\n 'bikini':'\\ud83d\\udc59',\n 'biohazard':'\\u2623\\ufe0f',\n 'bird':'\\ud83d\\udc26',\n 'birthday':'\\ud83c\\udf82',\n 'black_circle':'\\u26ab\\ufe0f',\n 'black_flag':'\\ud83c\\udff4',\n 'black_heart':'\\ud83d\\udda4',\n 'black_joker':'\\ud83c\\udccf',\n 'black_large_square':'\\u2b1b\\ufe0f',\n 'black_medium_small_square':'\\u25fe\\ufe0f',\n 'black_medium_square':'\\u25fc\\ufe0f',\n 'black_nib':'\\u2712\\ufe0f',\n 'black_small_square':'\\u25aa\\ufe0f',\n 'black_square_button':'\\ud83d\\udd32',\n 'blonde_man':'\\ud83d\\udc71',\n 'blonde_woman':'\\ud83d\\udc71‍\\u2640\\ufe0f',\n 'blossom':'\\ud83c\\udf3c',\n 'blowfish':'\\ud83d\\udc21',\n 'blue_book':'\\ud83d\\udcd8',\n 'blue_car':'\\ud83d\\ude99',\n 'blue_heart':'\\ud83d\\udc99',\n 'blush':'\\ud83d\\ude0a',\n 'boar':'\\ud83d\\udc17',\n 'boat':'\\u26f5\\ufe0f',\n 'bomb':'\\ud83d\\udca3',\n 'book':'\\ud83d\\udcd6',\n 'bookmark':'\\ud83d\\udd16',\n 'bookmark_tabs':'\\ud83d\\udcd1',\n 'books':'\\ud83d\\udcda',\n 'boom':'\\ud83d\\udca5',\n 'boot':'\\ud83d\\udc62',\n 'bouquet':'\\ud83d\\udc90',\n 'bowing_man':'\\ud83d\\ude47',\n 'bow_and_arrow':'\\ud83c\\udff9',\n 'bowing_woman':'\\ud83d\\ude47‍\\u2640\\ufe0f',\n 'bowling':'\\ud83c\\udfb3',\n 'boxing_glove':'\\ud83e\\udd4a',\n 'boy':'\\ud83d\\udc66',\n 'bread':'\\ud83c\\udf5e',\n 'bride_with_veil':'\\ud83d\\udc70',\n 'bridge_at_night':'\\ud83c\\udf09',\n 'briefcase':'\\ud83d\\udcbc',\n 'broken_heart':'\\ud83d\\udc94',\n 'bug':'\\ud83d\\udc1b',\n 'building_construction':'\\ud83c\\udfd7',\n 'bulb':'\\ud83d\\udca1',\n 'bullettrain_front':'\\ud83d\\ude85',\n 'bullettrain_side':'\\ud83d\\ude84',\n 'burrito':'\\ud83c\\udf2f',\n 'bus':'\\ud83d\\ude8c',\n 'business_suit_levitating':'\\ud83d\\udd74',\n 'busstop':'\\ud83d\\ude8f',\n 'bust_in_silhouette':'\\ud83d\\udc64',\n 'busts_in_silhouette':'\\ud83d\\udc65',\n 'butterfly':'\\ud83e\\udd8b',\n 'cactus':'\\ud83c\\udf35',\n 'cake':'\\ud83c\\udf70',\n 'calendar':'\\ud83d\\udcc6',\n 'call_me_hand':'\\ud83e\\udd19',\n 'calling':'\\ud83d\\udcf2',\n 'camel':'\\ud83d\\udc2b',\n 'camera':'\\ud83d\\udcf7',\n 'camera_flash':'\\ud83d\\udcf8',\n 'camping':'\\ud83c\\udfd5',\n 'cancer':'\\u264b\\ufe0f',\n 'candle':'\\ud83d\\udd6f',\n 'candy':'\\ud83c\\udf6c',\n 'canoe':'\\ud83d\\udef6',\n 'capital_abcd':'\\ud83d\\udd20',\n 'capricorn':'\\u2651\\ufe0f',\n 'car':'\\ud83d\\ude97',\n 'card_file_box':'\\ud83d\\uddc3',\n 'card_index':'\\ud83d\\udcc7',\n 'card_index_dividers':'\\ud83d\\uddc2',\n 'carousel_horse':'\\ud83c\\udfa0',\n 'carrot':'\\ud83e\\udd55',\n 'cat':'\\ud83d\\udc31',\n 'cat2':'\\ud83d\\udc08',\n 'cd':'\\ud83d\\udcbf',\n 'chains':'\\u26d3',\n 'champagne':'\\ud83c\\udf7e',\n 'chart':'\\ud83d\\udcb9',\n 'chart_with_downwards_trend':'\\ud83d\\udcc9',\n 'chart_with_upwards_trend':'\\ud83d\\udcc8',\n 'checkered_flag':'\\ud83c\\udfc1',\n 'cheese':'\\ud83e\\uddc0',\n 'cherries':'\\ud83c\\udf52',\n 'cherry_blossom':'\\ud83c\\udf38',\n 'chestnut':'\\ud83c\\udf30',\n 'chicken':'\\ud83d\\udc14',\n 'children_crossing':'\\ud83d\\udeb8',\n 'chipmunk':'\\ud83d\\udc3f',\n 'chocolate_bar':'\\ud83c\\udf6b',\n 'christmas_tree':'\\ud83c\\udf84',\n 'church':'\\u26ea\\ufe0f',\n 'cinema':'\\ud83c\\udfa6',\n 'circus_tent':'\\ud83c\\udfaa',\n 'city_sunrise':'\\ud83c\\udf07',\n 'city_sunset':'\\ud83c\\udf06',\n 'cityscape':'\\ud83c\\udfd9',\n 'cl':'\\ud83c\\udd91',\n 'clamp':'\\ud83d\\udddc',\n 'clap':'\\ud83d\\udc4f',\n 'clapper':'\\ud83c\\udfac',\n 'classical_building':'\\ud83c\\udfdb',\n 'clinking_glasses':'\\ud83e\\udd42',\n 'clipboard':'\\ud83d\\udccb',\n 'clock1':'\\ud83d\\udd50',\n 'clock10':'\\ud83d\\udd59',\n 'clock1030':'\\ud83d\\udd65',\n 'clock11':'\\ud83d\\udd5a',\n 'clock1130':'\\ud83d\\udd66',\n 'clock12':'\\ud83d\\udd5b',\n 'clock1230':'\\ud83d\\udd67',\n 'clock130':'\\ud83d\\udd5c',\n 'clock2':'\\ud83d\\udd51',\n 'clock230':'\\ud83d\\udd5d',\n 'clock3':'\\ud83d\\udd52',\n 'clock330':'\\ud83d\\udd5e',\n 'clock4':'\\ud83d\\udd53',\n 'clock430':'\\ud83d\\udd5f',\n 'clock5':'\\ud83d\\udd54',\n 'clock530':'\\ud83d\\udd60',\n 'clock6':'\\ud83d\\udd55',\n 'clock630':'\\ud83d\\udd61',\n 'clock7':'\\ud83d\\udd56',\n 'clock730':'\\ud83d\\udd62',\n 'clock8':'\\ud83d\\udd57',\n 'clock830':'\\ud83d\\udd63',\n 'clock9':'\\ud83d\\udd58',\n 'clock930':'\\ud83d\\udd64',\n 'closed_book':'\\ud83d\\udcd5',\n 'closed_lock_with_key':'\\ud83d\\udd10',\n 'closed_umbrella':'\\ud83c\\udf02',\n 'cloud':'\\u2601\\ufe0f',\n 'cloud_with_lightning':'\\ud83c\\udf29',\n 'cloud_with_lightning_and_rain':'\\u26c8',\n 'cloud_with_rain':'\\ud83c\\udf27',\n 'cloud_with_snow':'\\ud83c\\udf28',\n 'clown_face':'\\ud83e\\udd21',\n 'clubs':'\\u2663\\ufe0f',\n 'cocktail':'\\ud83c\\udf78',\n 'coffee':'\\u2615\\ufe0f',\n 'coffin':'\\u26b0\\ufe0f',\n 'cold_sweat':'\\ud83d\\ude30',\n 'comet':'\\u2604\\ufe0f',\n 'computer':'\\ud83d\\udcbb',\n 'computer_mouse':'\\ud83d\\uddb1',\n 'confetti_ball':'\\ud83c\\udf8a',\n 'confounded':'\\ud83d\\ude16',\n 'confused':'\\ud83d\\ude15',\n 'congratulations':'\\u3297\\ufe0f',\n 'construction':'\\ud83d\\udea7',\n 'construction_worker_man':'\\ud83d\\udc77',\n 'construction_worker_woman':'\\ud83d\\udc77‍\\u2640\\ufe0f',\n 'control_knobs':'\\ud83c\\udf9b',\n 'convenience_store':'\\ud83c\\udfea',\n 'cookie':'\\ud83c\\udf6a',\n 'cool':'\\ud83c\\udd92',\n 'policeman':'\\ud83d\\udc6e',\n 'copyright':'\\u00a9\\ufe0f',\n 'corn':'\\ud83c\\udf3d',\n 'couch_and_lamp':'\\ud83d\\udecb',\n 'couple':'\\ud83d\\udc6b',\n 'couple_with_heart_woman_man':'\\ud83d\\udc91',\n 'couple_with_heart_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc68',\n 'couple_with_heart_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc69',\n 'couplekiss_man_man':'\\ud83d\\udc68‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc68',\n 'couplekiss_man_woman':'\\ud83d\\udc8f',\n 'couplekiss_woman_woman':'\\ud83d\\udc69‍\\u2764\\ufe0f‍\\ud83d\\udc8b‍\\ud83d\\udc69',\n 'cow':'\\ud83d\\udc2e',\n 'cow2':'\\ud83d\\udc04',\n 'cowboy_hat_face':'\\ud83e\\udd20',\n 'crab':'\\ud83e\\udd80',\n 'crayon':'\\ud83d\\udd8d',\n 'credit_card':'\\ud83d\\udcb3',\n 'crescent_moon':'\\ud83c\\udf19',\n 'cricket':'\\ud83c\\udfcf',\n 'crocodile':'\\ud83d\\udc0a',\n 'croissant':'\\ud83e\\udd50',\n 'crossed_fingers':'\\ud83e\\udd1e',\n 'crossed_flags':'\\ud83c\\udf8c',\n 'crossed_swords':'\\u2694\\ufe0f',\n 'crown':'\\ud83d\\udc51',\n 'cry':'\\ud83d\\ude22',\n 'crying_cat_face':'\\ud83d\\ude3f',\n 'crystal_ball':'\\ud83d\\udd2e',\n 'cucumber':'\\ud83e\\udd52',\n 'cupid':'\\ud83d\\udc98',\n 'curly_loop':'\\u27b0',\n 'currency_exchange':'\\ud83d\\udcb1',\n 'curry':'\\ud83c\\udf5b',\n 'custard':'\\ud83c\\udf6e',\n 'customs':'\\ud83d\\udec3',\n 'cyclone':'\\ud83c\\udf00',\n 'dagger':'\\ud83d\\udde1',\n 'dancer':'\\ud83d\\udc83',\n 'dancing_women':'\\ud83d\\udc6f',\n 'dancing_men':'\\ud83d\\udc6f‍\\u2642\\ufe0f',\n 'dango':'\\ud83c\\udf61',\n 'dark_sunglasses':'\\ud83d\\udd76',\n 'dart':'\\ud83c\\udfaf',\n 'dash':'\\ud83d\\udca8',\n 'date':'\\ud83d\\udcc5',\n 'deciduous_tree':'\\ud83c\\udf33',\n 'deer':'\\ud83e\\udd8c',\n 'department_store':'\\ud83c\\udfec',\n 'derelict_house':'\\ud83c\\udfda',\n 'desert':'\\ud83c\\udfdc',\n 'desert_island':'\\ud83c\\udfdd',\n 'desktop_computer':'\\ud83d\\udda5',\n 'male_detective':'\\ud83d\\udd75\\ufe0f',\n 'diamond_shape_with_a_dot_inside':'\\ud83d\\udca0',\n 'diamonds':'\\u2666\\ufe0f',\n 'disappointed':'\\ud83d\\ude1e',\n 'disappointed_relieved':'\\ud83d\\ude25',\n 'dizzy':'\\ud83d\\udcab',\n 'dizzy_face':'\\ud83d\\ude35',\n 'do_not_litter':'\\ud83d\\udeaf',\n 'dog':'\\ud83d\\udc36',\n 'dog2':'\\ud83d\\udc15',\n 'dollar':'\\ud83d\\udcb5',\n 'dolls':'\\ud83c\\udf8e',\n 'dolphin':'\\ud83d\\udc2c',\n 'door':'\\ud83d\\udeaa',\n 'doughnut':'\\ud83c\\udf69',\n 'dove':'\\ud83d\\udd4a',\n 'dragon':'\\ud83d\\udc09',\n 'dragon_face':'\\ud83d\\udc32',\n 'dress':'\\ud83d\\udc57',\n 'dromedary_camel':'\\ud83d\\udc2a',\n 'drooling_face':'\\ud83e\\udd24',\n 'droplet':'\\ud83d\\udca7',\n 'drum':'\\ud83e\\udd41',\n 'duck':'\\ud83e\\udd86',\n 'dvd':'\\ud83d\\udcc0',\n 'e-mail':'\\ud83d\\udce7',\n 'eagle':'\\ud83e\\udd85',\n 'ear':'\\ud83d\\udc42',\n 'ear_of_rice':'\\ud83c\\udf3e',\n 'earth_africa':'\\ud83c\\udf0d',\n 'earth_americas':'\\ud83c\\udf0e',\n 'earth_asia':'\\ud83c\\udf0f',\n 'egg':'\\ud83e\\udd5a',\n 'eggplant':'\\ud83c\\udf46',\n 'eight_pointed_black_star':'\\u2734\\ufe0f',\n 'eight_spoked_asterisk':'\\u2733\\ufe0f',\n 'electric_plug':'\\ud83d\\udd0c',\n 'elephant':'\\ud83d\\udc18',\n 'email':'\\u2709\\ufe0f',\n 'end':'\\ud83d\\udd1a',\n 'envelope_with_arrow':'\\ud83d\\udce9',\n 'euro':'\\ud83d\\udcb6',\n 'european_castle':'\\ud83c\\udff0',\n 'european_post_office':'\\ud83c\\udfe4',\n 'evergreen_tree':'\\ud83c\\udf32',\n 'exclamation':'\\u2757\\ufe0f',\n 'expressionless':'\\ud83d\\ude11',\n 'eye':'\\ud83d\\udc41',\n 'eye_speech_bubble':'\\ud83d\\udc41‍\\ud83d\\udde8',\n 'eyeglasses':'\\ud83d\\udc53',\n 'eyes':'\\ud83d\\udc40',\n 'face_with_head_bandage':'\\ud83e\\udd15',\n 'face_with_thermometer':'\\ud83e\\udd12',\n 'fist_oncoming':'\\ud83d\\udc4a',\n 'factory':'\\ud83c\\udfed',\n 'fallen_leaf':'\\ud83c\\udf42',\n 'family_man_woman_boy':'\\ud83d\\udc6a',\n 'family_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_man_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66',\n 'family_man_man_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_man_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67',\n 'family_man_man_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_man_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc68‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_man_woman_boy_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_man_woman_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_man_woman_girl_boy':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_man_woman_girl_girl':'\\ud83d\\udc68‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'family_woman_woman_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66',\n 'family_woman_woman_boy_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc66‍\\ud83d\\udc66',\n 'family_woman_woman_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67',\n 'family_woman_woman_girl_boy':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc66',\n 'family_woman_woman_girl_girl':'\\ud83d\\udc69‍\\ud83d\\udc69‍\\ud83d\\udc67‍\\ud83d\\udc67',\n 'fast_forward':'\\u23e9',\n 'fax':'\\ud83d\\udce0',\n 'fearful':'\\ud83d\\ude28',\n 'feet':'\\ud83d\\udc3e',\n 'female_detective':'\\ud83d\\udd75\\ufe0f‍\\u2640\\ufe0f',\n 'ferris_wheel':'\\ud83c\\udfa1',\n 'ferry':'\\u26f4',\n 'field_hockey':'\\ud83c\\udfd1',\n 'file_cabinet':'\\ud83d\\uddc4',\n 'file_folder':'\\ud83d\\udcc1',\n 'film_projector':'\\ud83d\\udcfd',\n 'film_strip':'\\ud83c\\udf9e',\n 'fire':'\\ud83d\\udd25',\n 'fire_engine':'\\ud83d\\ude92',\n 'fireworks':'\\ud83c\\udf86',\n 'first_quarter_moon':'\\ud83c\\udf13',\n 'first_quarter_moon_with_face':'\\ud83c\\udf1b',\n 'fish':'\\ud83d\\udc1f',\n 'fish_cake':'\\ud83c\\udf65',\n 'fishing_pole_and_fish':'\\ud83c\\udfa3',\n 'fist_raised':'\\u270a',\n 'fist_left':'\\ud83e\\udd1b',\n 'fist_right':'\\ud83e\\udd1c',\n 'flags':'\\ud83c\\udf8f',\n 'flashlight':'\\ud83d\\udd26',\n 'fleur_de_lis':'\\u269c\\ufe0f',\n 'flight_arrival':'\\ud83d\\udeec',\n 'flight_departure':'\\ud83d\\udeeb',\n 'floppy_disk':'\\ud83d\\udcbe',\n 'flower_playing_cards':'\\ud83c\\udfb4',\n 'flushed':'\\ud83d\\ude33',\n 'fog':'\\ud83c\\udf2b',\n 'foggy':'\\ud83c\\udf01',\n 'football':'\\ud83c\\udfc8',\n 'footprints':'\\ud83d\\udc63',\n 'fork_and_knife':'\\ud83c\\udf74',\n 'fountain':'\\u26f2\\ufe0f',\n 'fountain_pen':'\\ud83d\\udd8b',\n 'four_leaf_clover':'\\ud83c\\udf40',\n 'fox_face':'\\ud83e\\udd8a',\n 'framed_picture':'\\ud83d\\uddbc',\n 'free':'\\ud83c\\udd93',\n 'fried_egg':'\\ud83c\\udf73',\n 'fried_shrimp':'\\ud83c\\udf64',\n 'fries':'\\ud83c\\udf5f',\n 'frog':'\\ud83d\\udc38',\n 'frowning':'\\ud83d\\ude26',\n 'frowning_face':'\\u2639\\ufe0f',\n 'frowning_man':'\\ud83d\\ude4d‍\\u2642\\ufe0f',\n 'frowning_woman':'\\ud83d\\ude4d',\n 'middle_finger':'\\ud83d\\udd95',\n 'fuelpump':'\\u26fd\\ufe0f',\n 'full_moon':'\\ud83c\\udf15',\n 'full_moon_with_face':'\\ud83c\\udf1d',\n 'funeral_urn':'\\u26b1\\ufe0f',\n 'game_die':'\\ud83c\\udfb2',\n 'gear':'\\u2699\\ufe0f',\n 'gem':'\\ud83d\\udc8e',\n 'gemini':'\\u264a\\ufe0f',\n 'ghost':'\\ud83d\\udc7b',\n 'gift':'\\ud83c\\udf81',\n 'gift_heart':'\\ud83d\\udc9d',\n 'girl':'\\ud83d\\udc67',\n 'globe_with_meridians':'\\ud83c\\udf10',\n 'goal_net':'\\ud83e\\udd45',\n 'goat':'\\ud83d\\udc10',\n 'golf':'\\u26f3\\ufe0f',\n 'golfing_man':'\\ud83c\\udfcc\\ufe0f',\n 'golfing_woman':'\\ud83c\\udfcc\\ufe0f‍\\u2640\\ufe0f',\n 'gorilla':'\\ud83e\\udd8d',\n 'grapes':'\\ud83c\\udf47',\n 'green_apple':'\\ud83c\\udf4f',\n 'green_book':'\\ud83d\\udcd7',\n 'green_heart':'\\ud83d\\udc9a',\n 'green_salad':'\\ud83e\\udd57',\n 'grey_exclamation':'\\u2755',\n 'grey_question':'\\u2754',\n 'grimacing':'\\ud83d\\ude2c',\n 'grin':'\\ud83d\\ude01',\n 'grinning':'\\ud83d\\ude00',\n 'guardsman':'\\ud83d\\udc82',\n 'guardswoman':'\\ud83d\\udc82‍\\u2640\\ufe0f',\n 'guitar':'\\ud83c\\udfb8',\n 'gun':'\\ud83d\\udd2b',\n 'haircut_woman':'\\ud83d\\udc87',\n 'haircut_man':'\\ud83d\\udc87‍\\u2642\\ufe0f',\n 'hamburger':'\\ud83c\\udf54',\n 'hammer':'\\ud83d\\udd28',\n 'hammer_and_pick':'\\u2692',\n 'hammer_and_wrench':'\\ud83d\\udee0',\n 'hamster':'\\ud83d\\udc39',\n 'hand':'\\u270b',\n 'handbag':'\\ud83d\\udc5c',\n 'handshake':'\\ud83e\\udd1d',\n 'hankey':'\\ud83d\\udca9',\n 'hatched_chick':'\\ud83d\\udc25',\n 'hatching_chick':'\\ud83d\\udc23',\n 'headphones':'\\ud83c\\udfa7',\n 'hear_no_evil':'\\ud83d\\ude49',\n 'heart':'\\u2764\\ufe0f',\n 'heart_decoration':'\\ud83d\\udc9f',\n 'heart_eyes':'\\ud83d\\ude0d',\n 'heart_eyes_cat':'\\ud83d\\ude3b',\n 'heartbeat':'\\ud83d\\udc93',\n 'heartpulse':'\\ud83d\\udc97',\n 'hearts':'\\u2665\\ufe0f',\n 'heavy_check_mark':'\\u2714\\ufe0f',\n 'heavy_division_sign':'\\u2797',\n 'heavy_dollar_sign':'\\ud83d\\udcb2',\n 'heavy_heart_exclamation':'\\u2763\\ufe0f',\n 'heavy_minus_sign':'\\u2796',\n 'heavy_multiplication_x':'\\u2716\\ufe0f',\n 'heavy_plus_sign':'\\u2795',\n 'helicopter':'\\ud83d\\ude81',\n 'herb':'\\ud83c\\udf3f',\n 'hibiscus':'\\ud83c\\udf3a',\n 'high_brightness':'\\ud83d\\udd06',\n 'high_heel':'\\ud83d\\udc60',\n 'hocho':'\\ud83d\\udd2a',\n 'hole':'\\ud83d\\udd73',\n 'honey_pot':'\\ud83c\\udf6f',\n 'horse':'\\ud83d\\udc34',\n 'horse_racing':'\\ud83c\\udfc7',\n 'hospital':'\\ud83c\\udfe5',\n 'hot_pepper':'\\ud83c\\udf36',\n 'hotdog':'\\ud83c\\udf2d',\n 'hotel':'\\ud83c\\udfe8',\n 'hotsprings':'\\u2668\\ufe0f',\n 'hourglass':'\\u231b\\ufe0f',\n 'hourglass_flowing_sand':'\\u23f3',\n 'house':'\\ud83c\\udfe0',\n 'house_with_garden':'\\ud83c\\udfe1',\n 'houses':'\\ud83c\\udfd8',\n 'hugs':'\\ud83e\\udd17',\n 'hushed':'\\ud83d\\ude2f',\n 'ice_cream':'\\ud83c\\udf68',\n 'ice_hockey':'\\ud83c\\udfd2',\n 'ice_skate':'\\u26f8',\n 'icecream':'\\ud83c\\udf66',\n 'id':'\\ud83c\\udd94',\n 'ideograph_advantage':'\\ud83c\\ude50',\n 'imp':'\\ud83d\\udc7f',\n 'inbox_tray':'\\ud83d\\udce5',\n 'incoming_envelope':'\\ud83d\\udce8',\n 'tipping_hand_woman':'\\ud83d\\udc81',\n 'information_source':'\\u2139\\ufe0f',\n 'innocent':'\\ud83d\\ude07',\n 'interrobang':'\\u2049\\ufe0f',\n 'iphone':'\\ud83d\\udcf1',\n 'izakaya_lantern':'\\ud83c\\udfee',\n 'jack_o_lantern':'\\ud83c\\udf83',\n 'japan':'\\ud83d\\uddfe',\n 'japanese_castle':'\\ud83c\\udfef',\n 'japanese_goblin':'\\ud83d\\udc7a',\n 'japanese_ogre':'\\ud83d\\udc79',\n 'jeans':'\\ud83d\\udc56',\n 'joy':'\\ud83d\\ude02',\n 'joy_cat':'\\ud83d\\ude39',\n 'joystick':'\\ud83d\\udd79',\n 'kaaba':'\\ud83d\\udd4b',\n 'key':'\\ud83d\\udd11',\n 'keyboard':'\\u2328\\ufe0f',\n 'keycap_ten':'\\ud83d\\udd1f',\n 'kick_scooter':'\\ud83d\\udef4',\n 'kimono':'\\ud83d\\udc58',\n 'kiss':'\\ud83d\\udc8b',\n 'kissing':'\\ud83d\\ude17',\n 'kissing_cat':'\\ud83d\\ude3d',\n 'kissing_closed_eyes':'\\ud83d\\ude1a',\n 'kissing_heart':'\\ud83d\\ude18',\n 'kissing_smiling_eyes':'\\ud83d\\ude19',\n 'kiwi_fruit':'\\ud83e\\udd5d',\n 'koala':'\\ud83d\\udc28',\n 'koko':'\\ud83c\\ude01',\n 'label':'\\ud83c\\udff7',\n 'large_blue_circle':'\\ud83d\\udd35',\n 'large_blue_diamond':'\\ud83d\\udd37',\n 'large_orange_diamond':'\\ud83d\\udd36',\n 'last_quarter_moon':'\\ud83c\\udf17',\n 'last_quarter_moon_with_face':'\\ud83c\\udf1c',\n 'latin_cross':'\\u271d\\ufe0f',\n 'laughing':'\\ud83d\\ude06',\n 'leaves':'\\ud83c\\udf43',\n 'ledger':'\\ud83d\\udcd2',\n 'left_luggage':'\\ud83d\\udec5',\n 'left_right_arrow':'\\u2194\\ufe0f',\n 'leftwards_arrow_with_hook':'\\u21a9\\ufe0f',\n 'lemon':'\\ud83c\\udf4b',\n 'leo':'\\u264c\\ufe0f',\n 'leopard':'\\ud83d\\udc06',\n 'level_slider':'\\ud83c\\udf9a',\n 'libra':'\\u264e\\ufe0f',\n 'light_rail':'\\ud83d\\ude88',\n 'link':'\\ud83d\\udd17',\n 'lion':'\\ud83e\\udd81',\n 'lips':'\\ud83d\\udc44',\n 'lipstick':'\\ud83d\\udc84',\n 'lizard':'\\ud83e\\udd8e',\n 'lock':'\\ud83d\\udd12',\n 'lock_with_ink_pen':'\\ud83d\\udd0f',\n 'lollipop':'\\ud83c\\udf6d',\n 'loop':'\\u27bf',\n 'loud_sound':'\\ud83d\\udd0a',\n 'loudspeaker':'\\ud83d\\udce2',\n 'love_hotel':'\\ud83c\\udfe9',\n 'love_letter':'\\ud83d\\udc8c',\n 'low_brightness':'\\ud83d\\udd05',\n 'lying_face':'\\ud83e\\udd25',\n 'm':'\\u24c2\\ufe0f',\n 'mag':'\\ud83d\\udd0d',\n 'mag_right':'\\ud83d\\udd0e',\n 'mahjong':'\\ud83c\\udc04\\ufe0f',\n 'mailbox':'\\ud83d\\udceb',\n 'mailbox_closed':'\\ud83d\\udcea',\n 'mailbox_with_mail':'\\ud83d\\udcec',\n 'mailbox_with_no_mail':'\\ud83d\\udced',\n 'man':'\\ud83d\\udc68',\n 'man_artist':'\\ud83d\\udc68‍\\ud83c\\udfa8',\n 'man_astronaut':'\\ud83d\\udc68‍\\ud83d\\ude80',\n 'man_cartwheeling':'\\ud83e\\udd38‍\\u2642\\ufe0f',\n 'man_cook':'\\ud83d\\udc68‍\\ud83c\\udf73',\n 'man_dancing':'\\ud83d\\udd7a',\n 'man_facepalming':'\\ud83e\\udd26‍\\u2642\\ufe0f',\n 'man_factory_worker':'\\ud83d\\udc68‍\\ud83c\\udfed',\n 'man_farmer':'\\ud83d\\udc68‍\\ud83c\\udf3e',\n 'man_firefighter':'\\ud83d\\udc68‍\\ud83d\\ude92',\n 'man_health_worker':'\\ud83d\\udc68‍\\u2695\\ufe0f',\n 'man_in_tuxedo':'\\ud83e\\udd35',\n 'man_judge':'\\ud83d\\udc68‍\\u2696\\ufe0f',\n 'man_juggling':'\\ud83e\\udd39‍\\u2642\\ufe0f',\n 'man_mechanic':'\\ud83d\\udc68‍\\ud83d\\udd27',\n 'man_office_worker':'\\ud83d\\udc68‍\\ud83d\\udcbc',\n 'man_pilot':'\\ud83d\\udc68‍\\u2708\\ufe0f',\n 'man_playing_handball':'\\ud83e\\udd3e‍\\u2642\\ufe0f',\n 'man_playing_water_polo':'\\ud83e\\udd3d‍\\u2642\\ufe0f',\n 'man_scientist':'\\ud83d\\udc68‍\\ud83d\\udd2c',\n 'man_shrugging':'\\ud83e\\udd37‍\\u2642\\ufe0f',\n 'man_singer':'\\ud83d\\udc68‍\\ud83c\\udfa4',\n 'man_student':'\\ud83d\\udc68‍\\ud83c\\udf93',\n 'man_teacher':'\\ud83d\\udc68‍\\ud83c\\udfeb',\n 'man_technologist':'\\ud83d\\udc68‍\\ud83d\\udcbb',\n 'man_with_gua_pi_mao':'\\ud83d\\udc72',\n 'man_with_turban':'\\ud83d\\udc73',\n 'tangerine':'\\ud83c\\udf4a',\n 'mans_shoe':'\\ud83d\\udc5e',\n 'mantelpiece_clock':'\\ud83d\\udd70',\n 'maple_leaf':'\\ud83c\\udf41',\n 'martial_arts_uniform':'\\ud83e\\udd4b',\n 'mask':'\\ud83d\\ude37',\n 'massage_woman':'\\ud83d\\udc86',\n 'massage_man':'\\ud83d\\udc86‍\\u2642\\ufe0f',\n 'meat_on_bone':'\\ud83c\\udf56',\n 'medal_military':'\\ud83c\\udf96',\n 'medal_sports':'\\ud83c\\udfc5',\n 'mega':'\\ud83d\\udce3',\n 'melon':'\\ud83c\\udf48',\n 'memo':'\\ud83d\\udcdd',\n 'men_wrestling':'\\ud83e\\udd3c‍\\u2642\\ufe0f',\n 'menorah':'\\ud83d\\udd4e',\n 'mens':'\\ud83d\\udeb9',\n 'metal':'\\ud83e\\udd18',\n 'metro':'\\ud83d\\ude87',\n 'microphone':'\\ud83c\\udfa4',\n 'microscope':'\\ud83d\\udd2c',\n 'milk_glass':'\\ud83e\\udd5b',\n 'milky_way':'\\ud83c\\udf0c',\n 'minibus':'\\ud83d\\ude90',\n 'minidisc':'\\ud83d\\udcbd',\n 'mobile_phone_off':'\\ud83d\\udcf4',\n 'money_mouth_face':'\\ud83e\\udd11',\n 'money_with_wings':'\\ud83d\\udcb8',\n 'moneybag':'\\ud83d\\udcb0',\n 'monkey':'\\ud83d\\udc12',\n 'monkey_face':'\\ud83d\\udc35',\n 'monorail':'\\ud83d\\ude9d',\n 'moon':'\\ud83c\\udf14',\n 'mortar_board':'\\ud83c\\udf93',\n 'mosque':'\\ud83d\\udd4c',\n 'motor_boat':'\\ud83d\\udee5',\n 'motor_scooter':'\\ud83d\\udef5',\n 'motorcycle':'\\ud83c\\udfcd',\n 'motorway':'\\ud83d\\udee3',\n 'mount_fuji':'\\ud83d\\uddfb',\n 'mountain':'\\u26f0',\n 'mountain_biking_man':'\\ud83d\\udeb5',\n 'mountain_biking_woman':'\\ud83d\\udeb5‍\\u2640\\ufe0f',\n 'mountain_cableway':'\\ud83d\\udea0',\n 'mountain_railway':'\\ud83d\\ude9e',\n 'mountain_snow':'\\ud83c\\udfd4',\n 'mouse':'\\ud83d\\udc2d',\n 'mouse2':'\\ud83d\\udc01',\n 'movie_camera':'\\ud83c\\udfa5',\n 'moyai':'\\ud83d\\uddff',\n 'mrs_claus':'\\ud83e\\udd36',\n 'muscle':'\\ud83d\\udcaa',\n 'mushroom':'\\ud83c\\udf44',\n 'musical_keyboard':'\\ud83c\\udfb9',\n 'musical_note':'\\ud83c\\udfb5',\n 'musical_score':'\\ud83c\\udfbc',\n 'mute':'\\ud83d\\udd07',\n 'nail_care':'\\ud83d\\udc85',\n 'name_badge':'\\ud83d\\udcdb',\n 'national_park':'\\ud83c\\udfde',\n 'nauseated_face':'\\ud83e\\udd22',\n 'necktie':'\\ud83d\\udc54',\n 'negative_squared_cross_mark':'\\u274e',\n 'nerd_face':'\\ud83e\\udd13',\n 'neutral_face':'\\ud83d\\ude10',\n 'new':'\\ud83c\\udd95',\n 'new_moon':'\\ud83c\\udf11',\n 'new_moon_with_face':'\\ud83c\\udf1a',\n 'newspaper':'\\ud83d\\udcf0',\n 'newspaper_roll':'\\ud83d\\uddde',\n 'next_track_button':'\\u23ed',\n 'ng':'\\ud83c\\udd96',\n 'no_good_man':'\\ud83d\\ude45‍\\u2642\\ufe0f',\n 'no_good_woman':'\\ud83d\\ude45',\n 'night_with_stars':'\\ud83c\\udf03',\n 'no_bell':'\\ud83d\\udd15',\n 'no_bicycles':'\\ud83d\\udeb3',\n 'no_entry':'\\u26d4\\ufe0f',\n 'no_entry_sign':'\\ud83d\\udeab',\n 'no_mobile_phones':'\\ud83d\\udcf5',\n 'no_mouth':'\\ud83d\\ude36',\n 'no_pedestrians':'\\ud83d\\udeb7',\n 'no_smoking':'\\ud83d\\udead',\n 'non-potable_water':'\\ud83d\\udeb1',\n 'nose':'\\ud83d\\udc43',\n 'notebook':'\\ud83d\\udcd3',\n 'notebook_with_decorative_cover':'\\ud83d\\udcd4',\n 'notes':'\\ud83c\\udfb6',\n 'nut_and_bolt':'\\ud83d\\udd29',\n 'o':'\\u2b55\\ufe0f',\n 'o2':'\\ud83c\\udd7e\\ufe0f',\n 'ocean':'\\ud83c\\udf0a',\n 'octopus':'\\ud83d\\udc19',\n 'oden':'\\ud83c\\udf62',\n 'office':'\\ud83c\\udfe2',\n 'oil_drum':'\\ud83d\\udee2',\n 'ok':'\\ud83c\\udd97',\n 'ok_hand':'\\ud83d\\udc4c',\n 'ok_man':'\\ud83d\\ude46‍\\u2642\\ufe0f',\n 'ok_woman':'\\ud83d\\ude46',\n 'old_key':'\\ud83d\\udddd',\n 'older_man':'\\ud83d\\udc74',\n 'older_woman':'\\ud83d\\udc75',\n 'om':'\\ud83d\\udd49',\n 'on':'\\ud83d\\udd1b',\n 'oncoming_automobile':'\\ud83d\\ude98',\n 'oncoming_bus':'\\ud83d\\ude8d',\n 'oncoming_police_car':'\\ud83d\\ude94',\n 'oncoming_taxi':'\\ud83d\\ude96',\n 'open_file_folder':'\\ud83d\\udcc2',\n 'open_hands':'\\ud83d\\udc50',\n 'open_mouth':'\\ud83d\\ude2e',\n 'open_umbrella':'\\u2602\\ufe0f',\n 'ophiuchus':'\\u26ce',\n 'orange_book':'\\ud83d\\udcd9',\n 'orthodox_cross':'\\u2626\\ufe0f',\n 'outbox_tray':'\\ud83d\\udce4',\n 'owl':'\\ud83e\\udd89',\n 'ox':'\\ud83d\\udc02',\n 'package':'\\ud83d\\udce6',\n 'page_facing_up':'\\ud83d\\udcc4',\n 'page_with_curl':'\\ud83d\\udcc3',\n 'pager':'\\ud83d\\udcdf',\n 'paintbrush':'\\ud83d\\udd8c',\n 'palm_tree':'\\ud83c\\udf34',\n 'pancakes':'\\ud83e\\udd5e',\n 'panda_face':'\\ud83d\\udc3c',\n 'paperclip':'\\ud83d\\udcce',\n 'paperclips':'\\ud83d\\udd87',\n 'parasol_on_ground':'\\u26f1',\n 'parking':'\\ud83c\\udd7f\\ufe0f',\n 'part_alternation_mark':'\\u303d\\ufe0f',\n 'partly_sunny':'\\u26c5\\ufe0f',\n 'passenger_ship':'\\ud83d\\udef3',\n 'passport_control':'\\ud83d\\udec2',\n 'pause_button':'\\u23f8',\n 'peace_symbol':'\\u262e\\ufe0f',\n 'peach':'\\ud83c\\udf51',\n 'peanuts':'\\ud83e\\udd5c',\n 'pear':'\\ud83c\\udf50',\n 'pen':'\\ud83d\\udd8a',\n 'pencil2':'\\u270f\\ufe0f',\n 'penguin':'\\ud83d\\udc27',\n 'pensive':'\\ud83d\\ude14',\n 'performing_arts':'\\ud83c\\udfad',\n 'persevere':'\\ud83d\\ude23',\n 'person_fencing':'\\ud83e\\udd3a',\n 'pouting_woman':'\\ud83d\\ude4e',\n 'phone':'\\u260e\\ufe0f',\n 'pick':'\\u26cf',\n 'pig':'\\ud83d\\udc37',\n 'pig2':'\\ud83d\\udc16',\n 'pig_nose':'\\ud83d\\udc3d',\n 'pill':'\\ud83d\\udc8a',\n 'pineapple':'\\ud83c\\udf4d',\n 'ping_pong':'\\ud83c\\udfd3',\n 'pisces':'\\u2653\\ufe0f',\n 'pizza':'\\ud83c\\udf55',\n 'place_of_worship':'\\ud83d\\uded0',\n 'plate_with_cutlery':'\\ud83c\\udf7d',\n 'play_or_pause_button':'\\u23ef',\n 'point_down':'\\ud83d\\udc47',\n 'point_left':'\\ud83d\\udc48',\n 'point_right':'\\ud83d\\udc49',\n 'point_up':'\\u261d\\ufe0f',\n 'point_up_2':'\\ud83d\\udc46',\n 'police_car':'\\ud83d\\ude93',\n 'policewoman':'\\ud83d\\udc6e‍\\u2640\\ufe0f',\n 'poodle':'\\ud83d\\udc29',\n 'popcorn':'\\ud83c\\udf7f',\n 'post_office':'\\ud83c\\udfe3',\n 'postal_horn':'\\ud83d\\udcef',\n 'postbox':'\\ud83d\\udcee',\n 'potable_water':'\\ud83d\\udeb0',\n 'potato':'\\ud83e\\udd54',\n 'pouch':'\\ud83d\\udc5d',\n 'poultry_leg':'\\ud83c\\udf57',\n 'pound':'\\ud83d\\udcb7',\n 'rage':'\\ud83d\\ude21',\n 'pouting_cat':'\\ud83d\\ude3e',\n 'pouting_man':'\\ud83d\\ude4e‍\\u2642\\ufe0f',\n 'pray':'\\ud83d\\ude4f',\n 'prayer_beads':'\\ud83d\\udcff',\n 'pregnant_woman':'\\ud83e\\udd30',\n 'previous_track_button':'\\u23ee',\n 'prince':'\\ud83e\\udd34',\n 'princess':'\\ud83d\\udc78',\n 'printer':'\\ud83d\\udda8',\n 'purple_heart':'\\ud83d\\udc9c',\n 'purse':'\\ud83d\\udc5b',\n 'pushpin':'\\ud83d\\udccc',\n 'put_litter_in_its_place':'\\ud83d\\udeae',\n 'question':'\\u2753',\n 'rabbit':'\\ud83d\\udc30',\n 'rabbit2':'\\ud83d\\udc07',\n 'racehorse':'\\ud83d\\udc0e',\n 'racing_car':'\\ud83c\\udfce',\n 'radio':'\\ud83d\\udcfb',\n 'radio_button':'\\ud83d\\udd18',\n 'radioactive':'\\u2622\\ufe0f',\n 'railway_car':'\\ud83d\\ude83',\n 'railway_track':'\\ud83d\\udee4',\n 'rainbow':'\\ud83c\\udf08',\n 'rainbow_flag':'\\ud83c\\udff3\\ufe0f‍\\ud83c\\udf08',\n 'raised_back_of_hand':'\\ud83e\\udd1a',\n 'raised_hand_with_fingers_splayed':'\\ud83d\\udd90',\n 'raised_hands':'\\ud83d\\ude4c',\n 'raising_hand_woman':'\\ud83d\\ude4b',\n 'raising_hand_man':'\\ud83d\\ude4b‍\\u2642\\ufe0f',\n 'ram':'\\ud83d\\udc0f',\n 'ramen':'\\ud83c\\udf5c',\n 'rat':'\\ud83d\\udc00',\n 'record_button':'\\u23fa',\n 'recycle':'\\u267b\\ufe0f',\n 'red_circle':'\\ud83d\\udd34',\n 'registered':'\\u00ae\\ufe0f',\n 'relaxed':'\\u263a\\ufe0f',\n 'relieved':'\\ud83d\\ude0c',\n 'reminder_ribbon':'\\ud83c\\udf97',\n 'repeat':'\\ud83d\\udd01',\n 'repeat_one':'\\ud83d\\udd02',\n 'rescue_worker_helmet':'\\u26d1',\n 'restroom':'\\ud83d\\udebb',\n 'revolving_hearts':'\\ud83d\\udc9e',\n 'rewind':'\\u23ea',\n 'rhinoceros':'\\ud83e\\udd8f',\n 'ribbon':'\\ud83c\\udf80',\n 'rice':'\\ud83c\\udf5a',\n 'rice_ball':'\\ud83c\\udf59',\n 'rice_cracker':'\\ud83c\\udf58',\n 'rice_scene':'\\ud83c\\udf91',\n 'right_anger_bubble':'\\ud83d\\uddef',\n 'ring':'\\ud83d\\udc8d',\n 'robot':'\\ud83e\\udd16',\n 'rocket':'\\ud83d\\ude80',\n 'rofl':'\\ud83e\\udd23',\n 'roll_eyes':'\\ud83d\\ude44',\n 'roller_coaster':'\\ud83c\\udfa2',\n 'rooster':'\\ud83d\\udc13',\n 'rose':'\\ud83c\\udf39',\n 'rosette':'\\ud83c\\udff5',\n 'rotating_light':'\\ud83d\\udea8',\n 'round_pushpin':'\\ud83d\\udccd',\n 'rowing_man':'\\ud83d\\udea3',\n 'rowing_woman':'\\ud83d\\udea3‍\\u2640\\ufe0f',\n 'rugby_football':'\\ud83c\\udfc9',\n 'running_man':'\\ud83c\\udfc3',\n 'running_shirt_with_sash':'\\ud83c\\udfbd',\n 'running_woman':'\\ud83c\\udfc3‍\\u2640\\ufe0f',\n 'sa':'\\ud83c\\ude02\\ufe0f',\n 'sagittarius':'\\u2650\\ufe0f',\n 'sake':'\\ud83c\\udf76',\n 'sandal':'\\ud83d\\udc61',\n 'santa':'\\ud83c\\udf85',\n 'satellite':'\\ud83d\\udce1',\n 'saxophone':'\\ud83c\\udfb7',\n 'school':'\\ud83c\\udfeb',\n 'school_satchel':'\\ud83c\\udf92',\n 'scissors':'\\u2702\\ufe0f',\n 'scorpion':'\\ud83e\\udd82',\n 'scorpius':'\\u264f\\ufe0f',\n 'scream':'\\ud83d\\ude31',\n 'scream_cat':'\\ud83d\\ude40',\n 'scroll':'\\ud83d\\udcdc',\n 'seat':'\\ud83d\\udcba',\n 'secret':'\\u3299\\ufe0f',\n 'see_no_evil':'\\ud83d\\ude48',\n 'seedling':'\\ud83c\\udf31',\n 'selfie':'\\ud83e\\udd33',\n 'shallow_pan_of_food':'\\ud83e\\udd58',\n 'shamrock':'\\u2618\\ufe0f',\n 'shark':'\\ud83e\\udd88',\n 'shaved_ice':'\\ud83c\\udf67',\n 'sheep':'\\ud83d\\udc11',\n 'shell':'\\ud83d\\udc1a',\n 'shield':'\\ud83d\\udee1',\n 'shinto_shrine':'\\u26e9',\n 'ship':'\\ud83d\\udea2',\n 'shirt':'\\ud83d\\udc55',\n 'shopping':'\\ud83d\\udecd',\n 'shopping_cart':'\\ud83d\\uded2',\n 'shower':'\\ud83d\\udebf',\n 'shrimp':'\\ud83e\\udd90',\n 'signal_strength':'\\ud83d\\udcf6',\n 'six_pointed_star':'\\ud83d\\udd2f',\n 'ski':'\\ud83c\\udfbf',\n 'skier':'\\u26f7',\n 'skull':'\\ud83d\\udc80',\n 'skull_and_crossbones':'\\u2620\\ufe0f',\n 'sleeping':'\\ud83d\\ude34',\n 'sleeping_bed':'\\ud83d\\udecc',\n 'sleepy':'\\ud83d\\ude2a',\n 'slightly_frowning_face':'\\ud83d\\ude41',\n 'slightly_smiling_face':'\\ud83d\\ude42',\n 'slot_machine':'\\ud83c\\udfb0',\n 'small_airplane':'\\ud83d\\udee9',\n 'small_blue_diamond':'\\ud83d\\udd39',\n 'small_orange_diamond':'\\ud83d\\udd38',\n 'small_red_triangle':'\\ud83d\\udd3a',\n 'small_red_triangle_down':'\\ud83d\\udd3b',\n 'smile':'\\ud83d\\ude04',\n 'smile_cat':'\\ud83d\\ude38',\n 'smiley':'\\ud83d\\ude03',\n 'smiley_cat':'\\ud83d\\ude3a',\n 'smiling_imp':'\\ud83d\\ude08',\n 'smirk':'\\ud83d\\ude0f',\n 'smirk_cat':'\\ud83d\\ude3c',\n 'smoking':'\\ud83d\\udeac',\n 'snail':'\\ud83d\\udc0c',\n 'snake':'\\ud83d\\udc0d',\n 'sneezing_face':'\\ud83e\\udd27',\n 'snowboarder':'\\ud83c\\udfc2',\n 'snowflake':'\\u2744\\ufe0f',\n 'snowman':'\\u26c4\\ufe0f',\n 'snowman_with_snow':'\\u2603\\ufe0f',\n 'sob':'\\ud83d\\ude2d',\n 'soccer':'\\u26bd\\ufe0f',\n 'soon':'\\ud83d\\udd1c',\n 'sos':'\\ud83c\\udd98',\n 'sound':'\\ud83d\\udd09',\n 'space_invader':'\\ud83d\\udc7e',\n 'spades':'\\u2660\\ufe0f',\n 'spaghetti':'\\ud83c\\udf5d',\n 'sparkle':'\\u2747\\ufe0f',\n 'sparkler':'\\ud83c\\udf87',\n 'sparkles':'\\u2728',\n 'sparkling_heart':'\\ud83d\\udc96',\n 'speak_no_evil':'\\ud83d\\ude4a',\n 'speaker':'\\ud83d\\udd08',\n 'speaking_head':'\\ud83d\\udde3',\n 'speech_balloon':'\\ud83d\\udcac',\n 'speedboat':'\\ud83d\\udea4',\n 'spider':'\\ud83d\\udd77',\n 'spider_web':'\\ud83d\\udd78',\n 'spiral_calendar':'\\ud83d\\uddd3',\n 'spiral_notepad':'\\ud83d\\uddd2',\n 'spoon':'\\ud83e\\udd44',\n 'squid':'\\ud83e\\udd91',\n 'stadium':'\\ud83c\\udfdf',\n 'star':'\\u2b50\\ufe0f',\n 'star2':'\\ud83c\\udf1f',\n 'star_and_crescent':'\\u262a\\ufe0f',\n 'star_of_david':'\\u2721\\ufe0f',\n 'stars':'\\ud83c\\udf20',\n 'station':'\\ud83d\\ude89',\n 'statue_of_liberty':'\\ud83d\\uddfd',\n 'steam_locomotive':'\\ud83d\\ude82',\n 'stew':'\\ud83c\\udf72',\n 'stop_button':'\\u23f9',\n 'stop_sign':'\\ud83d\\uded1',\n 'stopwatch':'\\u23f1',\n 'straight_ruler':'\\ud83d\\udccf',\n 'strawberry':'\\ud83c\\udf53',\n 'stuck_out_tongue':'\\ud83d\\ude1b',\n 'stuck_out_tongue_closed_eyes':'\\ud83d\\ude1d',\n 'stuck_out_tongue_winking_eye':'\\ud83d\\ude1c',\n 'studio_microphone':'\\ud83c\\udf99',\n 'stuffed_flatbread':'\\ud83e\\udd59',\n 'sun_behind_large_cloud':'\\ud83c\\udf25',\n 'sun_behind_rain_cloud':'\\ud83c\\udf26',\n 'sun_behind_small_cloud':'\\ud83c\\udf24',\n 'sun_with_face':'\\ud83c\\udf1e',\n 'sunflower':'\\ud83c\\udf3b',\n 'sunglasses':'\\ud83d\\ude0e',\n 'sunny':'\\u2600\\ufe0f',\n 'sunrise':'\\ud83c\\udf05',\n 'sunrise_over_mountains':'\\ud83c\\udf04',\n 'surfing_man':'\\ud83c\\udfc4',\n 'surfing_woman':'\\ud83c\\udfc4‍\\u2640\\ufe0f',\n 'sushi':'\\ud83c\\udf63',\n 'suspension_railway':'\\ud83d\\ude9f',\n 'sweat':'\\ud83d\\ude13',\n 'sweat_drops':'\\ud83d\\udca6',\n 'sweat_smile':'\\ud83d\\ude05',\n 'sweet_potato':'\\ud83c\\udf60',\n 'swimming_man':'\\ud83c\\udfca',\n 'swimming_woman':'\\ud83c\\udfca‍\\u2640\\ufe0f',\n 'symbols':'\\ud83d\\udd23',\n 'synagogue':'\\ud83d\\udd4d',\n 'syringe':'\\ud83d\\udc89',\n 'taco':'\\ud83c\\udf2e',\n 'tada':'\\ud83c\\udf89',\n 'tanabata_tree':'\\ud83c\\udf8b',\n 'taurus':'\\u2649\\ufe0f',\n 'taxi':'\\ud83d\\ude95',\n 'tea':'\\ud83c\\udf75',\n 'telephone_receiver':'\\ud83d\\udcde',\n 'telescope':'\\ud83d\\udd2d',\n 'tennis':'\\ud83c\\udfbe',\n 'tent':'\\u26fa\\ufe0f',\n 'thermometer':'\\ud83c\\udf21',\n 'thinking':'\\ud83e\\udd14',\n 'thought_balloon':'\\ud83d\\udcad',\n 'ticket':'\\ud83c\\udfab',\n 'tickets':'\\ud83c\\udf9f',\n 'tiger':'\\ud83d\\udc2f',\n 'tiger2':'\\ud83d\\udc05',\n 'timer_clock':'\\u23f2',\n 'tipping_hand_man':'\\ud83d\\udc81‍\\u2642\\ufe0f',\n 'tired_face':'\\ud83d\\ude2b',\n 'tm':'\\u2122\\ufe0f',\n 'toilet':'\\ud83d\\udebd',\n 'tokyo_tower':'\\ud83d\\uddfc',\n 'tomato':'\\ud83c\\udf45',\n 'tongue':'\\ud83d\\udc45',\n 'top':'\\ud83d\\udd1d',\n 'tophat':'\\ud83c\\udfa9',\n 'tornado':'\\ud83c\\udf2a',\n 'trackball':'\\ud83d\\uddb2',\n 'tractor':'\\ud83d\\ude9c',\n 'traffic_light':'\\ud83d\\udea5',\n 'train':'\\ud83d\\ude8b',\n 'train2':'\\ud83d\\ude86',\n 'tram':'\\ud83d\\ude8a',\n 'triangular_flag_on_post':'\\ud83d\\udea9',\n 'triangular_ruler':'\\ud83d\\udcd0',\n 'trident':'\\ud83d\\udd31',\n 'triumph':'\\ud83d\\ude24',\n 'trolleybus':'\\ud83d\\ude8e',\n 'trophy':'\\ud83c\\udfc6',\n 'tropical_drink':'\\ud83c\\udf79',\n 'tropical_fish':'\\ud83d\\udc20',\n 'truck':'\\ud83d\\ude9a',\n 'trumpet':'\\ud83c\\udfba',\n 'tulip':'\\ud83c\\udf37',\n 'tumbler_glass':'\\ud83e\\udd43',\n 'turkey':'\\ud83e\\udd83',\n 'turtle':'\\ud83d\\udc22',\n 'tv':'\\ud83d\\udcfa',\n 'twisted_rightwards_arrows':'\\ud83d\\udd00',\n 'two_hearts':'\\ud83d\\udc95',\n 'two_men_holding_hands':'\\ud83d\\udc6c',\n 'two_women_holding_hands':'\\ud83d\\udc6d',\n 'u5272':'\\ud83c\\ude39',\n 'u5408':'\\ud83c\\ude34',\n 'u55b6':'\\ud83c\\ude3a',\n 'u6307':'\\ud83c\\ude2f\\ufe0f',\n 'u6708':'\\ud83c\\ude37\\ufe0f',\n 'u6709':'\\ud83c\\ude36',\n 'u6e80':'\\ud83c\\ude35',\n 'u7121':'\\ud83c\\ude1a\\ufe0f',\n 'u7533':'\\ud83c\\ude38',\n 'u7981':'\\ud83c\\ude32',\n 'u7a7a':'\\ud83c\\ude33',\n 'umbrella':'\\u2614\\ufe0f',\n 'unamused':'\\ud83d\\ude12',\n 'underage':'\\ud83d\\udd1e',\n 'unicorn':'\\ud83e\\udd84',\n 'unlock':'\\ud83d\\udd13',\n 'up':'\\ud83c\\udd99',\n 'upside_down_face':'\\ud83d\\ude43',\n 'v':'\\u270c\\ufe0f',\n 'vertical_traffic_light':'\\ud83d\\udea6',\n 'vhs':'\\ud83d\\udcfc',\n 'vibration_mode':'\\ud83d\\udcf3',\n 'video_camera':'\\ud83d\\udcf9',\n 'video_game':'\\ud83c\\udfae',\n 'violin':'\\ud83c\\udfbb',\n 'virgo':'\\u264d\\ufe0f',\n 'volcano':'\\ud83c\\udf0b',\n 'volleyball':'\\ud83c\\udfd0',\n 'vs':'\\ud83c\\udd9a',\n 'vulcan_salute':'\\ud83d\\udd96',\n 'walking_man':'\\ud83d\\udeb6',\n 'walking_woman':'\\ud83d\\udeb6‍\\u2640\\ufe0f',\n 'waning_crescent_moon':'\\ud83c\\udf18',\n 'waning_gibbous_moon':'\\ud83c\\udf16',\n 'warning':'\\u26a0\\ufe0f',\n 'wastebasket':'\\ud83d\\uddd1',\n 'watch':'\\u231a\\ufe0f',\n 'water_buffalo':'\\ud83d\\udc03',\n 'watermelon':'\\ud83c\\udf49',\n 'wave':'\\ud83d\\udc4b',\n 'wavy_dash':'\\u3030\\ufe0f',\n 'waxing_crescent_moon':'\\ud83c\\udf12',\n 'wc':'\\ud83d\\udebe',\n 'weary':'\\ud83d\\ude29',\n 'wedding':'\\ud83d\\udc92',\n 'weight_lifting_man':'\\ud83c\\udfcb\\ufe0f',\n 'weight_lifting_woman':'\\ud83c\\udfcb\\ufe0f‍\\u2640\\ufe0f',\n 'whale':'\\ud83d\\udc33',\n 'whale2':'\\ud83d\\udc0b',\n 'wheel_of_dharma':'\\u2638\\ufe0f',\n 'wheelchair':'\\u267f\\ufe0f',\n 'white_check_mark':'\\u2705',\n 'white_circle':'\\u26aa\\ufe0f',\n 'white_flag':'\\ud83c\\udff3\\ufe0f',\n 'white_flower':'\\ud83d\\udcae',\n 'white_large_square':'\\u2b1c\\ufe0f',\n 'white_medium_small_square':'\\u25fd\\ufe0f',\n 'white_medium_square':'\\u25fb\\ufe0f',\n 'white_small_square':'\\u25ab\\ufe0f',\n 'white_square_button':'\\ud83d\\udd33',\n 'wilted_flower':'\\ud83e\\udd40',\n 'wind_chime':'\\ud83c\\udf90',\n 'wind_face':'\\ud83c\\udf2c',\n 'wine_glass':'\\ud83c\\udf77',\n 'wink':'\\ud83d\\ude09',\n 'wolf':'\\ud83d\\udc3a',\n 'woman':'\\ud83d\\udc69',\n 'woman_artist':'\\ud83d\\udc69‍\\ud83c\\udfa8',\n 'woman_astronaut':'\\ud83d\\udc69‍\\ud83d\\ude80',\n 'woman_cartwheeling':'\\ud83e\\udd38‍\\u2640\\ufe0f',\n 'woman_cook':'\\ud83d\\udc69‍\\ud83c\\udf73',\n 'woman_facepalming':'\\ud83e\\udd26‍\\u2640\\ufe0f',\n 'woman_factory_worker':'\\ud83d\\udc69‍\\ud83c\\udfed',\n 'woman_farmer':'\\ud83d\\udc69‍\\ud83c\\udf3e',\n 'woman_firefighter':'\\ud83d\\udc69‍\\ud83d\\ude92',\n 'woman_health_worker':'\\ud83d\\udc69‍\\u2695\\ufe0f',\n 'woman_judge':'\\ud83d\\udc69‍\\u2696\\ufe0f',\n 'woman_juggling':'\\ud83e\\udd39‍\\u2640\\ufe0f',\n 'woman_mechanic':'\\ud83d\\udc69‍\\ud83d\\udd27',\n 'woman_office_worker':'\\ud83d\\udc69‍\\ud83d\\udcbc',\n 'woman_pilot':'\\ud83d\\udc69‍\\u2708\\ufe0f',\n 'woman_playing_handball':'\\ud83e\\udd3e‍\\u2640\\ufe0f',\n 'woman_playing_water_polo':'\\ud83e\\udd3d‍\\u2640\\ufe0f',\n 'woman_scientist':'\\ud83d\\udc69‍\\ud83d\\udd2c',\n 'woman_shrugging':'\\ud83e\\udd37‍\\u2640\\ufe0f',\n 'woman_singer':'\\ud83d\\udc69‍\\ud83c\\udfa4',\n 'woman_student':'\\ud83d\\udc69‍\\ud83c\\udf93',\n 'woman_teacher':'\\ud83d\\udc69‍\\ud83c\\udfeb',\n 'woman_technologist':'\\ud83d\\udc69‍\\ud83d\\udcbb',\n 'woman_with_turban':'\\ud83d\\udc73‍\\u2640\\ufe0f',\n 'womans_clothes':'\\ud83d\\udc5a',\n 'womans_hat':'\\ud83d\\udc52',\n 'women_wrestling':'\\ud83e\\udd3c‍\\u2640\\ufe0f',\n 'womens':'\\ud83d\\udeba',\n 'world_map':'\\ud83d\\uddfa',\n 'worried':'\\ud83d\\ude1f',\n 'wrench':'\\ud83d\\udd27',\n 'writing_hand':'\\u270d\\ufe0f',\n 'x':'\\u274c',\n 'yellow_heart':'\\ud83d\\udc9b',\n 'yen':'\\ud83d\\udcb4',\n 'yin_yang':'\\u262f\\ufe0f',\n 'yum':'\\ud83d\\ude0b',\n 'zap':'\\u26a1\\ufe0f',\n 'zipper_mouth_face':'\\ud83e\\udd10',\n 'zzz':'\\ud83d\\udca4',\n\n /* special emojis :P */\n 'octocat': '\":octocat:\"',\n 'showdown': 'S'\n};\n\r\n/**\n * Created by Estevao on 31-05-2015.\n */\n\n/**\n * Showdown Converter class\n * @class\n * @param {object} [converterOptions]\n * @returns {Converter}\n */\nshowdown.Converter = function (converterOptions) {\n 'use strict';\n\n var\n /**\n * Options used by this converter\n * @private\n * @type {{}}\n */\n options = {},\n\n /**\n * Language extensions used by this converter\n * @private\n * @type {Array}\n */\n langExtensions = [],\n\n /**\n * Output modifiers extensions used by this converter\n * @private\n * @type {Array}\n */\n outputModifiers = [],\n\n /**\n * Event listeners\n * @private\n * @type {{}}\n */\n listeners = {},\n\n /**\n * The flavor set in this converter\n */\n setConvFlavor = setFlavor,\n\n /**\n * Metadata of the document\n * @type {{parsed: {}, raw: string, format: string}}\n */\n metadata = {\n parsed: {},\n raw: '',\n format: ''\n };\n\n _constructor();\n\n /**\n * Converter constructor\n * @private\n */\n function _constructor () {\n converterOptions = converterOptions || {};\n\n for (var gOpt in globalOptions) {\n if (globalOptions.hasOwnProperty(gOpt)) {\n options[gOpt] = globalOptions[gOpt];\n }\n }\n\n // Merge options\n if (typeof converterOptions === 'object') {\n for (var opt in converterOptions) {\n if (converterOptions.hasOwnProperty(opt)) {\n options[opt] = converterOptions[opt];\n }\n }\n } else {\n throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions +\n ' was passed instead.');\n }\n\n if (options.extensions) {\n showdown.helper.forEach(options.extensions, _parseExtension);\n }\n }\n\n /**\n * Parse extension\n * @param {*} ext\n * @param {string} [name='']\n * @private\n */\n function _parseExtension (ext, name) {\n\n name = name || null;\n // If it's a string, the extension was previously loaded\n if (showdown.helper.isString(ext)) {\n ext = showdown.helper.stdExtName(ext);\n name = ext;\n\n // LEGACY_SUPPORT CODE\n if (showdown.extensions[ext]) {\n console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' +\n 'Please inform the developer that the extension should be updated!');\n legacyExtensionLoading(showdown.extensions[ext], ext);\n return;\n // END LEGACY SUPPORT CODE\n\n } else if (!showdown.helper.isUndefined(extensions[ext])) {\n ext = extensions[ext];\n\n } else {\n throw Error('Extension \"' + ext + '\" could not be loaded. It was either not found or is not a valid extension.');\n }\n }\n\n if (typeof ext === 'function') {\n ext = ext();\n }\n\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n\n var validExt = validate(ext, name);\n if (!validExt.valid) {\n throw Error(validExt.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n }\n if (ext[i].hasOwnProperty('listeners')) {\n for (var ln in ext[i].listeners) {\n if (ext[i].listeners.hasOwnProperty(ln)) {\n listen(ln, ext[i].listeners[ln]);\n }\n }\n }\n }\n\n }\n\n /**\n * LEGACY_SUPPORT\n * @param {*} ext\n * @param {string} name\n */\n function legacyExtensionLoading (ext, name) {\n if (typeof ext === 'function') {\n ext = ext(new showdown.Converter());\n }\n if (!showdown.helper.isArray(ext)) {\n ext = [ext];\n }\n var valid = validate(ext, name);\n\n if (!valid.valid) {\n throw Error(valid.error);\n }\n\n for (var i = 0; i < ext.length; ++i) {\n switch (ext[i].type) {\n case 'lang':\n langExtensions.push(ext[i]);\n break;\n case 'output':\n outputModifiers.push(ext[i]);\n break;\n default:// should never reach here\n throw Error('Extension loader error: Type unrecognized!!!');\n }\n }\n }\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n */\n function listen (name, callback) {\n if (!showdown.helper.isString(name)) {\n throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');\n }\n\n if (typeof callback !== 'function') {\n throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');\n }\n\n if (!listeners.hasOwnProperty(name)) {\n listeners[name] = [];\n }\n listeners[name].push(callback);\n }\n\n function rTrimInputText (text) {\n var rsp = text.match(/^\\s*/)[0].length,\n rgx = new RegExp('^\\\\s{0,' + rsp + '}', 'gm');\n return text.replace(rgx, '');\n }\n\n /**\n * Dispatch an event\n * @private\n * @param {string} evtName Event name\n * @param {string} text Text\n * @param {{}} options Converter Options\n * @param {{}} globals\n * @returns {string}\n */\n this._dispatch = function dispatch (evtName, text, options, globals) {\n if (listeners.hasOwnProperty(evtName)) {\n for (var ei = 0; ei < listeners[evtName].length; ++ei) {\n var nText = listeners[evtName][ei](evtName, text, this, options, globals);\n if (nText && typeof nText !== 'undefined') {\n text = nText;\n }\n }\n }\n return text;\n };\n\n /**\n * Listen to an event\n * @param {string} name\n * @param {function} callback\n * @returns {showdown.Converter}\n */\n this.listen = function (name, callback) {\n listen(name, callback);\n return this;\n };\n\n /**\n * Converts a markdown string into HTML\n * @param {string} text\n * @returns {*}\n */\n this.makeHtml = function (text) {\n //check if text is not falsy\n if (!text) {\n return text;\n }\n\n var globals = {\n gHtmlBlocks: [],\n gHtmlMdBlocks: [],\n gHtmlSpans: [],\n gUrls: {},\n gTitles: {},\n gDimensions: {},\n gListLevel: 0,\n hashLinkCounts: {},\n langExtensions: langExtensions,\n outputModifiers: outputModifiers,\n converter: this,\n ghCodeBlocks: [],\n metadata: {\n parsed: {},\n raw: '',\n format: ''\n }\n };\n\n // This lets us use ¨ trema as an escape char to avoid md5 hashes\n // The choice of character is arbitrary; anything that isn't\n // magic in Markdown will work.\n text = text.replace(/¨/g, '¨T');\n\n // Replace $ with ¨D\n // RegExp interprets $ as a special character\n // when it's in a replacement string\n text = text.replace(/\\$/g, '¨D');\n\n // Standardize line endings\n text = text.replace(/\\r\\n/g, '\\n'); // DOS to Unix\n text = text.replace(/\\r/g, '\\n'); // Mac to Unix\n\n // Stardardize line spaces\n text = text.replace(/\\u00A0/g, ' ');\n\n if (options.smartIndentationFix) {\n text = rTrimInputText(text);\n }\n\n // Make sure text begins and ends with a couple of newlines:\n text = '\\n\\n' + text + '\\n\\n';\n\n // detab\n text = showdown.subParser('detab')(text, options, globals);\n\n /**\n * Strip any lines consisting only of spaces and tabs.\n * This makes subsequent regexs easier to write, because we can\n * match consecutive blank lines with /\\n+/ instead of something\n * contorted like /[ \\t]*\\n+/\n */\n text = text.replace(/^[ \\t]+$/mg, '');\n\n //run languageExtensions\n showdown.helper.forEach(langExtensions, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // run the sub parsers\n text = showdown.subParser('metadata')(text, options, globals);\n text = showdown.subParser('hashPreCodeTags')(text, options, globals);\n text = showdown.subParser('githubCodeBlocks')(text, options, globals);\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('hashCodeTags')(text, options, globals);\n text = showdown.subParser('stripLinkDefinitions')(text, options, globals);\n text = showdown.subParser('blockGamut')(text, options, globals);\n text = showdown.subParser('unhashHTMLSpans')(text, options, globals);\n text = showdown.subParser('unescapeSpecialChars')(text, options, globals);\n\n // attacklab: Restore dollar signs\n text = text.replace(/¨D/g, '$$');\n\n // attacklab: Restore tremas\n text = text.replace(/¨T/g, '¨');\n\n // render a complete html document instead of a partial if the option is enabled\n text = showdown.subParser('completeHTMLDocument')(text, options, globals);\n\n // Run output modifiers\n showdown.helper.forEach(outputModifiers, function (ext) {\n text = showdown.subParser('runExtension')(ext, text, options, globals);\n });\n\n // update metadata\n metadata = globals.metadata;\n return text;\n };\n\n /**\n * Converts an HTML string into a markdown string\n * @param src\n * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.\n * @returns {string}\n */\n this.makeMarkdown = this.makeMd = function (src, HTMLParser) {\n\n // replace \\r\\n with \\n\n src = src.replace(/\\r\\n/g, '\\n');\n src = src.replace(/\\r/g, '\\n'); // old macs\n\n // due to an edge case, we need to find this: > <\n // to prevent removing of non silent white spaces\n // ex: this is sparta\n src = src.replace(/>[ \\t]+¨NBSP;<');\n\n if (!HTMLParser) {\n if (window && window.document) {\n HTMLParser = window.document;\n } else {\n throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');\n }\n }\n\n var doc = HTMLParser.createElement('div');\n doc.innerHTML = src;\n\n var globals = {\n preList: substitutePreCodeTags(doc)\n };\n\n // remove all newlines and collapse spaces\n clean(doc);\n\n // some stuff, like accidental reference links must now be escaped\n // TODO\n // doc.innerHTML = doc.innerHTML.replace(/\\[[\\S\\t ]]/);\n\n var nodes = doc.childNodes,\n mdDoc = '';\n\n for (var i = 0; i < nodes.length; i++) {\n mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);\n }\n\n function clean (node) {\n for (var n = 0; n < node.childNodes.length; ++n) {\n var child = node.childNodes[n];\n if (child.nodeType === 3) {\n if (!/\\S/.test(child.nodeValue)) {\n node.removeChild(child);\n --n;\n } else {\n child.nodeValue = child.nodeValue.split('\\n').join(' ');\n child.nodeValue = child.nodeValue.replace(/(\\s)+/g, '$1');\n }\n } else if (child.nodeType === 1) {\n clean(child);\n }\n }\n }\n\n // find all pre tags and replace contents with placeholder\n // we need this so that we can remove all indentation from html\n // to ease up parsing\n function substitutePreCodeTags (doc) {\n\n var pres = doc.querySelectorAll('pre'),\n presPH = [];\n\n for (var i = 0; i < pres.length; ++i) {\n\n if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {\n var content = pres[i].firstChild.innerHTML.trim(),\n language = pres[i].firstChild.getAttribute('data-language') || '';\n\n // if data-language attribute is not defined, then we look for class language-*\n if (language === '') {\n var classes = pres[i].firstChild.className.split(' ');\n for (var c = 0; c < classes.length; ++c) {\n var matches = classes[c].match(/^language-(.+)$/);\n if (matches !== null) {\n language = matches[1];\n break;\n }\n }\n }\n\n // unescape html entities in content\n content = showdown.helper.unescapeHTMLEntities(content);\n\n presPH.push(content);\n pres[i].outerHTML = '';\n } else {\n presPH.push(pres[i].innerHTML);\n pres[i].innerHTML = '';\n pres[i].setAttribute('prenum', i.toString());\n }\n }\n return presPH;\n }\n\n return mdDoc;\n };\n\n /**\n * Set an option of this Converter instance\n * @param {string} key\n * @param {*} value\n */\n this.setOption = function (key, value) {\n options[key] = value;\n };\n\n /**\n * Get the option of this Converter instance\n * @param {string} key\n * @returns {*}\n */\n this.getOption = function (key) {\n return options[key];\n };\n\n /**\n * Get the options of this Converter instance\n * @returns {{}}\n */\n this.getOptions = function () {\n return options;\n };\n\n /**\n * Add extension to THIS converter\n * @param {{}} extension\n * @param {string} [name=null]\n */\n this.addExtension = function (extension, name) {\n name = name || null;\n _parseExtension(extension, name);\n };\n\n /**\n * Use a global registered extension with THIS converter\n * @param {string} extensionName Name of the previously registered extension\n */\n this.useExtension = function (extensionName) {\n _parseExtension(extensionName);\n };\n\n /**\n * Set the flavor THIS converter should use\n * @param {string} name\n */\n this.setFlavor = function (name) {\n if (!flavor.hasOwnProperty(name)) {\n throw Error(name + ' flavor was not found');\n }\n var preset = flavor[name];\n setConvFlavor = name;\n for (var option in preset) {\n if (preset.hasOwnProperty(option)) {\n options[option] = preset[option];\n }\n }\n };\n\n /**\n * Get the currently set flavor of this converter\n * @returns {string}\n */\n this.getFlavor = function () {\n return setConvFlavor;\n };\n\n /**\n * Remove an extension from THIS converter.\n * Note: This is a costly operation. It's better to initialize a new converter\n * and specify the extensions you wish to use\n * @param {Array} extension\n */\n this.removeExtension = function (extension) {\n if (!showdown.helper.isArray(extension)) {\n extension = [extension];\n }\n for (var a = 0; a < extension.length; ++a) {\n var ext = extension[a];\n for (var i = 0; i < langExtensions.length; ++i) {\n if (langExtensions[i] === ext) {\n langExtensions[i].splice(i, 1);\n }\n }\n for (var ii = 0; ii < outputModifiers.length; ++i) {\n if (outputModifiers[ii] === ext) {\n outputModifiers[ii].splice(i, 1);\n }\n }\n }\n };\n\n /**\n * Get all extension of THIS converter\n * @returns {{language: Array, output: Array}}\n */\n this.getAllExtensions = function () {\n return {\n language: langExtensions,\n output: outputModifiers\n };\n };\n\n /**\n * Get the metadata of the previously parsed document\n * @param raw\n * @returns {string|{}}\n */\n this.getMetadata = function (raw) {\n if (raw) {\n return metadata.raw;\n } else {\n return metadata.parsed;\n }\n };\n\n /**\n * Get the metadata format of the previously parsed document\n * @returns {string}\n */\n this.getMetadataFormat = function () {\n return metadata.format;\n };\n\n /**\n * Private: set a single key, value metadata pair\n * @param {string} key\n * @param {string} value\n */\n this._setMetadataPair = function (key, value) {\n metadata.parsed[key] = value;\n };\n\n /**\n * Private: set metadata format\n * @param {string} format\n */\n this._setMetadataFormat = function (format) {\n metadata.format = format;\n };\n\n /**\n * Private: set metadata raw text\n * @param {string} raw\n */\n this._setMetadataRaw = function (raw) {\n metadata.raw = raw;\n };\n};\n\r\n/**\n * Turn Markdown link shortcuts into XHTML
    tags.\n */\nshowdown.subParser('anchors', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('anchors.before', text, options, globals);\n\n var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) {\n if (showdown.helper.isUndefined(title)) {\n title = '';\n }\n linkId = linkId.toLowerCase();\n\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n } else if (!url) {\n if (!linkId) {\n // lower-case and turn embedded newlines into spaces\n linkId = linkText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {\n url = globals.gUrls[linkId];\n if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {\n title = globals.gTitles[linkId];\n }\n } else {\n return wholeMatch;\n }\n }\n\n //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n\n var result = '';\n\n return result;\n };\n\n // First, handle reference-style links: [link text] [id]\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)] ?(?:\\n *)?\\[(.*?)]()()()()/g, writeAnchorTag);\n\n // Next, inline-style links: [link text](url \"optional title\")\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]?<([^>]*)>(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // normal cases\n text = text.replace(/\\[((?:\\[[^\\]]*]|[^\\[\\]])*)]()[ \\t]*\\([ \\t]??(?:[ \\t]*(([\"'])([^\"]*?)\\5))?[ \\t]?\\)/g,\n writeAnchorTag);\n\n // handle reference-style shortcuts: [link text]\n // These must come last in case you've also got [link test][1]\n // or [link test](/foo)\n text = text.replace(/\\[([^\\[\\]]+)]()()()()()/g, writeAnchorTag);\n\n // Lastly handle GithubMentions if option is enabled\n if (options.ghMentions) {\n text = text.replace(/(^|\\s)(\\\\)?(@([a-z\\d]+(?:[a-z\\d.-]+?[a-z\\d]+)*))/gmi, function (wm, st, escape, mentions, username) {\n if (escape === '\\\\') {\n return st + mentions;\n }\n\n //check if options.ghMentionsLink is a string\n if (!showdown.helper.isString(options.ghMentionsLink)) {\n throw new Error('ghMentionsLink option must be a string');\n }\n var lnk = options.ghMentionsLink.replace(/\\{u}/g, username),\n target = '';\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return st + '' + mentions + '';\n });\n }\n\n text = globals.converter._dispatch('anchors.after', text, options, globals);\n return text;\n});\n\r\n// url allowed chars [a-z\\d_.~:/?#[]@!$&'()*+,;=-]\n\nvar simpleURLRegex = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+?\\.[^'\">\\s]+?)()(\\1)?(?=\\s|$)(?![\"<>])/gi,\n simpleURLRegex2 = /([*~_]+|\\b)(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+\\.[^'\">\\s]+?)([.!?,()\\[\\]])?(\\1)?(?=\\s|$)(?![\"<>])/gi,\n delimUrlRegex = /()<(((https?|ftp|dict):\\/\\/|www\\.)[^'\">\\s]+)()>()/gi,\n simpleMailRegex = /(^|\\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)(?=$|\\s)/gmi,\n delimMailRegex = /<()(?:mailto:)?([-.\\w]+@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,\n\n replaceLink = function (options) {\n 'use strict';\n return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {\n link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var lnkTxt = link,\n append = '',\n target = '',\n lmc = leadingMagicChars || '',\n tmc = trailingMagicChars || '';\n if (/^www\\./i.test(link)) {\n link = link.replace(/^www\\./i, 'http://www.');\n }\n if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {\n append = trailingPunctuation;\n }\n if (options.openLinksInNewWindow) {\n target = ' rel=\"noopener noreferrer\" target=\"¨E95Eblank\"';\n }\n return lmc + '' + lnkTxt + '' + append + tmc;\n };\n },\n\n replaceMail = function (options, globals) {\n 'use strict';\n return function (wholeMatch, b, mail) {\n var href = 'mailto:';\n b = b || '';\n mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);\n if (options.encodeEmails) {\n href = showdown.helper.encodeEmailAddress(href + mail);\n mail = showdown.helper.encodeEmailAddress(mail);\n } else {\n href = href + mail;\n }\n return b + '' + mail + '';\n };\n };\n\nshowdown.subParser('autoLinks', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('autoLinks.before', text, options, globals);\n\n text = text.replace(delimUrlRegex, replaceLink(options));\n text = text.replace(delimMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('autoLinks.after', text, options, globals);\n\n return text;\n});\n\nshowdown.subParser('simplifiedAutoLinks', function (text, options, globals) {\n 'use strict';\n\n if (!options.simplifiedAutoLink) {\n return text;\n }\n\n text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);\n\n if (options.excludeTrailingPunctuationFromURLs) {\n text = text.replace(simpleURLRegex2, replaceLink(options));\n } else {\n text = text.replace(simpleURLRegex, replaceLink(options));\n }\n text = text.replace(simpleMailRegex, replaceMail(options, globals));\n\n text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * These are all the transformations that form block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('blockGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockGamut.before', text, options, globals);\n\n // we parse blockquotes first so that we can have headings and hrs\n // inside blockquotes\n text = showdown.subParser('blockQuotes')(text, options, globals);\n text = showdown.subParser('headers')(text, options, globals);\n\n // Do Horizontal Rules:\n text = showdown.subParser('horizontalRule')(text, options, globals);\n\n text = showdown.subParser('lists')(text, options, globals);\n text = showdown.subParser('codeBlocks')(text, options, globals);\n text = showdown.subParser('tables')(text, options, globals);\n\n // We already ran _HashHTMLBlocks() before, in Markdown(), but that\n // was to escape raw HTML in the original Markdown source. This time,\n // we're escaping the markup we've just created, so that we don't wrap\n //

    tags around block-level tags.\n text = showdown.subParser('hashHTMLBlocks')(text, options, globals);\n text = showdown.subParser('paragraphs')(text, options, globals);\n\n text = globals.converter._dispatch('blockGamut.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('blockQuotes', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('blockQuotes.before', text, options, globals);\n\n // add a couple extra lines after the text and endtext mark\n text = text + '\\n\\n';\n\n var rgx = /(^ {0,3}>[ \\t]?.+\\n(.+\\n)*\\n*)+/gm;\n\n if (options.splitAdjacentBlockquotes) {\n rgx = /^ {0,3}>[\\s\\S]*?(?:\\n\\n)/gm;\n }\n\n text = text.replace(rgx, function (bq) {\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n bq = bq.replace(/^[ \\t]*>[ \\t]?/gm, ''); // trim one level of quoting\n\n // attacklab: clean up hack\n bq = bq.replace(/¨0/g, '');\n\n bq = bq.replace(/^[ \\t]+$/gm, ''); // trim whitespace-only lines\n bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);\n bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse\n\n bq = bq.replace(/(^|\\n)/g, '$1 ');\n // These leading spaces screw with

     content, so we need to fix that:\n    bq = bq.replace(/(\\s*
    [^\\r]+?<\\/pre>)/gm, function (wholeMatch, m1) {\n      var pre = m1;\n      // attacklab: hack around Konqueror 3.5.4 bug:\n      pre = pre.replace(/^  /mg, '¨0');\n      pre = pre.replace(/¨0/g, '');\n      return pre;\n    });\n\n    return showdown.subParser('hashBlock')('
    \\n' + bq + '\\n
    ', options, globals);\n });\n\n text = globals.converter._dispatch('blockQuotes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Process Markdown `
    ` blocks.\n */\nshowdown.subParser('codeBlocks', function (text, options, globals) {\n  'use strict';\n\n  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);\n\n  // sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n  text += '¨0';\n\n  var pattern = /(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=¨0))/g;\n  text = text.replace(pattern, function (wholeMatch, m1, m2) {\n    var codeblock = m1,\n        nextChar = m2,\n        end = '\\n';\n\n    codeblock = showdown.subParser('outdent')(codeblock, options, globals);\n    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n    codeblock = showdown.subParser('detab')(codeblock, options, globals);\n    codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n    codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing newlines\n\n    if (options.omitExtraWLInCodeBlocks) {\n      end = '';\n    }\n\n    codeblock = '
    ' + codeblock + end + '
    ';\n\n return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;\n });\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n\n text = globals.converter._dispatch('codeBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n * * Backtick quotes are used for spans.\n *\n * * You can use multiple backticks as the delimiters if you want to\n * include literal backticks in the code span. So, this input:\n *\n * Just type ``foo `bar` baz`` at the prompt.\n *\n * Will translate to:\n *\n *

    Just type foo `bar` baz at the prompt.

    \n *\n * There's no arbitrary limit to the number of backticks you\n * can use as delimters. If you need three consecutive backticks\n * in your code, use four for delimiters, etc.\n *\n * * You can use spaces to get literal backticks at the edges:\n *\n * ... type `` `bar` `` ...\n *\n * Turns to:\n *\n * ... type `bar` ...\n */\nshowdown.subParser('codeSpans', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('codeSpans.before', text, options, globals);\n\n if (typeof text === 'undefined') {\n text = '';\n }\n text = text.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,\n function (wholeMatch, m1, m2, m3) {\n var c = m3;\n c = c.replace(/^([ \\t]*)/g, '');\t// leading whitespace\n c = c.replace(/[ \\t]*$/g, '');\t// trailing whitespace\n c = showdown.subParser('encodeCode')(c, options, globals);\n c = m1 + '' + c + '';\n c = showdown.subParser('hashHTMLSpans')(c, options, globals);\n return c;\n }\n );\n\n text = globals.converter._dispatch('codeSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Create a full HTML document from the processed markdown\n */\nshowdown.subParser('completeHTMLDocument', function (text, options, globals) {\n 'use strict';\n\n if (!options.completeHTMLDocument) {\n return text;\n }\n\n text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);\n\n var doctype = 'html',\n doctypeParsed = '\\n',\n title = '',\n charset = '\\n',\n lang = '',\n metadata = '';\n\n if (typeof globals.metadata.parsed.doctype !== 'undefined') {\n doctypeParsed = '\\n';\n doctype = globals.metadata.parsed.doctype.toString().toLowerCase();\n if (doctype === 'html' || doctype === 'html5') {\n charset = '';\n }\n }\n\n for (var meta in globals.metadata.parsed) {\n if (globals.metadata.parsed.hasOwnProperty(meta)) {\n switch (meta.toLowerCase()) {\n case 'doctype':\n break;\n\n case 'title':\n title = '' + globals.metadata.parsed.title + '\\n';\n break;\n\n case 'charset':\n if (doctype === 'html' || doctype === 'html5') {\n charset = '\\n';\n } else {\n charset = '\\n';\n }\n break;\n\n case 'language':\n case 'lang':\n lang = ' lang=\"' + globals.metadata.parsed[meta] + '\"';\n metadata += '\\n';\n break;\n\n default:\n metadata += '\\n';\n }\n }\n }\n\n text = doctypeParsed + '\\n\\n' + title + charset + metadata + '\\n\\n' + text.trim() + '\\n\\n';\n\n text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Convert all tabs to spaces\n */\nshowdown.subParser('detab', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('detab.before', text, options, globals);\n\n // expand first n-1 tabs\n text = text.replace(/\\t(?=\\t)/g, ' '); // g_tab_width\n\n // replace the nth with two sentinels\n text = text.replace(/\\t/g, '¨A¨B');\n\n // use the sentinel to anchor our regex so it doesn't explode\n text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {\n var leadingText = m1,\n numSpaces = 4 - leadingText.length % 4; // g_tab_width\n\n // there *must* be a better way to do this:\n for (var i = 0; i < numSpaces; i++) {\n leadingText += ' ';\n }\n\n return leadingText;\n });\n\n // clean up sentinels\n text = text.replace(/¨A/g, ' '); // g_tab_width\n text = text.replace(/¨B/g, '');\n\n text = globals.converter._dispatch('detab.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('ellipsis', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('ellipsis.before', text, options, globals);\n\n text = text.replace(/\\.\\.\\./g, '…');\n\n text = globals.converter._dispatch('ellipsis.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Turn emoji codes into emojis\n *\n * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis\n */\nshowdown.subParser('emoji', function (text, options, globals) {\n 'use strict';\n\n if (!options.emoji) {\n return text;\n }\n\n text = globals.converter._dispatch('emoji.before', text, options, globals);\n\n var emojiRgx = /:([\\S]+?):/g;\n\n text = text.replace(emojiRgx, function (wm, emojiCode) {\n if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {\n return showdown.helper.emojis[emojiCode];\n }\n return wm;\n });\n\n text = globals.converter._dispatch('emoji.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Smart processing for ampersands and angle brackets that need to be encoded.\n */\nshowdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);\n\n // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:\n // http://bumppo.net/projects/amputator/\n text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g, '&');\n\n // Encode naked <'s\n text = text.replace(/<(?![a-z\\/?$!])/gi, '<');\n\n // Encode <\n text = text.replace(/\n text = text.replace(/>/g, '>');\n\n text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Returns the string, with after processing the following backslash escape sequences.\n *\n * attacklab: The polite way to do this is with the new escapeCharacters() function:\n *\n * text = escapeCharacters(text,\"\\\\\",true);\n * text = escapeCharacters(text,\"`*_{}[]()>#+-.!\",true);\n *\n * ...but we're sidestepping its use of the (slow) RegExp constructor\n * as an optimization for Firefox. This function gets called a LOT.\n */\nshowdown.subParser('encodeBackslashEscapes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);\n\n text = text.replace(/\\\\(\\\\)/g, showdown.helper.escapeCharactersCallback);\n text = text.replace(/\\\\([`*_{}\\[\\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Encode/escape certain characters inside Markdown code runs.\n * The point is that in code, these characters are literals,\n * and lose their special Markdown meanings.\n */\nshowdown.subParser('encodeCode', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('encodeCode.before', text, options, globals);\n\n // Encode all ampersands; HTML entities are not\n // entities within a Markdown code span.\n text = text\n .replace(/&/g, '&')\n // Do the angle bracket song and dance:\n .replace(//g, '>')\n // Now, escape characters that are magic in Markdown:\n .replace(/([*_{}\\[\\]\\\\=~-])/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('encodeCode.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Within tags -- meaning between < and > -- encode [\\ ` * _ ~ =] so they\n * don't conflict with their use in Markdown for code, italics and strong.\n */\nshowdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);\n\n // Build a regex to find HTML tags.\n var tags = /<\\/?[a-z\\d_:-]+(?:[\\s]+[\\s\\S]+?)?>/gi,\n comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;\n\n text = text.replace(tags, function (wholeMatch) {\n return wholeMatch\n .replace(/(.)<\\/?code>(?=.)/g, '$1`')\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = text.replace(comments, function (wholeMatch) {\n return wholeMatch\n .replace(/([\\\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);\n });\n\n text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Handle github codeblocks prior to running HashHTML so that\n * HTML contained within the codeblock gets escaped properly\n * Example:\n * ```ruby\n * def hello_world(x)\n * puts \"Hello, #{x}\"\n * end\n * ```\n */\nshowdown.subParser('githubCodeBlocks', function (text, options, globals) {\n 'use strict';\n\n // early exit if option is not enabled\n if (!options.ghCodeBlocks) {\n return text;\n }\n\n text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);\n\n text += '¨0';\n\n text = text.replace(/(?:^|\\n)(?: {0,3})(```+|~~~+)(?: *)([^\\s`~]*)\\n([\\s\\S]*?)\\n(?: {0,3})\\1/g, function (wholeMatch, delim, language, codeblock) {\n var end = (options.omitExtraWLInCodeBlocks) ? '' : '\\n';\n\n // First parse the github code block\n codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);\n codeblock = showdown.subParser('detab')(codeblock, options, globals);\n codeblock = codeblock.replace(/^\\n+/g, ''); // trim leading newlines\n codeblock = codeblock.replace(/\\n+$/g, ''); // trim trailing whitespace\n\n codeblock = '
    ' + codeblock + end + '
    ';\n\n codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);\n\n // Since GHCodeblocks can be false positives, we need to\n // store the primitive text and the parsed text in a global var,\n // and then return a token\n return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n });\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);\n});\n\r\nshowdown.subParser('hashBlock', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashBlock.before', text, options, globals);\n text = text.replace(/(^\\n+|\\n+$)/g, '');\n text = '\\n\\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\\n\\n';\n text = globals.converter._dispatch('hashBlock.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape elements that should not be parsed as markdown\n */\nshowdown.subParser('hashCodeTags', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);\n\n var repFunc = function (wholeMatch, match, left, right) {\n var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';\n };\n\n // Hash naked \n text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim');\n\n text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('hashElement', function (text, options, globals) {\n 'use strict';\n\n return function (wholeMatch, m1) {\n var blockText = m1;\n\n // Undo double lines\n blockText = blockText.replace(/\\n\\n/g, '\\n');\n blockText = blockText.replace(/^\\n/, '');\n\n // strip trailing blank lines\n blockText = blockText.replace(/\\n+$/g, '');\n\n // Replace the element text with a marker (\"¨KxK\" where x is its key)\n blockText = '\\n\\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\\n\\n';\n\n return blockText;\n };\n});\n\r\nshowdown.subParser('hashHTMLBlocks', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);\n\n var blockTags = [\n 'pre',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'table',\n 'dl',\n 'ol',\n 'ul',\n 'script',\n 'noscript',\n 'form',\n 'fieldset',\n 'iframe',\n 'math',\n 'style',\n 'section',\n 'header',\n 'footer',\n 'nav',\n 'article',\n 'aside',\n 'address',\n 'audio',\n 'canvas',\n 'figure',\n 'hgroup',\n 'output',\n 'video',\n 'p'\n ],\n repFunc = function (wholeMatch, match, left, right) {\n var txt = wholeMatch;\n // check if this html element is marked as markdown\n // if so, it's contents should be parsed as markdown\n if (left.search(/\\bmarkdown\\b/) !== -1) {\n txt = left + globals.converter.makeHtml(match) + right;\n }\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n };\n\n if (options.backslashEscapesHTMLTags) {\n // encode backslash escaped HTML tags\n text = text.replace(/\\\\<(\\/?[^>]+?)>/g, function (wm, inside) {\n return '<' + inside + '>';\n });\n }\n\n // hash HTML Blocks\n for (var i = 0; i < blockTags.length; ++i) {\n\n var opTagPos,\n rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\\\b[^>]*>)', 'im'),\n patLeft = '<' + blockTags[i] + '\\\\b[^>]*>',\n patRight = '';\n // 1. Look for the first position of the first opening HTML tag in the text\n while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {\n\n // if the HTML tag is \\ escaped, we need to escape it and break\n\n\n //2. Split the text in that position\n var subTexts = showdown.helper.splitAtIndex(text, opTagPos),\n //3. Match recursively\n newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');\n\n // prevent an infinite loop\n if (newSubText1 === subTexts[1]) {\n break;\n }\n text = subTexts[0].concat(newSubText1);\n }\n }\n // HR SPECIAL CASE\n text = text.replace(/(\\n {0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n // Special case for standalone HTML comments\n text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {\n return '\\n\\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\\n\\n';\n }, '^ {0,3}', 'gm');\n\n // PHP and ASP-style processor instructions ( and <%...%>)\n text = text.replace(/(?:\\n\\n)( {0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,\n showdown.subParser('hashElement')(text, options, globals));\n\n text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash span elements that should not be parsed as markdown\n */\nshowdown.subParser('hashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);\n\n function hashHTMLSpan (html) {\n return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';\n }\n\n // Hash Self Closing tags\n text = text.replace(/<[^>]+?\\/>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags without properties\n text = text.replace(/<([^>]+?)>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash tags with properties\n text = text.replace(/<([^>]+?)\\s[^>]+?>[\\s\\S]*?<\\/\\1>/g, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n // Hash self closing tags without />\n text = text.replace(/<[^>]+?>/gi, function (wm) {\n return hashHTMLSpan(wm);\n });\n\n /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/\n\n text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);\n return text;\n});\n\n/**\n * Unhash HTML spans\n */\nshowdown.subParser('unhashHTMLSpans', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);\n\n for (var i = 0; i < globals.gHtmlSpans.length; ++i) {\n var repText = globals.gHtmlSpans[i],\n // limiter to prevent infinite loop (assume 10 as limit for recurse)\n limit = 0;\n\n while (/¨C(\\d+)C/.test(repText)) {\n var num = RegExp.$1;\n repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);\n if (limit === 10) {\n console.error('maximum nesting of 10 spans reached!!!');\n break;\n }\n ++limit;\n }\n text = text.replace('¨C' + i + 'C', repText);\n }\n\n text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Hash and escape
     elements that should not be parsed as markdown\n */\nshowdown.subParser('hashPreCodeTags', function (text, options, globals) {\n  'use strict';\n  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);\n\n  var repFunc = function (wholeMatch, match, left, right) {\n    // encode html entities\n    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;\n    return '\\n\\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\\n\\n';\n  };\n\n  // Hash 
    \n  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\\\s*]*>', '^ {0,3}\\\\s*
    ', 'gim');\n\n text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('headers', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('headers.before', text, options, globals);\n\n var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),\n\n // Set text-style headers:\n //\tHeader 1\n //\t========\n //\n //\tHeader 2\n //\t--------\n //\n setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n={2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,\n setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \\t]*\\n-{2,}[ \\t]*\\n+/gm : /^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm;\n\n text = text.replace(setextRegexH1, function (wholeMatch, m1) {\n\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n text = text.replace(setextRegexH2, function (matchFound, m1) {\n var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m1) + '\"',\n hLevel = headerLevelStart + 1,\n hashBlock = '' + spanGamut + '';\n return showdown.subParser('hashBlock')(hashBlock, options, globals);\n });\n\n // atx-style headers:\n // # Header 1\n // ## Header 2\n // ## Header 2 with closing hashes ##\n // ...\n // ###### Header 6\n //\n var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \\t]+(.+?)[ \\t]*#*\\n+/gm : /^(#{1,6})[ \\t]*(.+?)[ \\t]*#*\\n+/gm;\n\n text = text.replace(atxStyle, function (wholeMatch, m1, m2) {\n var hText = m2;\n if (options.customizedHeaderId) {\n hText = m2.replace(/\\s?\\{([^{]+?)}\\s*$/, '');\n }\n\n var span = showdown.subParser('spanGamut')(hText, options, globals),\n hID = (options.noHeaderId) ? '' : ' id=\"' + headerId(m2) + '\"',\n hLevel = headerLevelStart - 1 + m1.length,\n header = '' + span + '';\n\n return showdown.subParser('hashBlock')(header, options, globals);\n });\n\n function headerId (m) {\n var title,\n prefix;\n\n // It is separate from other options to allow combining prefix and customized\n if (options.customizedHeaderId) {\n var match = m.match(/\\{([^{]+?)}\\s*$/);\n if (match && match[1]) {\n m = match[1];\n }\n }\n\n title = m;\n\n // Prefix id to prevent causing inadvertent pre-existing style matches.\n if (showdown.helper.isString(options.prefixHeaderId)) {\n prefix = options.prefixHeaderId;\n } else if (options.prefixHeaderId === true) {\n prefix = 'section-';\n } else {\n prefix = '';\n }\n\n if (!options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (options.ghCompatibleHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '')\n .replace(/¨T/g, '')\n .replace(/¨D/g, '')\n // replace rest of the chars (&~$ are repeated as they might have been escaped)\n // borrowed from github's redcarpet (some they should produce similar results)\n .replace(/[&+$,\\/:;=?@\"#{}|^¨~\\[\\]`\\\\*)(%.!'<>]/g, '')\n .toLowerCase();\n } else if (options.rawHeaderId) {\n title = title\n .replace(/ /g, '-')\n // replace previously escaped chars (&, ¨ and $)\n .replace(/&/g, '&')\n .replace(/¨T/g, '¨')\n .replace(/¨D/g, '$')\n // replace \" and '\n .replace(/[\"']/g, '-')\n .toLowerCase();\n } else {\n title = title\n .replace(/[^\\w]/g, '')\n .toLowerCase();\n }\n\n if (options.rawPrefixHeaderId) {\n title = prefix + title;\n }\n\n if (globals.hashLinkCounts[title]) {\n title = title + '-' + (globals.hashLinkCounts[title]++);\n } else {\n globals.hashLinkCounts[title] = 1;\n }\n return title;\n }\n\n text = globals.converter._dispatch('headers.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown link shortcuts into XHTML tags.\n */\nshowdown.subParser('horizontalRule', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('horizontalRule.before', text, options, globals);\n\n var key = showdown.subParser('hashBlock')('
    ', options, globals);\n text = text.replace(/^ {0,2}( ?-){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?\\*){3,}[ \\t]*$/gm, key);\n text = text.replace(/^ {0,2}( ?_){3,}[ \\t]*$/gm, key);\n\n text = globals.converter._dispatch('horizontalRule.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Turn Markdown image shortcuts into tags.\n */\nshowdown.subParser('images', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('images.before', text, options, globals);\n\n var inlineRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n crazyRegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]?<([^>]*)>(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:(?:([\"'])([^\"]*?)\\6))?[ \\t]?\\)/g,\n base64RegExp = /!\\[([^\\]]*?)][ \\t]*()\\([ \\t]??(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*(?:([\"'])([^\"]*?)\\6)?[ \\t]?\\)/g,\n referenceRegExp = /!\\[([^\\]]*?)] ?(?:\\n *)?\\[([\\s\\S]*?)]()()()()()/g,\n refShortcutRegExp = /!\\[([^\\[\\]]+)]()()()()()/g;\n\n function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) {\n url = url.replace(/\\s/g, '');\n return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title);\n }\n\n function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) {\n\n var gUrls = globals.gUrls,\n gTitles = globals.gTitles,\n gDims = globals.gDimensions;\n\n linkId = linkId.toLowerCase();\n\n if (!title) {\n title = '';\n }\n // Special case for explicit empty url\n if (wholeMatch.search(/\\(? ?(['\"].*['\"])?\\)$/m) > -1) {\n url = '';\n\n } else if (url === '' || url === null) {\n if (linkId === '' || linkId === null) {\n // lower-case and turn embedded newlines into spaces\n linkId = altText.toLowerCase().replace(/ ?\\n/g, ' ');\n }\n url = '#' + linkId;\n\n if (!showdown.helper.isUndefined(gUrls[linkId])) {\n url = gUrls[linkId];\n if (!showdown.helper.isUndefined(gTitles[linkId])) {\n title = gTitles[linkId];\n }\n if (!showdown.helper.isUndefined(gDims[linkId])) {\n width = gDims[linkId].width;\n height = gDims[linkId].height;\n }\n } else {\n return wholeMatch;\n }\n }\n\n altText = altText\n .replace(/\"/g, '"')\n //altText = showdown.helper.escapeCharacters(altText, '*_', false);\n .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n //url = showdown.helper.escapeCharacters(url, '*_', false);\n url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);\n var result = '\"'x \"optional title\")\n\n // base64 encoded images\n text = text.replace(base64RegExp, writeImageTagBase64);\n\n // cases with crazy urls like ./image/cat1).png\n text = text.replace(crazyRegExp, writeImageTag);\n\n // normal cases\n text = text.replace(inlineRegExp, writeImageTag);\n\n // handle reference-style shortcuts: ![img text]\n text = text.replace(refShortcutRegExp, writeImageTag);\n\n text = globals.converter._dispatch('images.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('italicsAndBold', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);\n\n // it's faster to have 3 separate regexes for each case than have just one\n // because of backtracing, in some cases, it could lead to an exponential effect\n // called \"catastrophic backtrace\". Ominous!\n\n function parseInside (txt, left, right) {\n /*\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n */\n return left + txt + right;\n }\n\n // Parse underscores\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n text = text.replace(/\\b_(\\S[\\s\\S]*?)_\\b/g, function (wm, txt) {\n return parseInside (txt, '', '');\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/_([^\\s_][\\s\\S]*?)_/g, function (wm, m) {\n // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n // Now parse asterisks\n if (options.literalMidWordAsterisks) {\n text = text.replace(/([^*]|^)\\B\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*\\*(\\S[\\s\\S]*?)\\*\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n text = text.replace(/([^*]|^)\\B\\*(\\S[\\s\\S]*?)\\*\\B(?!\\*)/g, function (wm, lead, txt) {\n return parseInside (txt, lead + '', '');\n });\n } else {\n text = text.replace(/\\*\\*\\*(\\S[\\s\\S]*?)\\*\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*\\*(\\S[\\s\\S]*?)\\*\\*/g, function (wm, m) {\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n text = text.replace(/\\*([^\\s*][\\s\\S]*?)\\*/g, function (wm, m) {\n // !/^\\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)\n return (/\\S$/.test(m)) ? parseInside (m, '', '') : wm;\n });\n }\n\n\n text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Form HTML ordered (numbered) and unordered (bulleted) lists.\n */\nshowdown.subParser('lists', function (text, options, globals) {\n 'use strict';\n\n /**\n * Process the contents of a single ordered or unordered list, splitting it\n * into individual list items.\n * @param {string} listStr\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function processListItems (listStr, trimTrailing) {\n // The $g_list_level global keeps track of when we're inside a list.\n // Each time we enter a list, we increment it; when we leave a list,\n // we decrement. If it's zero, we're not in a list anymore.\n //\n // We do this because when we're not inside a list, we want to treat\n // something like this:\n //\n // I recommend upgrading to version\n // 8. Oops, now this line is treated\n // as a sub-list.\n //\n // As a single paragraph, despite the fact that the second line starts\n // with a digit-period-space sequence.\n //\n // Whereas when we're inside a list (or sub-list), that line will be\n // treated as the start of a sub-list. What a kludge, huh? This is\n // an aspect of Markdown's syntax that's hard to parse perfectly\n // without resorting to mind-reading. Perhaps the solution is to\n // change the syntax rules such that sub-lists must start with a\n // starting cardinal number; e.g. \"1.\" or \"a.\".\n globals.gListLevel++;\n\n // trim trailing blank lines:\n listStr = listStr.replace(/\\n{2,}$/, '\\n');\n\n // attacklab: add sentinel to emulate \\z\n listStr += '¨0';\n\n var rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0| {0,3}([*+-]|\\d+[.])[ \\t]+))/gm,\n isParagraphed = (/\\n[ \\t]*\\n(?!¨0)/.test(listStr));\n\n // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,\n // which is a syntax breaking change\n // activating this option reverts to old behavior\n if (options.disableForced4SpacesIndentedSublists) {\n rgx = /(\\n)?(^ {0,3})([*+-]|\\d+[.])[ \\t]+((\\[(x|X| )?])?[ \\t]*[^\\r]+?(\\n{1,2}))(?=\\n*(¨0|\\2([*+-]|\\d+[.])[ \\t]+))/gm;\n }\n\n listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {\n checked = (checked && checked.trim() !== '');\n\n var item = showdown.subParser('outdent')(m4, options, globals),\n bulletStyle = '';\n\n // Support for github tasklists\n if (taskbtn && options.tasklists) {\n bulletStyle = ' class=\"task-list-item\" style=\"list-style-type: none;\"';\n item = item.replace(/^[ \\t]*\\[(x|X| )?]/m, function () {\n var otp = '
  • a
  • \n // instead of:\n //
    • - - a
    \n // So, to prevent it, we will put a marker (¨A)in the beginning of the line\n // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser\n item = item.replace(/^([-*+]|\\d\\.)[ \\t]+[\\S\\n ]*/g, function (wm2) {\n return '¨A' + wm2;\n });\n\n // m1 - Leading line or\n // Has a double return (multi paragraph) or\n // Has sublist\n if (m1 || (item.search(/\\n{2,}/) > -1)) {\n item = showdown.subParser('githubCodeBlocks')(item, options, globals);\n item = showdown.subParser('blockGamut')(item, options, globals);\n } else {\n // Recursion for sub-lists:\n item = showdown.subParser('lists')(item, options, globals);\n item = item.replace(/\\n$/, ''); // chomp(item)\n item = showdown.subParser('hashHTMLBlocks')(item, options, globals);\n\n // Colapse double linebreaks\n item = item.replace(/\\n\\n+/g, '\\n\\n');\n if (isParagraphed) {\n item = showdown.subParser('paragraphs')(item, options, globals);\n } else {\n item = showdown.subParser('spanGamut')(item, options, globals);\n }\n }\n\n // now we need to remove the marker (¨A)\n item = item.replace('¨A', '');\n // we can finally wrap the line in list item tags\n item = '' + item + '\\n';\n\n return item;\n });\n\n // attacklab: strip sentinel\n listStr = listStr.replace(/¨0/g, '');\n\n globals.gListLevel--;\n\n if (trimTrailing) {\n listStr = listStr.replace(/\\s+$/, '');\n }\n\n return listStr;\n }\n\n function styleStartNumber (list, listType) {\n // check if ol and starts by a number different than 1\n if (listType === 'ol') {\n var res = list.match(/^ *(\\d+)\\./);\n if (res && res[1] !== '1') {\n return ' start=\"' + res[1] + '\"';\n }\n }\n return '';\n }\n\n /**\n * Check and parse consecutive lists (better fix for issue #142)\n * @param {string} list\n * @param {string} listType\n * @param {boolean} trimTrailing\n * @returns {string}\n */\n function parseConsecutiveLists (list, listType, trimTrailing) {\n // check if we caught 2 or more consecutive lists by mistake\n // we use the counterRgx, meaning if listType is UL we look for OL and vice versa\n var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\\d+\\.[ \\t]/gm : /^ {0,3}\\d+\\.[ \\t]/gm,\n ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \\t]/gm : /^ {0,3}[*+-][ \\t]/gm,\n counterRxg = (listType === 'ul') ? olRgx : ulRgx,\n result = '';\n\n if (list.search(counterRxg) !== -1) {\n (function parseCL (txt) {\n var pos = txt.search(counterRxg),\n style = styleStartNumber(list, listType);\n if (pos !== -1) {\n // slice\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\\n';\n\n // invert counterType and listType\n listType = (listType === 'ul') ? 'ol' : 'ul';\n counterRxg = (listType === 'ul') ? olRgx : ulRgx;\n\n //recurse\n parseCL(txt.slice(pos));\n } else {\n result += '\\n\\n<' + listType + style + '>\\n' + processListItems(txt, !!trimTrailing) + '\\n';\n }\n })(list);\n } else {\n var style = styleStartNumber(list, listType);\n result = '\\n\\n<' + listType + style + '>\\n' + processListItems(list, !!trimTrailing) + '\\n';\n }\n\n return result;\n }\n\n /** Start of list parsing **/\n text = globals.converter._dispatch('lists.before', text, options, globals);\n // add sentinel to hack around khtml/safari bug:\n // http://bugs.webkit.org/show_bug.cgi?id=11231\n text += '¨0';\n\n if (globals.gListLevel) {\n text = text.replace(/^(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, list, m2) {\n var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, true);\n }\n );\n } else {\n text = text.replace(/(\\n\\n|^\\n?)(( {0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(¨0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm,\n function (wholeMatch, m1, list, m3) {\n var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol';\n return parseConsecutiveLists(list, listType, false);\n }\n );\n }\n\n // strip sentinel\n text = text.replace(/¨0/, '');\n text = globals.converter._dispatch('lists.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Parse metadata at the top of the document\n */\nshowdown.subParser('metadata', function (text, options, globals) {\n 'use strict';\n\n if (!options.metadata) {\n return text;\n }\n\n text = globals.converter._dispatch('metadata.before', text, options, globals);\n\n function parseMetadataContents (content) {\n // raw is raw so it's not changed in any way\n globals.metadata.raw = content;\n\n // escape chars forbidden in html attributes\n // double quotes\n content = content\n // ampersand first\n .replace(/&/g, '&')\n // double quotes\n .replace(/\"/g, '"');\n\n content = content.replace(/\\n {4}/g, ' ');\n content.replace(/^([\\S ]+): +([\\s\\S]+?)$/gm, function (wm, key, value) {\n globals.metadata.parsed[key] = value;\n return '';\n });\n }\n\n text = text.replace(/^\\s*«««+(\\S*?)\\n([\\s\\S]+?)\\n»»»+\\n/, function (wholematch, format, content) {\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/^\\s*---+(\\S*?)\\n([\\s\\S]+?)\\n---+\\n/, function (wholematch, format, content) {\n if (format) {\n globals.metadata.format = format;\n }\n parseMetadataContents(content);\n return '¨M';\n });\n\n text = text.replace(/¨M/g, '');\n\n text = globals.converter._dispatch('metadata.after', text, options, globals);\n return text;\n});\n\r\n/**\n * Remove one level of line-leading tabs or spaces\n */\nshowdown.subParser('outdent', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('outdent.before', text, options, globals);\n\n // attacklab: hack around Konqueror 3.5.4 bug:\n // \"----------bug\".replace(/^-/g,\"\") == \"bug\"\n text = text.replace(/^(\\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width\n\n // attacklab: clean up hack\n text = text.replace(/¨0/g, '');\n\n text = globals.converter._dispatch('outdent.after', text, options, globals);\n return text;\n});\n\r\n/**\n *\n */\nshowdown.subParser('paragraphs', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('paragraphs.before', text, options, globals);\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n\n var grafs = text.split(/\\n{2,}/g),\n grafsOut = [],\n end = grafs.length; // Wrap

    tags\n\n for (var i = 0; i < end; i++) {\n var str = grafs[i];\n // if this is an HTML marker, copy it\n if (str.search(/¨(K|G)(\\d+)\\1/g) >= 0) {\n grafsOut.push(str);\n\n // test for presence of characters to prevent empty lines being parsed\n // as paragraphs (resulting in undesired extra empty paragraphs)\n } else if (str.search(/\\S/) >= 0) {\n str = showdown.subParser('spanGamut')(str, options, globals);\n str = str.replace(/^([ \\t]*)/g, '

    ');\n str += '

    ';\n grafsOut.push(str);\n }\n }\n\n /** Unhashify HTML blocks */\n end = grafsOut.length;\n for (i = 0; i < end; i++) {\n var blockText = '',\n grafsOutIt = grafsOut[i],\n codeFlag = false;\n // if this is a marker for an html block...\n // use RegExp.test instead of string.search because of QML bug\n while (/¨(K|G)(\\d+)\\1/.test(grafsOutIt)) {\n var delim = RegExp.$1,\n num = RegExp.$2;\n\n if (delim === 'K') {\n blockText = globals.gHtmlBlocks[num];\n } else {\n // we need to check if ghBlock is a false positive\n if (codeFlag) {\n // use encoded version of all text\n blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);\n } else {\n blockText = globals.ghCodeBlocks[num].codeblock;\n }\n }\n blockText = blockText.replace(/\\$/g, '$$$$'); // Escape any dollar signs\n\n grafsOutIt = grafsOutIt.replace(/(\\n\\n)?¨(K|G)\\d+\\2(\\n\\n)?/, blockText);\n // Check if grafsOutIt is a pre->code\n if (/^]*>\\s*]*>/.test(grafsOutIt)) {\n codeFlag = true;\n }\n }\n grafsOut[i] = grafsOutIt;\n }\n text = grafsOut.join('\\n');\n // Strip leading and trailing lines:\n text = text.replace(/^\\n+/g, '');\n text = text.replace(/\\n+$/g, '');\n return globals.converter._dispatch('paragraphs.after', text, options, globals);\n});\n\r\n/**\n * Run extension\n */\nshowdown.subParser('runExtension', function (ext, text, options, globals) {\n 'use strict';\n\n if (ext.filter) {\n text = ext.filter(text, globals.converter, options);\n\n } else if (ext.regex) {\n // TODO remove this when old extension loading mechanism is deprecated\n var re = ext.regex;\n if (!(re instanceof RegExp)) {\n re = new RegExp(re, 'g');\n }\n text = text.replace(re, ext.replace);\n }\n\n return text;\n});\n\r\n/**\n * These are all the transformations that occur *within* block-level\n * tags like paragraphs, headers, and list items.\n */\nshowdown.subParser('spanGamut', function (text, options, globals) {\n 'use strict';\n\n text = globals.converter._dispatch('spanGamut.before', text, options, globals);\n text = showdown.subParser('codeSpans')(text, options, globals);\n text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);\n text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);\n\n // Process anchor and image tags. Images must come first,\n // because ![foo][f] looks like an anchor.\n text = showdown.subParser('images')(text, options, globals);\n text = showdown.subParser('anchors')(text, options, globals);\n\n // Make links out of things like ``\n // Must come after anchors, because you can use < and >\n // delimiters in inline links like [this]().\n text = showdown.subParser('autoLinks')(text, options, globals);\n text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);\n text = showdown.subParser('emoji')(text, options, globals);\n text = showdown.subParser('underline')(text, options, globals);\n text = showdown.subParser('italicsAndBold')(text, options, globals);\n text = showdown.subParser('strikethrough')(text, options, globals);\n text = showdown.subParser('ellipsis')(text, options, globals);\n\n // we need to hash HTML tags inside spans\n text = showdown.subParser('hashHTMLSpans')(text, options, globals);\n\n // now we encode amps and angles\n text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);\n\n // Do hard breaks\n if (options.simpleLineBreaks) {\n // GFM style hard breaks\n // only add line breaks if the text does not contain a block (special case for lists)\n if (!/\\n\\n¨K/.test(text)) {\n text = text.replace(/\\n+/g, '
    \\n');\n }\n } else {\n // Vanilla hard breaks\n text = text.replace(/ +\\n/g, '
    \\n');\n }\n\n text = globals.converter._dispatch('spanGamut.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('strikethrough', function (text, options, globals) {\n 'use strict';\n\n function parseInside (txt) {\n if (options.simplifiedAutoLink) {\n txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);\n }\n return '' + txt + '';\n }\n\n if (options.strikethrough) {\n text = globals.converter._dispatch('strikethrough.before', text, options, globals);\n text = text.replace(/(?:~){2}([\\s\\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });\n text = globals.converter._dispatch('strikethrough.after', text, options, globals);\n }\n\n return text;\n});\n\r\n/**\n * Strips link definitions from text, stores the URLs and titles in\n * hash references.\n * Link defs are in the form: ^[id]: url \"optional title\"\n */\nshowdown.subParser('stripLinkDefinitions', function (text, options, globals) {\n 'use strict';\n\n var regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*\\s]+)>?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n+|(?=¨0))/gm,\n base64Regex = /^ {0,3}\\[(.+)]:[ \\t]*\\n?[ \\t]*?(?: =([*\\d]+[A-Za-z%]{0,4})x([*\\d]+[A-Za-z%]{0,4}))?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"|'(](.+?)[\"|')][ \\t]*)?(?:\\n\\n|(?=¨0)|(?=\\n\\[))/gm;\n\n // attacklab: sentinel workarounds for lack of \\A and \\Z, safari\\khtml bug\n text += '¨0';\n\n var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {\n linkId = linkId.toLowerCase();\n if (url.match(/^data:.+?\\/.+?;base64,/)) {\n // remove newlines\n globals.gUrls[linkId] = url.replace(/\\s/g, '');\n } else {\n globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive\n }\n\n if (blankLines) {\n // Oops, found blank lines, so it's not a title.\n // Put back the parenthetical statement we stole.\n return blankLines + title;\n\n } else {\n if (title) {\n globals.gTitles[linkId] = title.replace(/\"|'/g, '"');\n }\n if (options.parseImgDimensions && width && height) {\n globals.gDimensions[linkId] = {\n width: width,\n height: height\n };\n }\n }\n // Completely remove the definition from the text\n return '';\n };\n\n // first we try to find base64 link references\n text = text.replace(base64Regex, replaceFunc);\n\n text = text.replace(regex, replaceFunc);\n\n // attacklab: strip sentinel\n text = text.replace(/¨0/, '');\n\n return text;\n});\n\r\nshowdown.subParser('tables', function (text, options, globals) {\n 'use strict';\n\n if (!options.tables) {\n return text;\n }\n\n var tableRgx = /^ {0,3}\\|?.+\\|.+\\n {0,3}\\|?[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[\\s\\S]+?(?:\\n\\n|¨0)/gm,\n //singeColTblRgx = /^ {0,3}\\|.+\\|\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n(?: {0,3}\\|.+\\|\\n)+(?:\\n\\n|¨0)/gm;\n singeColTblRgx = /^ {0,3}\\|.+\\|[ \\t]*\\n {0,3}\\|[ \\t]*:?[ \\t]*(?:[-=]){2,}[ \\t]*:?[ \\t]*\\|[ \\t]*\\n( {0,3}\\|.+\\|[ \\t]*\\n)*(?:\\n|¨0)/gm;\n\n function parseStyles (sLine) {\n if (/^:[ \\t]*--*$/.test(sLine)) {\n return ' style=\"text-align:left;\"';\n } else if (/^--*[ \\t]*:[ \\t]*$/.test(sLine)) {\n return ' style=\"text-align:right;\"';\n } else if (/^:[ \\t]*--*[ \\t]*:$/.test(sLine)) {\n return ' style=\"text-align:center;\"';\n } else {\n return '';\n }\n }\n\n function parseHeaders (header, style) {\n var id = '';\n header = header.trim();\n // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility\n if (options.tablesHeaderId || options.tableHeaderId) {\n id = ' id=\"' + header.replace(/ /g, '_').toLowerCase() + '\"';\n }\n header = showdown.subParser('spanGamut')(header, options, globals);\n\n return '' + header + '\\n';\n }\n\n function parseCells (cell, style) {\n var subText = showdown.subParser('spanGamut')(cell, options, globals);\n return '' + subText + '\\n';\n }\n\n function buildTable (headers, cells) {\n var tb = '\\n\\n\\n',\n tblLgn = headers.length;\n\n for (var i = 0; i < tblLgn; ++i) {\n tb += headers[i];\n }\n tb += '\\n\\n\\n';\n\n for (i = 0; i < cells.length; ++i) {\n tb += '\\n';\n for (var ii = 0; ii < tblLgn; ++ii) {\n tb += cells[i][ii];\n }\n tb += '\\n';\n }\n tb += '\\n
    \\n';\n return tb;\n }\n\n function parseTable (rawTable) {\n var i, tableLines = rawTable.split('\\n');\n\n for (i = 0; i < tableLines.length; ++i) {\n // strip wrong first and last column if wrapped tables are used\n if (/^ {0,3}\\|/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/^ {0,3}\\|/, '');\n }\n if (/\\|[ \\t]*$/.test(tableLines[i])) {\n tableLines[i] = tableLines[i].replace(/\\|[ \\t]*$/, '');\n }\n // parse code spans first, but we only support one line code spans\n tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);\n }\n\n var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}),\n rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}),\n rawCells = [],\n headers = [],\n styles = [],\n cells = [];\n\n tableLines.shift();\n tableLines.shift();\n\n for (i = 0; i < tableLines.length; ++i) {\n if (tableLines[i].trim() === '') {\n continue;\n }\n rawCells.push(\n tableLines[i]\n .split('|')\n .map(function (s) {\n return s.trim();\n })\n );\n }\n\n if (rawHeaders.length < rawStyles.length) {\n return rawTable;\n }\n\n for (i = 0; i < rawStyles.length; ++i) {\n styles.push(parseStyles(rawStyles[i]));\n }\n\n for (i = 0; i < rawHeaders.length; ++i) {\n if (showdown.helper.isUndefined(styles[i])) {\n styles[i] = '';\n }\n headers.push(parseHeaders(rawHeaders[i], styles[i]));\n }\n\n for (i = 0; i < rawCells.length; ++i) {\n var row = [];\n for (var ii = 0; ii < headers.length; ++ii) {\n if (showdown.helper.isUndefined(rawCells[i][ii])) {\n\n }\n row.push(parseCells(rawCells[i][ii], styles[ii]));\n }\n cells.push(row);\n }\n\n return buildTable(headers, cells);\n }\n\n text = globals.converter._dispatch('tables.before', text, options, globals);\n\n // find escaped pipe characters\n text = text.replace(/\\\\(\\|)/g, showdown.helper.escapeCharactersCallback);\n\n // parse multi column tables\n text = text.replace(tableRgx, parseTable);\n\n // parse one column tables\n text = text.replace(singeColTblRgx, parseTable);\n\n text = globals.converter._dispatch('tables.after', text, options, globals);\n\n return text;\n});\n\r\nshowdown.subParser('underline', function (text, options, globals) {\n 'use strict';\n\n if (!options.underline) {\n return text;\n }\n\n text = globals.converter._dispatch('underline.before', text, options, globals);\n\n if (options.literalMidWordUnderscores) {\n text = text.replace(/\\b___(\\S[\\s\\S]*?)___\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n text = text.replace(/\\b__(\\S[\\s\\S]*?)__\\b/g, function (wm, txt) {\n return '' + txt + '';\n });\n } else {\n text = text.replace(/___(\\S[\\s\\S]*?)___/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n text = text.replace(/__(\\S[\\s\\S]*?)__/g, function (wm, m) {\n return (/\\S$/.test(m)) ? '' + m + '' : wm;\n });\n }\n\n // escape remaining underscores to prevent them being parsed by italic and bold\n text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);\n\n text = globals.converter._dispatch('underline.after', text, options, globals);\n\n return text;\n});\n\r\n/**\n * Swap back in all the special characters we've hidden.\n */\nshowdown.subParser('unescapeSpecialChars', function (text, options, globals) {\n 'use strict';\n text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);\n\n text = text.replace(/¨E(\\d+)E/g, function (wholeMatch, m1) {\n var charCodeToReplace = parseInt(m1);\n return String.fromCharCode(charCodeToReplace);\n });\n\n text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);\n return text;\n});\n\r\nshowdown.subParser('makeMarkdown.blockquote', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);\n\n if (innerTxt === '') {\n continue;\n }\n txt += innerTxt;\n }\n }\n // cleanup\n txt = txt.trim();\n txt = '> ' + txt.split('\\n').join('\\n> ');\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.codeBlock', function (node, globals) {\n 'use strict';\n\n var lang = node.getAttribute('language'),\n num = node.getAttribute('precodenum');\n return '```' + lang + '\\n' + globals.preList[num] + '\\n```';\n});\n\r\nshowdown.subParser('makeMarkdown.codeSpan', function (node) {\n 'use strict';\n\n return '`' + node.innerHTML + '`';\n});\n\r\nshowdown.subParser('makeMarkdown.emphasis', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '*';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '*';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {\n 'use strict';\n\n var headerMark = new Array(headerLevel + 1).join('#'),\n txt = '';\n\n if (node.hasChildNodes()) {\n txt = headerMark + ' ';\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.hr', function () {\n 'use strict';\n\n return '---';\n});\n\r\nshowdown.subParser('makeMarkdown.image', function (node) {\n 'use strict';\n\n var txt = '';\n if (node.hasAttribute('src')) {\n txt += '![' + node.getAttribute('alt') + '](';\n txt += '<' + node.getAttribute('src') + '>';\n if (node.hasAttribute('width') && node.hasAttribute('height')) {\n txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');\n }\n\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.links', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes() && node.hasAttribute('href')) {\n var children = node.childNodes,\n childrenLength = children.length;\n txt = '[';\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '](';\n txt += '<' + node.getAttribute('href') + '>';\n if (node.hasAttribute('title')) {\n txt += ' \"' + node.getAttribute('title') + '\"';\n }\n txt += ')';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.list', function (node, globals, type) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var listItems = node.childNodes,\n listItemsLenght = listItems.length,\n listNum = node.getAttribute('start') || 1;\n\n for (var i = 0; i < listItemsLenght; ++i) {\n if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {\n continue;\n }\n\n // define the bullet to use in list\n var bullet = '';\n if (type === 'ol') {\n bullet = listNum.toString() + '. ';\n } else {\n bullet = '- ';\n }\n\n // parse list item\n txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);\n ++listNum;\n }\n\n // add comment at the end to prevent consecutive lists to be parsed as one\n txt += '\\n\\n';\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.listItem', function (node, globals) {\n 'use strict';\n\n var listItemTxt = '';\n\n var children = node.childNodes,\n childrenLenght = children.length;\n\n for (var i = 0; i < childrenLenght; ++i) {\n listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n // if it's only one liner, we need to add a newline at the end\n if (!/\\n$/.test(listItemTxt)) {\n listItemTxt += '\\n';\n } else {\n // it's multiparagraph, so we need to indent\n listItemTxt = listItemTxt\n .split('\\n')\n .join('\\n ')\n .replace(/^ {4}$/gm, '')\n .replace(/\\n\\n+/g, '\\n\\n');\n }\n\n return listItemTxt;\n});\n\r\n\n\nshowdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {\n 'use strict';\n\n spansOnly = spansOnly || false;\n\n var txt = '';\n\n // edge case of text without wrapper paragraph\n if (node.nodeType === 3) {\n return showdown.subParser('makeMarkdown.txt')(node, globals);\n }\n\n // HTML comment\n if (node.nodeType === 8) {\n return '\\n\\n';\n }\n\n // process only node elements\n if (node.nodeType !== 1) {\n return '';\n }\n\n var tagName = node.tagName.toLowerCase();\n\n switch (tagName) {\n\n //\n // BLOCKS\n //\n case 'h1':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\\n\\n'; }\n break;\n case 'h2':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\\n\\n'; }\n break;\n case 'h3':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\\n\\n'; }\n break;\n case 'h4':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\\n\\n'; }\n break;\n case 'h5':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\\n\\n'; }\n break;\n case 'h6':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\\n\\n'; }\n break;\n\n case 'p':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\\n\\n'; }\n break;\n\n case 'blockquote':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\\n\\n'; }\n break;\n\n case 'hr':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\\n\\n'; }\n break;\n\n case 'ol':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\\n\\n'; }\n break;\n\n case 'ul':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\\n\\n'; }\n break;\n\n case 'precode':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\\n\\n'; }\n break;\n\n case 'pre':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\\n\\n'; }\n break;\n\n case 'table':\n if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\\n\\n'; }\n break;\n\n //\n // SPANS\n //\n case 'code':\n txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);\n break;\n\n case 'em':\n case 'i':\n txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);\n break;\n\n case 'strong':\n case 'b':\n txt = showdown.subParser('makeMarkdown.strong')(node, globals);\n break;\n\n case 'del':\n txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);\n break;\n\n case 'a':\n txt = showdown.subParser('makeMarkdown.links')(node, globals);\n break;\n\n case 'img':\n txt = showdown.subParser('makeMarkdown.image')(node, globals);\n break;\n\n default:\n txt = node.outerHTML + '\\n\\n';\n }\n\n // common normalization\n // TODO eventually\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.paragraph', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n }\n\n // some text normalization\n txt = txt.trim();\n\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.pre', function (node, globals) {\n 'use strict';\n\n var num = node.getAttribute('prenum');\n return '
    ' + globals.preList[num] + '
    ';\n});\n\r\nshowdown.subParser('makeMarkdown.strikethrough', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '~~';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '~~';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.strong', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (node.hasChildNodes()) {\n txt += '**';\n var children = node.childNodes,\n childrenLength = children.length;\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals);\n }\n txt += '**';\n }\n return txt;\n});\n\r\nshowdown.subParser('makeMarkdown.table', function (node, globals) {\n 'use strict';\n\n var txt = '',\n tableArray = [[], []],\n headings = node.querySelectorAll('thead>tr>th'),\n rows = node.querySelectorAll('tbody>tr'),\n i, ii;\n for (i = 0; i < headings.length; ++i) {\n var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),\n allign = '---';\n\n if (headings[i].hasAttribute('style')) {\n var style = headings[i].getAttribute('style').toLowerCase().replace(/\\s/g, '');\n switch (style) {\n case 'text-align:left;':\n allign = ':---';\n break;\n case 'text-align:right;':\n allign = '---:';\n break;\n case 'text-align:center;':\n allign = ':---:';\n break;\n }\n }\n tableArray[0][i] = headContent.trim();\n tableArray[1][i] = allign;\n }\n\n for (i = 0; i < rows.length; ++i) {\n var r = tableArray.push([]) - 1,\n cols = rows[i].getElementsByTagName('td');\n\n for (ii = 0; ii < headings.length; ++ii) {\n var cellContent = ' ';\n if (typeof cols[ii] !== 'undefined') {\n cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);\n }\n tableArray[r].push(cellContent);\n }\n }\n\n var cellSpacesCount = 3;\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n var strLen = tableArray[i][ii].length;\n if (strLen > cellSpacesCount) {\n cellSpacesCount = strLen;\n }\n }\n }\n\n for (i = 0; i < tableArray.length; ++i) {\n for (ii = 0; ii < tableArray[i].length; ++ii) {\n if (i === 1) {\n if (tableArray[i][ii].slice(-1) === ':') {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');\n }\n } else {\n tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);\n }\n }\n txt += '| ' + tableArray[i].join(' | ') + ' |\\n';\n }\n\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.tableCell', function (node, globals) {\n 'use strict';\n\n var txt = '';\n if (!node.hasChildNodes()) {\n return '';\n }\n var children = node.childNodes,\n childrenLength = children.length;\n\n for (var i = 0; i < childrenLength; ++i) {\n txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);\n }\n return txt.trim();\n});\n\r\nshowdown.subParser('makeMarkdown.txt', function (node) {\n 'use strict';\n\n var txt = node.nodeValue;\n\n // multiple spaces are collapsed\n txt = txt.replace(/ +/g, ' ');\n\n // replace the custom ¨NBSP; with a space\n txt = txt.replace(/¨NBSP;/g, ' ');\n\n // \", <, > and & should replace escaped html entities\n txt = showdown.helper.unescapeHTMLEntities(txt);\n\n // escape markdown magic characters\n // emphasis, strong and strikethrough - can appear everywhere\n // we also escape pipe (|) because of tables\n // and escape ` because of code blocks and spans\n txt = txt.replace(/([*_~|`])/g, '\\\\$1');\n\n // escape > because of blockquotes\n txt = txt.replace(/^(\\s*)>/g, '\\\\$1>');\n\n // hash character, only troublesome at the beginning of a line because of headers\n txt = txt.replace(/^#/gm, '\\\\#');\n\n // horizontal rules\n txt = txt.replace(/^(\\s*)([-=]{3,})(\\s*)$/, '$1\\\\$2$3');\n\n // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer\n txt = txt.replace(/^( {0,3}\\d+)\\./gm, '$1\\\\.');\n\n // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)\n txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\\\$2');\n\n // images and links, ] followed by ( is problematic, so we escape it\n txt = txt.replace(/]([\\s]*)\\(/g, '\\\\]$1\\\\(');\n\n // reference URIs must also be escaped\n txt = txt.replace(/^ {0,3}\\[([\\S \\t]*?)]:/gm, '\\\\[$1]:');\n\n return txt;\n});\n\r\nvar root = this;\n\n// AMD Loader\nif (typeof define === 'function' && define.amd) {\n define(function () {\n 'use strict';\n return showdown;\n });\n\n// CommonJS/nodeJS Loader\n} else if (typeof module !== 'undefined' && module.exports) {\n module.exports = showdown;\n\n// Regular Browser loader\n} else {\n root.showdown = showdown;\n}\n}).call(this);\r\n\n//# sourceMappingURL=showdown.js.map\r\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(true);\n// Module\nexports.push([module.id, \".mde-header {\\n flex-shrink: 0;\\n display: flex;\\n flex-wrap: wrap;\\n align-items: stretch;\\n border-bottom: 1px solid #c8ccd0;\\n border-radius: 2px 2px 0 0;\\n background: #f9f9f9; }\\n .mde-header .mde-tabs {\\n display: flex;\\n flex-direction: row; }\\n .mde-header .mde-tabs button {\\n border-radius: 2px;\\n margin: 6px 3px;\\n background-color: transparent;\\n border: 1px solid transparent;\\n cursor: pointer; }\\n .mde-header .mde-tabs button:first-child {\\n margin-left: 6px; }\\n .mde-header .mde-tabs button.selected {\\n border: 1px solid #c8ccd0; }\\n .mde-header .svg-icon {\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n font-size: inherit;\\n overflow: visible;\\n vertical-align: -.125em; }\\n .mde-header ul.mde-header-group {\\n margin: 0;\\n padding: 10px;\\n list-style: none;\\n display: flex;\\n flex-wrap: nowrap; }\\n .mde-header ul.mde-header-group.hidden {\\n visibility: hidden; }\\n .mde-header ul.mde-header-group li.mde-header-item {\\n display: inline-block;\\n position: relative;\\n margin: 0 4px; }\\n .mde-header ul.mde-header-group li.mde-header-item button {\\n text-align: left;\\n cursor: pointer;\\n height: 22px;\\n padding: 4px;\\n margin: 0;\\n border: none;\\n background: none;\\n color: #242729; }\\n\\n@keyframes tooltip-appear {\\n from {\\n opacity: 0; }\\n to {\\n opacity: 1; } }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000001;\\n width: 0;\\n height: 0;\\n color: rgba(0, 0, 0, 0.8);\\n pointer-events: none;\\n content: \\\"\\\";\\n border: 5px solid transparent;\\n top: -5px;\\n right: 50%;\\n bottom: auto;\\n margin-right: -5px;\\n border-top-color: rgba(0, 0, 0, 0.8); }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n font-size: 11px;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000000;\\n padding: 5px 8px;\\n color: #fff;\\n pointer-events: none;\\n content: attr(aria-label);\\n background: rgba(0, 0, 0, 0.8);\\n border-radius: 3px;\\n right: 50%;\\n bottom: 100%;\\n transform: translateX(50%);\\n margin-bottom: 5px;\\n white-space: nowrap; }\\n\\n.mde-textarea-wrapper {\\n position: relative; }\\n .mde-textarea-wrapper textarea.mde-text {\\n width: 100%;\\n border: 0;\\n padding: 10px;\\n vertical-align: top;\\n resize: none;\\n overflow-y: auto; }\\n\\n.mde-preview .mde-preview-content {\\n padding: 10px; }\\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\\n margin-top: 0;\\n margin-bottom: 16px; }\\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\\n margin-top: 24px;\\n margin-bottom: 16px;\\n font-weight: 600;\\n line-height: 1.25;\\n border-bottom: 1px solid #eee;\\n padding-bottom: 0.3em; }\\n .mde-preview .mde-preview-content h1 {\\n font-size: 1.6em; }\\n .mde-preview .mde-preview-content h2 {\\n font-size: 1.4em; }\\n .mde-preview .mde-preview-content h3 {\\n font-size: 1.2em; }\\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\\n padding-left: 2em; }\\n .mde-preview .mde-preview-content blockquote {\\n margin-left: 0;\\n padding: 0 1em;\\n color: #777;\\n border-left: 0.25em solid #ddd; }\\n .mde-preview .mde-preview-content blockquote > :first-child {\\n margin-top: 0; }\\n .mde-preview .mde-preview-content blockquote > :last-child {\\n margin-bottom: 0; }\\n .mde-preview .mde-preview-content code {\\n padding: 0.2em 0 0.2em 0;\\n margin: 0;\\n font-size: 90%;\\n background-color: rgba(0, 0, 0, 0.04);\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\\n letter-spacing: -0.2em;\\n content: \\\"\\\\00a0\\\"; }\\n .mde-preview .mde-preview-content pre {\\n padding: 16px;\\n overflow: auto;\\n font-size: 85%;\\n line-height: 1.45;\\n background-color: #f7f7f7;\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content pre code {\\n display: inline;\\n padding: 0;\\n margin: 0;\\n overflow: visible;\\n line-height: inherit;\\n word-wrap: normal;\\n background-color: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\\n content: none; }\\n .mde-preview .mde-preview-content pre > code {\\n padding: 0;\\n margin: 0;\\n font-size: 100%;\\n word-break: normal;\\n white-space: pre;\\n background: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content a {\\n color: #4078c0;\\n text-decoration: none; }\\n .mde-preview .mde-preview-content a:hover {\\n text-decoration: underline; }\\n .mde-preview .mde-preview-content > *:first-child {\\n margin-top: 0 !important; }\\n .mde-preview .mde-preview-content > *:last-child {\\n margin-bottom: 0 !important; }\\n .mde-preview .mde-preview-content::after {\\n display: table;\\n clear: both;\\n content: \\\"\\\"; }\\n .mde-preview .mde-preview-content table {\\n display: block;\\n width: 100%;\\n border-spacing: 0;\\n border-collapse: collapse; }\\n .mde-preview .mde-preview-content table thead th {\\n font-weight: bold; }\\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\\n padding: 6px 13px;\\n border: 1px solid #c8ccd0; }\\n\\n.react-mde {\\n border: 1px solid #c8ccd0;\\n border-radius: 2px; }\\n .react-mde * {\\n box-sizing: border-box; }\\n .react-mde .grip {\\n border-top: 1px solid #c8ccd0;\\n background-color: #f9f9f9;\\n text-align: center;\\n height: 10px;\\n color: black;\\n cursor: s-resize; }\\n .react-mde .grip .icon {\\n height: 10px; }\\n .react-mde .invisible {\\n display: none; }\\n\\nul.mde-suggestions {\\n position: absolute;\\n min-width: 180px;\\n padding: 0;\\n margin: 20px 0 0;\\n list-style: none;\\n cursor: pointer;\\n background: #fff;\\n border: 1px solid #c8ccd0;\\n border-radius: 3px;\\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\\n ul.mde-suggestions li {\\n padding: 4px 8px;\\n border-bottom: 1px solid #e1e4e8; }\\n ul.mde-suggestions li:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n ul.mde-suggestions li:last-child {\\n border-bottom-right-radius: 2px;\\n border-bottom-left-radius: 2px; }\\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\\n color: white;\\n background-color: #0366d6; }\\n\", \"\",{\"version\":3,\"sources\":[\"react-mde-all.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,cAAc;EACd,aAAa;EACb,eAAe;EACf,oBAAoB;EACpB,gCAAgC;EAChC,0BAA0B;EAC1B,mBAAmB,EAAE;EACrB;IACE,aAAa;IACb,mBAAmB,EAAE;IACrB;MACE,kBAAkB;MAClB,eAAe;MACf,6BAA6B;MAC7B,6BAA6B;MAC7B,eAAe,EAAE;MACjB;QACE,gBAAgB,EAAE;MACpB;QACE,yBAAyB,EAAE;EACjC;IACE,UAAU;IACV,WAAW;IACX,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB,EAAE;EAC3B;IACE,SAAS;IACT,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,iBAAiB,EAAE;IACnB;MACE,kBAAkB,EAAE;IACtB;MACE,qBAAqB;MACrB,kBAAkB;MAClB,aAAa,EAAE;MACf;QACE,gBAAgB;QAChB,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,cAAc,EAAE;;AAExB;EACE;IACE,UAAU,EAAE;EACd;IACE,UAAU,EAAE,EAAE;QACV;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,QAAQ;UACR,SAAS;UACT,yBAAyB;UACzB,oBAAoB;UACpB,WAAW;UACX,6BAA6B;UAC7B,SAAS;UACT,UAAU;UACV,YAAY;UACZ,kBAAkB;UAClB,oCAAoC,EAAE;QACxC;UACE,8BAA8B;UAC9B,wBAAwB;UACxB,qBAAqB;UACrB,6BAA6B;UAC7B,eAAe;UACf,UAAU;UACV,kBAAkB;UAClB,gBAAgB;UAChB,gBAAgB;UAChB,WAAW;UACX,oBAAoB;UACpB,yBAAyB;UACzB,8BAA8B;UAC9B,kBAAkB;UAClB,UAAU;UACV,YAAY;UACZ,0BAA0B;UAC1B,kBAAkB;UAClB,mBAAmB,EAAE;;AAE/B;EACE,kBAAkB,EAAE;EACpB;IACE,WAAW;IACX,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,gBAAgB,EAAE;;AAEtB;EACE,aAAa,EAAE;EACf;IACE,aAAa;IACb,mBAAmB,EAAE;EACvB;IACE,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,iBAAiB;IACjB,6BAA6B;IAC7B,qBAAqB,EAAE;EACzB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,gBAAgB,EAAE;EACpB;IACE,iBAAiB,EAAE;EACrB;IACE,cAAc;IACd,cAAc;IACd,WAAW;IACX,8BAA8B,EAAE;IAChC;MACE,aAAa,EAAE;IACjB;MACE,gBAAgB,EAAE;EACtB;IACE,wBAAwB;IACxB,SAAS;IACT,cAAc;IACd,qCAAqC;IACrC,kBAAkB,EAAE;IACpB;MACE,sBAAsB;MACtB,gBAAgB,EAAE;EACtB;IACE,aAAa;IACb,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,yBAAyB;IACzB,kBAAkB,EAAE;IACpB;MACE,eAAe;MACf,UAAU;MACV,SAAS;MACT,iBAAiB;MACjB,oBAAoB;MACpB,iBAAiB;MACjB,6BAA6B;MAC7B,SAAS,EAAE;MACX;QACE,aAAa,EAAE;IACnB;MACE,UAAU;MACV,SAAS;MACT,eAAe;MACf,kBAAkB;MAClB,gBAAgB;MAChB,uBAAuB;MACvB,SAAS,EAAE;EACf;IACE,cAAc;IACd,qBAAqB,EAAE;IACvB;MACE,0BAA0B,EAAE;EAChC;IACE,wBAAwB,EAAE;EAC5B;IACE,2BAA2B,EAAE;EAC/B;IACE,cAAc;IACd,WAAW;IACX,WAAW,EAAE;EACf;IACE,cAAc;IACd,WAAW;IACX,iBAAiB;IACjB,yBAAyB,EAAE;IAC3B;MACE,iBAAiB,EAAE;IACrB;MACE,iBAAiB;MACjB,yBAAyB,EAAE;;AAEjC;EACE,yBAAyB;EACzB,kBAAkB,EAAE;EACpB;IACE,sBAAsB,EAAE;EAC1B;IACE,6BAA6B;IAC7B,yBAAyB;IACzB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,gBAAgB,EAAE;IAClB;MACE,YAAY,EAAE;EAClB;IACE,aAAa,EAAE;;AAEnB;EACE,kBAAkB;EAClB,gBAAgB;EAChB,UAAU;EACV,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,4CAA4C,EAAE;EAC9C;IACE,gBAAgB;IAChB,gCAAgC,EAAE;IAClC;MACE,2BAA2B;MAC3B,4BAA4B,EAAE;IAChC;MACE,+BAA+B;MAC/B,8BAA8B,EAAE;IAClC;MACE,YAAY;MACZ,yBAAyB,EAAE\",\"file\":\"react-mde-all.css\",\"sourcesContent\":[\".mde-header {\\n flex-shrink: 0;\\n display: flex;\\n flex-wrap: wrap;\\n align-items: stretch;\\n border-bottom: 1px solid #c8ccd0;\\n border-radius: 2px 2px 0 0;\\n background: #f9f9f9; }\\n .mde-header .mde-tabs {\\n display: flex;\\n flex-direction: row; }\\n .mde-header .mde-tabs button {\\n border-radius: 2px;\\n margin: 6px 3px;\\n background-color: transparent;\\n border: 1px solid transparent;\\n cursor: pointer; }\\n .mde-header .mde-tabs button:first-child {\\n margin-left: 6px; }\\n .mde-header .mde-tabs button.selected {\\n border: 1px solid #c8ccd0; }\\n .mde-header .svg-icon {\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n font-size: inherit;\\n overflow: visible;\\n vertical-align: -.125em; }\\n .mde-header ul.mde-header-group {\\n margin: 0;\\n padding: 10px;\\n list-style: none;\\n display: flex;\\n flex-wrap: nowrap; }\\n .mde-header ul.mde-header-group.hidden {\\n visibility: hidden; }\\n .mde-header ul.mde-header-group li.mde-header-item {\\n display: inline-block;\\n position: relative;\\n margin: 0 4px; }\\n .mde-header ul.mde-header-group li.mde-header-item button {\\n text-align: left;\\n cursor: pointer;\\n height: 22px;\\n padding: 4px;\\n margin: 0;\\n border: none;\\n background: none;\\n color: #242729; }\\n\\n@keyframes tooltip-appear {\\n from {\\n opacity: 0; }\\n to {\\n opacity: 1; } }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::before {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000001;\\n width: 0;\\n height: 0;\\n color: rgba(0, 0, 0, 0.8);\\n pointer-events: none;\\n content: \\\"\\\";\\n border: 5px solid transparent;\\n top: -5px;\\n right: 50%;\\n bottom: auto;\\n margin-right: -5px;\\n border-top-color: rgba(0, 0, 0, 0.8); }\\n .mde-header ul.mde-header-group li.mde-header-item button.tooltipped:hover::after {\\n animation-name: tooltip-appear;\\n animation-duration: 0.2s;\\n animation-delay: 0.5s;\\n animation-fill-mode: forwards;\\n font-size: 11px;\\n opacity: 0;\\n position: absolute;\\n z-index: 1000000;\\n padding: 5px 8px;\\n color: #fff;\\n pointer-events: none;\\n content: attr(aria-label);\\n background: rgba(0, 0, 0, 0.8);\\n border-radius: 3px;\\n right: 50%;\\n bottom: 100%;\\n transform: translateX(50%);\\n margin-bottom: 5px;\\n white-space: nowrap; }\\n\\n.mde-textarea-wrapper {\\n position: relative; }\\n .mde-textarea-wrapper textarea.mde-text {\\n width: 100%;\\n border: 0;\\n padding: 10px;\\n vertical-align: top;\\n resize: none;\\n overflow-y: auto; }\\n\\n.mde-preview .mde-preview-content {\\n padding: 10px; }\\n .mde-preview .mde-preview-content p, .mde-preview .mde-preview-content blockquote, .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol, .mde-preview .mde-preview-content dl, .mde-preview .mde-preview-content table, .mde-preview .mde-preview-content pre {\\n margin-top: 0;\\n margin-bottom: 16px; }\\n .mde-preview .mde-preview-content h1, .mde-preview .mde-preview-content h2, .mde-preview .mde-preview-content h3 {\\n margin-top: 24px;\\n margin-bottom: 16px;\\n font-weight: 600;\\n line-height: 1.25;\\n border-bottom: 1px solid #eee;\\n padding-bottom: 0.3em; }\\n .mde-preview .mde-preview-content h1 {\\n font-size: 1.6em; }\\n .mde-preview .mde-preview-content h2 {\\n font-size: 1.4em; }\\n .mde-preview .mde-preview-content h3 {\\n font-size: 1.2em; }\\n .mde-preview .mde-preview-content ul, .mde-preview .mde-preview-content ol {\\n padding-left: 2em; }\\n .mde-preview .mde-preview-content blockquote {\\n margin-left: 0;\\n padding: 0 1em;\\n color: #777;\\n border-left: 0.25em solid #ddd; }\\n .mde-preview .mde-preview-content blockquote > :first-child {\\n margin-top: 0; }\\n .mde-preview .mde-preview-content blockquote > :last-child {\\n margin-bottom: 0; }\\n .mde-preview .mde-preview-content code {\\n padding: 0.2em 0 0.2em 0;\\n margin: 0;\\n font-size: 90%;\\n background-color: rgba(0, 0, 0, 0.04);\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content code::before, .mde-preview .mde-preview-content code::after {\\n letter-spacing: -0.2em;\\n content: \\\"\\\\00a0\\\"; }\\n .mde-preview .mde-preview-content pre {\\n padding: 16px;\\n overflow: auto;\\n font-size: 85%;\\n line-height: 1.45;\\n background-color: #f7f7f7;\\n border-radius: 3px; }\\n .mde-preview .mde-preview-content pre code {\\n display: inline;\\n padding: 0;\\n margin: 0;\\n overflow: visible;\\n line-height: inherit;\\n word-wrap: normal;\\n background-color: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content pre code::before, .mde-preview .mde-preview-content pre code::after {\\n content: none; }\\n .mde-preview .mde-preview-content pre > code {\\n padding: 0;\\n margin: 0;\\n font-size: 100%;\\n word-break: normal;\\n white-space: pre;\\n background: transparent;\\n border: 0; }\\n .mde-preview .mde-preview-content a {\\n color: #4078c0;\\n text-decoration: none; }\\n .mde-preview .mde-preview-content a:hover {\\n text-decoration: underline; }\\n .mde-preview .mde-preview-content > *:first-child {\\n margin-top: 0 !important; }\\n .mde-preview .mde-preview-content > *:last-child {\\n margin-bottom: 0 !important; }\\n .mde-preview .mde-preview-content::after {\\n display: table;\\n clear: both;\\n content: \\\"\\\"; }\\n .mde-preview .mde-preview-content table {\\n display: block;\\n width: 100%;\\n border-spacing: 0;\\n border-collapse: collapse; }\\n .mde-preview .mde-preview-content table thead th {\\n font-weight: bold; }\\n .mde-preview .mde-preview-content table th, .mde-preview .mde-preview-content table td {\\n padding: 6px 13px;\\n border: 1px solid #c8ccd0; }\\n\\n.react-mde {\\n border: 1px solid #c8ccd0;\\n border-radius: 2px; }\\n .react-mde * {\\n box-sizing: border-box; }\\n .react-mde .grip {\\n border-top: 1px solid #c8ccd0;\\n background-color: #f9f9f9;\\n text-align: center;\\n height: 10px;\\n color: black;\\n cursor: s-resize; }\\n .react-mde .grip .icon {\\n height: 10px; }\\n .react-mde .invisible {\\n display: none; }\\n\\nul.mde-suggestions {\\n position: absolute;\\n min-width: 180px;\\n padding: 0;\\n margin: 20px 0 0;\\n list-style: none;\\n cursor: pointer;\\n background: #fff;\\n border: 1px solid #c8ccd0;\\n border-radius: 3px;\\n box-shadow: 0 1px 5px rgba(27, 31, 35, 0.15); }\\n ul.mde-suggestions li {\\n padding: 4px 8px;\\n border-bottom: 1px solid #e1e4e8; }\\n ul.mde-suggestions li:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n ul.mde-suggestions li:last-child {\\n border-bottom-right-radius: 2px;\\n border-bottom-left-radius: 2px; }\\n ul.mde-suggestions li:hover, ul.mde-suggestions li[aria-selected=true] {\\n color: white;\\n background-color: #0366d6; }\\n\"]}]);\n// Exports\nmodule.exports = exports;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA,SAMA;AACA;AACA;AACA;;;;;;;;;;;;ACthKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/kibana-reports/target/public/1.plugin.js b/kibana-reports/target/public/1.plugin.js index 2ee0ea46..a0efa9d5 100644 --- a/kibana-reports/target/public/1.plugin.js +++ b/kibana-reports/target/public/1.plugin.js @@ -1,9 +1,9 @@ (window["opendistro_kibana_reports_bundle_jsonpfunction"] = window["opendistro_kibana_reports_bundle_jsonpfunction"] || []).push([[1],{ -/***/ "./public/application.tsx": -/*!********************************!*\ - !*** ./public/application.tsx ***! - \********************************/ +/***/ "../../.kibana-reports/kibana-reports/public/application.tsx": +/*!*******************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/application.tsx ***! + \*******************************************************************************************************/ /*! exports provided: renderApp */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -14,7 +14,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _components_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/app */ "./public/components/app.tsx"); +/* harmony import */ var _components_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/app */ "../../.kibana-reports/kibana-reports/public/components/app.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -54,10 +54,10 @@ const renderApp = ({ /***/ }), -/***/ "./public/components/app.tsx": -/*!***********************************!*\ - !*** ./public/components/app.tsx ***! - \***********************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/app.tsx": +/*!**********************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/app.tsx ***! + \**********************************************************************************************************/ /*! exports provided: OpendistroKibanaReportsApp */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -72,11 +72,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _report_definitions_create_create_report_definition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./report_definitions/create/create_report_definition */ "./public/components/report_definitions/create/create_report_definition.tsx"); -/* harmony import */ var _main_main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./main/main */ "./public/components/main/main.tsx"); -/* harmony import */ var _main_report_details_report_details__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./main/report_details/report_details */ "./public/components/main/report_details/report_details.tsx"); -/* harmony import */ var _main_report_definition_details_report_definition_details__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./main/report_definition_details/report_definition_details */ "./public/components/main/report_definition_details/report_definition_details.tsx"); -/* harmony import */ var _report_definitions_edit_edit_report_definition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./report_definitions/edit/edit_report_definition */ "./public/components/report_definitions/edit/edit_report_definition.tsx"); +/* harmony import */ var _report_definitions_create_create_report_definition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./report_definitions/create/create_report_definition */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx"); +/* harmony import */ var _main_main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./main/main */ "../../.kibana-reports/kibana-reports/public/components/main/main.tsx"); +/* harmony import */ var _main_report_details_report_details__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./main/report_details/report_details */ "../../.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx"); +/* harmony import */ var _main_report_definition_details_report_definition_details__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./main/report_definition_details/report_definition_details */ "../../.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx"); +/* harmony import */ var _report_definitions_edit_edit_report_definition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./report_definitions/edit/edit_report_definition */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx"); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @@ -164,16 +164,16 @@ const OpendistroKibanaReportsApp = ({ /***/ }), -/***/ "./public/components/main/loading_modal/index.ts": -/*!*******************************************************!*\ - !*** ./public/components/main/loading_modal/index.ts ***! - \*******************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts": +/*!******************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts ***! + \******************************************************************************************************************************/ /*! exports provided: GenerateReportLoadingModal */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loading_modal */ "./public/components/main/loading_modal/loading_modal.tsx"); +/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loading_modal */ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GenerateReportLoadingModal", function() { return _loading_modal__WEBPACK_IMPORTED_MODULE_0__["GenerateReportLoadingModal"]; }); /* @@ -194,10 +194,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./public/components/main/loading_modal/loading_modal.tsx": -/*!****************************************************************!*\ - !*** ./public/components/main/loading_modal/loading_modal.tsx ***! - \****************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx": +/*!***************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx ***! + \***************************************************************************************************************************************/ /*! exports provided: GenerateReportLoadingModal */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -271,10 +271,10 @@ function GenerateReportLoadingModal(props) { /***/ }), -/***/ "./public/components/main/main.tsx": -/*!*****************************************!*\ - !*** ./public/components/main/main.tsx ***! - \*****************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/main.tsx": +/*!****************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/main.tsx ***! + \****************************************************************************************************************/ /*! exports provided: Main */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -285,9 +285,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _reports_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reports_table */ "./public/components/main/reports_table.tsx"); -/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./main_utils */ "./public/components/main/main_utils.tsx"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utils */ "./public/components/utils/utils.tsx"); +/* harmony import */ var _reports_table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reports_table */ "../../.kibana-reports/kibana-reports/public/components/main/reports_table.tsx"); +/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./main_utils */ "../../.kibana-reports/kibana-reports/public/components/main/main_utils.tsx"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -521,10 +521,10 @@ function Main(props) { /***/ }), -/***/ "./public/components/main/report_definition_details/report_definition_details.tsx": -/*!****************************************************************************************!*\ - !*** ./public/components/main/report_definition_details/report_definition_details.tsx ***! - \****************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx": +/*!***************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx ***! + \***************************************************************************************************************************************************************/ /*! exports provided: ReportDefinitionDetails */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -535,13 +535,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_details_report_details__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_details/report_details */ "./public/components/main/report_details/report_details.tsx"); -/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../main_utils */ "./public/components/main/main_utils.tsx"); +/* harmony import */ var _report_details_report_details__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_details/report_details */ "../../.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx"); +/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../main_utils */ "../../.kibana-reports/kibana-reports/public/components/main/main_utils.tsx"); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! moment */ "moment"); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _report_definitions_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../report_definitions/utils */ "./public/components/report_definitions/utils/index.ts"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "./public/components/utils/utils.tsx"); -/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../loading_modal */ "./public/components/main/loading_modal/index.ts"); +/* harmony import */ var _report_definitions_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../report_definitions/utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx"); +/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../loading_modal */ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -1039,10 +1039,10 @@ function ReportDefinitionDetails(props) { /***/ }), -/***/ "./public/components/main/report_details/report_details.tsx": -/*!******************************************************************!*\ - !*** ./public/components/main/report_details/report_details.tsx ***! - \******************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx": +/*!*****************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx ***! + \*****************************************************************************************************************************************/ /*! exports provided: ReportDetailsComponent, trimAndRenderAsText, formatEmails, ReportDetails */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1056,12 +1056,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../main_utils */ "./public/components/main/main_utils.tsx"); -/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../loading_modal */ "./public/components/main/loading_modal/index.ts"); -/* harmony import */ var _report_definitions_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../report_definitions/utils */ "./public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../main_utils */ "../../.kibana-reports/kibana-reports/public/components/main/main_utils.tsx"); +/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../loading_modal */ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts"); +/* harmony import */ var _report_definitions_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../report_definitions/utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @elastic/datemath */ "../../packages/elastic-datemath/target/index.js"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_elastic_datemath__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "./public/components/utils/utils.tsx"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -1327,10 +1327,10 @@ function ReportDetails(props) { /***/ }), -/***/ "./public/components/main/reports_table.tsx": -/*!**************************************************!*\ - !*** ./public/components/main/reports_table.tsx ***! - \**************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/main/reports_table.tsx": +/*!*************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/main/reports_table.tsx ***! + \*************************************************************************************************************************/ /*! exports provided: ReportsTable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1341,8 +1341,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./main_utils */ "./public/components/main/main_utils.tsx"); -/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./loading_modal */ "./public/components/main/loading_modal/index.ts"); +/* harmony import */ var _main_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./main_utils */ "../../.kibana-reports/kibana-reports/public/components/main/main_utils.tsx"); +/* harmony import */ var _loading_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./loading_modal */ "../../.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @elastic/datemath */ "../../packages/elastic-datemath/target/index.js"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_elastic_datemath__WEBPACK_IMPORTED_MODULE_4__); /* @@ -1528,10 +1528,10 @@ function ReportsTable(props) { /***/ }), -/***/ "./public/components/report_definitions/create/create_report_definition.tsx": -/*!**********************************************************************************!*\ - !*** ./public/components/report_definitions/create/create_report_definition.tsx ***! - \**********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx": +/*!*********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx ***! + \*********************************************************************************************************************************************************/ /*! exports provided: CreateReport */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1542,13 +1542,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_settings */ "./public/components/report_definitions/report_settings/index.ts"); -/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../delivery */ "./public/components/report_definitions/delivery/index.ts"); -/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../report_trigger */ "./public/components/report_definitions/report_trigger/index.ts"); -/* harmony import */ var _main_main_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../main/main_utils */ "./public/components/main/main_utils.tsx"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "./public/components/report_definitions/utils/index.ts"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/utils */ "./public/components/utils/utils.tsx"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/utils */ "./public/components/report_definitions/utils/utils.tsx"); +/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_settings */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts"); +/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../delivery */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts"); +/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../report_trigger */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts"); +/* harmony import */ var _main_main_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../main/main_utils */ "../../.kibana-reports/kibana-reports/public/components/main/main_utils.tsx"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -1769,10 +1769,10 @@ function CreateReport(props) { /***/ }), -/***/ "./public/components/report_definitions/delivery/delivery.tsx": -/*!********************************************************************!*\ - !*** ./public/components/report_definitions/delivery/delivery.tsx ***! - \********************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx": +/*!*******************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx ***! + \*******************************************************************************************************************************************/ /*! exports provided: ReportDelivery */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1783,10 +1783,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _delivery_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./delivery_constants */ "./public/components/report_definitions/delivery/delivery_constants.tsx"); -/* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-mde/lib/styles/css/react-mde-all.css */ "./node_modules/react-mde/lib/styles/css/react-mde-all.css"); +/* harmony import */ var _delivery_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./delivery_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx"); +/* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-mde/lib/styles/css/react-mde-all.css */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css"); /* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _email__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./email */ "./public/components/report_definitions/delivery/email.tsx"); +/* harmony import */ var _email__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./email */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -1866,10 +1866,10 @@ function ReportDelivery(props) { /***/ }), -/***/ "./public/components/report_definitions/delivery/delivery_constants.tsx": -/*!******************************************************************************!*\ - !*** ./public/components/report_definitions/delivery/delivery_constants.tsx ***! - \******************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx": +/*!*****************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx ***! + \*****************************************************************************************************************************************************/ /*! exports provided: EMAIL_RECIPIENT_OPTIONS, DELIVERY_TYPE_OPTIONS */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1902,10 +1902,10 @@ const DELIVERY_TYPE_OPTIONS = [{ /***/ }), -/***/ "./public/components/report_definitions/delivery/email.tsx": -/*!*****************************************************************!*\ - !*** ./public/components/report_definitions/delivery/email.tsx ***! - \*****************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx": +/*!****************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx ***! + \****************************************************************************************************************************************/ /*! exports provided: EmailDelivery */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -1916,10 +1916,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-mde */ "./node_modules/react-mde/lib/js/index.js"); +/* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-mde */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js"); /* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_mde__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "./public/components/report_definitions/utils/index.ts"); -/* harmony import */ var _delivery_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./delivery_constants */ "./public/components/report_definitions/delivery/delivery_constants.tsx"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _delivery_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./delivery_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -2071,16 +2071,16 @@ const EmailDelivery = props => { /***/ }), -/***/ "./public/components/report_definitions/delivery/index.ts": -/*!****************************************************************!*\ - !*** ./public/components/report_definitions/delivery/index.ts ***! - \****************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts": +/*!***************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts ***! + \***************************************************************************************************************************************/ /*! exports provided: ReportDelivery */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./delivery */ "./public/components/report_definitions/delivery/delivery.tsx"); +/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./delivery */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReportDelivery", function() { return _delivery__WEBPACK_IMPORTED_MODULE_0__["ReportDelivery"]; }); /* @@ -2101,10 +2101,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./public/components/report_definitions/edit/edit_report_definition.tsx": -/*!******************************************************************************!*\ - !*** ./public/components/report_definitions/edit/edit_report_definition.tsx ***! - \******************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx": +/*!*****************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx ***! + \*****************************************************************************************************************************************************/ /*! exports provided: EditReportDefinition */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2115,12 +2115,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_settings */ "./public/components/report_definitions/report_settings/index.ts"); -/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../delivery */ "./public/components/report_definitions/delivery/index.ts"); -/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../report_trigger */ "./public/components/report_definitions/report_trigger/index.ts"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "./public/components/report_definitions/utils/index.ts"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "./public/components/utils/utils.tsx"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/utils */ "./public/components/report_definitions/utils/utils.tsx"); +/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../report_settings */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts"); +/* harmony import */ var _delivery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../delivery */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts"); +/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../report_trigger */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx"); +/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -2399,16 +2399,16 @@ function EditReportDefinition(props) { /***/ }), -/***/ "./public/components/report_definitions/report_settings/index.ts": -/*!***********************************************************************!*\ - !*** ./public/components/report_definitions/report_settings/index.ts ***! - \***********************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts": +/*!**********************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts ***! + \**********************************************************************************************************************************************/ /*! exports provided: ReportSettings */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./report_settings */ "./public/components/report_definitions/report_settings/report_settings.tsx"); +/* harmony import */ var _report_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./report_settings */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReportSettings", function() { return _report_settings__WEBPACK_IMPORTED_MODULE_0__["ReportSettings"]; }); /* @@ -2429,10 +2429,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./public/components/report_definitions/report_settings/report_settings.tsx": -/*!**********************************************************************************!*\ - !*** ./public/components/report_definitions/report_settings/report_settings.tsx ***! - \**********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx": +/*!*********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx ***! + \*********************************************************************************************************************************************************/ /*! exports provided: ReportSettings */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2443,14 +2443,14 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_settings_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_settings_constants */ "./public/components/report_definitions/report_settings/report_settings_constants.tsx"); -/* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-mde */ "./node_modules/react-mde/lib/js/index.js"); +/* harmony import */ var _report_settings_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_settings_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx"); +/* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-mde */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/js/index.js"); /* harmony import */ var react_mde__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_mde__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-mde/lib/styles/css/react-mde-all.css */ "./node_modules/react-mde/lib/styles/css/react-mde-all.css"); +/* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-mde/lib/styles/css/react-mde-all.css */ "../../.kibana-reports/kibana-reports/node_modules/react-mde/lib/styles/css/react-mde-all.css"); /* harmony import */ var react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_mde_lib_styles_css_react_mde_all_css__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _report_settings_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./report_settings_helpers */ "./public/components/report_definitions/report_settings/report_settings_helpers.tsx"); -/* harmony import */ var _time_range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./time_range */ "./public/components/report_definitions/report_settings/time_range.tsx"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ "./public/components/report_definitions/utils/index.ts"); +/* harmony import */ var _report_settings_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./report_settings_helpers */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx"); +/* harmony import */ var _time_range__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./time_range */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -2939,10 +2939,10 @@ function ReportSettings(props) { /***/ }), -/***/ "./public/components/report_definitions/report_settings/report_settings_constants.tsx": -/*!********************************************************************************************!*\ - !*** ./public/components/report_definitions/report_settings/report_settings_constants.tsx ***! - \********************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx": +/*!*******************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx ***! + \*******************************************************************************************************************************************************************/ /*! exports provided: REPORT_SOURCE_RADIOS, PDF_PNG_FILE_FORMAT_OPTIONS, SAVED_SEARCH_FORMAT_OPTIONS, HEADER_FOOTER_CHECKBOX, REPORT_SOURCE_TYPES, commonTimeRanges */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -3024,10 +3024,10 @@ const commonTimeRanges = [{ /***/ }), -/***/ "./public/components/report_definitions/report_settings/report_settings_helpers.tsx": -/*!******************************************************************************************!*\ - !*** ./public/components/report_definitions/report_settings/report_settings_helpers.tsx ***! - \******************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx": +/*!*****************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx ***! + \*****************************************************************************************************************************************************************/ /*! exports provided: parseInContextUrl, getDashboardBaseUrlCreate, getVisualizationBaseUrlCreate, getSavedSearchBaseUrlCreate, getDashboardOptions, getVisualizationOptions, getSavedSearchOptions, handleDataToVisualReportSourceChange */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -3170,10 +3170,10 @@ const handleDataToVisualReportSourceChange = reportDefinitionRequest => { /***/ }), -/***/ "./public/components/report_definitions/report_settings/time_range.tsx": -/*!*****************************************************************************!*\ - !*** ./public/components/report_definitions/report_settings/time_range.tsx ***! - \*****************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx": +/*!****************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx ***! + \****************************************************************************************************************************************************/ /*! exports provided: TimeRangeSelect */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -3184,12 +3184,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_settings_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_settings_helpers */ "./public/components/report_definitions/report_settings/report_settings_helpers.tsx"); +/* harmony import */ var _report_settings_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_settings_helpers */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @elastic/datemath */ "../../packages/elastic-datemath/target/index.js"); /* harmony import */ var _elastic_datemath__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_elastic_datemath__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _report_settings_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./report_settings_constants */ "./public/components/report_definitions/report_settings/report_settings_constants.tsx"); +/* harmony import */ var _report_settings_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./report_settings_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -3380,16 +3380,16 @@ function TimeRangeSelect(props) { /***/ }), -/***/ "./public/components/report_definitions/report_trigger/index.ts": -/*!**********************************************************************!*\ - !*** ./public/components/report_definitions/report_trigger/index.ts ***! - \**********************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts": +/*!*********************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts ***! + \*********************************************************************************************************************************************/ /*! exports provided: ReportTrigger */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./report_trigger */ "./public/components/report_definitions/report_trigger/report_trigger.tsx"); +/* harmony import */ var _report_trigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./report_trigger */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReportTrigger", function() { return _report_trigger__WEBPACK_IMPORTED_MODULE_0__["ReportTrigger"]; }); /* @@ -3410,10 +3410,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./public/components/report_definitions/report_trigger/report_trigger.tsx": -/*!********************************************************************************!*\ - !*** ./public/components/report_definitions/report_trigger/report_trigger.tsx ***! - \********************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx": +/*!*******************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx ***! + \*******************************************************************************************************************************************************/ /*! exports provided: ReportTrigger */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -3426,8 +3426,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "moment"); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _report_trigger_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./report_trigger_constants */ "./public/components/report_definitions/report_trigger/report_trigger_constants.tsx"); -/* harmony import */ var _timezone__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./timezone */ "./public/components/report_definitions/report_trigger/timezone.tsx"); +/* harmony import */ var _report_trigger_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./report_trigger_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx"); +/* harmony import */ var _timezone__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./timezone */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -3893,10 +3893,10 @@ function ReportTrigger(props) { /***/ }), -/***/ "./public/components/report_definitions/report_trigger/report_trigger_constants.tsx": -/*!******************************************************************************************!*\ - !*** ./public/components/report_definitions/report_trigger/report_trigger_constants.tsx ***! - \******************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx": +/*!*****************************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx ***! + \*****************************************************************************************************************************************************************/ /*! exports provided: TRIGGER_TYPE_OPTIONS, SCHEDULE_TYPE_OPTIONS, SCHEDULE_RECURRING_OPTIONS, INTERVAL_TIME_PERIODS, WEEKLY_CHECKBOX_OPTIONS, MONTHLY_ON_THE_OPTIONS, TIMEZONE_OPTIONS */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -3999,10 +3999,10 @@ const TIMEZONE_OPTIONS = moment_timezone__WEBPACK_IMPORTED_MODULE_0___default.a. /***/ }), -/***/ "./public/components/report_definitions/report_trigger/timezone.tsx": -/*!**************************************************************************!*\ - !*** ./public/components/report_definitions/report_trigger/timezone.tsx ***! - \**************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx": +/*!*************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx ***! + \*************************************************************************************************************************************************/ /*! exports provided: TimezoneSelect */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -4013,7 +4013,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _report_trigger_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_trigger_constants */ "./public/components/report_definitions/report_trigger/report_trigger_constants.tsx"); +/* harmony import */ var _report_trigger_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./report_trigger_constants */ "../../.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx"); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * @@ -4075,17 +4075,17 @@ function TimezoneSelect(props) { /***/ }), -/***/ "./public/components/report_definitions/utils/index.ts": -/*!*************************************************************!*\ - !*** ./public/components/report_definitions/utils/index.ts ***! - \*************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts": +/*!************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts ***! + \************************************************************************************************************************************/ /*! exports provided: converter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "converter", function() { return converter; }); -/* harmony import */ var showdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! showdown */ "./node_modules/showdown/dist/showdown.js"); +/* harmony import */ var showdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! showdown */ "../../.kibana-reports/kibana-reports/node_modules/showdown/dist/showdown.js"); /* harmony import */ var showdown__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(showdown__WEBPACK_IMPORTED_MODULE_0__); /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -4112,17 +4112,17 @@ const converter = new showdown__WEBPACK_IMPORTED_MODULE_0___default.a.Converter( /***/ }), -/***/ "./public/components/report_definitions/utils/utils.tsx": -/*!**************************************************************!*\ - !*** ./public/components/report_definitions/utils/utils.tsx ***! - \**************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx": +/*!*************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx ***! + \*************************************************************************************************************************************/ /*! exports provided: definitionInputValidation */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "definitionInputValidation", function() { return definitionInputValidation; }); -/* harmony import */ var cron_validator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cron-validator */ "./node_modules/cron-validator/lib/index.js"); +/* harmony import */ var cron_validator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cron-validator */ "../../.kibana-reports/kibana-reports/node_modules/cron-validator/lib/index.js"); /* harmony import */ var cron_validator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cron_validator__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "moment"); /* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__); @@ -4213,10 +4213,10 @@ const definitionInputValidation = async (metadata, error, setShowSettingsReportN /***/ }), -/***/ "./public/components/utils/utils.tsx": -/*!*******************************************!*\ - !*** ./public/components/utils/utils.tsx ***! - \*******************************************/ +/***/ "../../.kibana-reports/kibana-reports/public/components/utils/utils.tsx": +/*!******************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/public/components/utils/utils.tsx ***! + \******************************************************************************************************************/ /*! exports provided: permissionsMissingToast, permissionsMissingActions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { diff --git a/kibana-reports/target/public/1.plugin.js.map b/kibana-reports/target/public/1.plugin.js.map index d98e34aa..9ca6b2b6 100644 --- a/kibana-reports/target/public/1.plugin.js.map +++ b/kibana-reports/target/public/1.plugin.js.map @@ -1 +1 @@ -{"version":3,"file":"1.plugin.js","sources":["/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/application.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/app.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/loading_modal/index.ts","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/loading_modal/loading_modal.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/main.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/report_details/report_details.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/main/reports_table.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/delivery/delivery.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/delivery/email.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/delivery/index.ts","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_settings/index.ts","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_trigger/index.ts","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/utils/index.ts","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/report_definitions/utils/utils.tsx","/plugin:opendistro_kibana_reports/plugins/kibana-reports/public/components/utils/utils.tsx"],"sourcesContent":["/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { OpendistroKibanaReportsApp } from './components/app';\nexport const renderApp = ({\n notifications,\n http,\n chrome\n}, {\n navigation\n}, {\n appBasePath,\n element\n}) => {\n ReactDOM.render( /*#__PURE__*/React.createElement(OpendistroKibanaReportsApp, {\n basename: appBasePath,\n notifications: notifications,\n http: http,\n navigation: navigation,\n chrome: chrome\n }), element);\n return () => ReactDOM.unmountComponentAtNode(element);\n};","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from 'react';\nimport { I18nProvider } from '@kbn/i18n/react';\nimport { HashRouter as Router, Route, Switch } from 'react-router-dom';\nimport { EuiPage, EuiPageBody, EuiPageContentBody, EuiPageContentHeader, EuiPageContentHeaderSection } from '@elastic/eui';\nimport { CreateReport } from './report_definitions/create/create_report_definition';\nimport { Main } from './main/main';\nimport { ReportDetails } from './main/report_details/report_details';\nimport { ReportDefinitionDetails } from './main/report_definition_details/report_definition_details';\nimport { EditReportDefinition } from './report_definitions/edit/edit_report_definition';\nconst styles = {\n float: 'left',\n width: '100%',\n maxWidth: '1600px'\n};\nexport const OpendistroKibanaReportsApp = ({\n basename,\n notifications,\n http,\n navigation,\n chrome\n}) => {\n // Render the application DOM.\n return /*#__PURE__*/React.createElement(Router, {\n basename: '/' + basename\n }, /*#__PURE__*/React.createElement(I18nProvider, null, /*#__PURE__*/React.createElement(\"div\", {\n style: styles\n }, /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiPageContentHeader, null, /*#__PURE__*/React.createElement(EuiPageContentHeaderSection, null)), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {\n path: \"/report_details/:reportId\",\n render: props => /*#__PURE__*/React.createElement(ReportDetails, _extends({\n title: \"Report Details\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/report_definition_details/:reportDefinitionId\",\n render: props => /*#__PURE__*/React.createElement(ReportDefinitionDetails, _extends({\n title: \"Report Definition Details\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/create\",\n render: props => /*#__PURE__*/React.createElement(CreateReport, _extends({\n title: \"Create Report\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/edit/:reportDefinitionId\",\n render: props => /*#__PURE__*/React.createElement(EditReportDefinition, _extends({\n title: \"Edit Report Definition\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/\",\n render: props => /*#__PURE__*/React.createElement(Main, _extends({\n title: \"Reporting Homepage\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }))))))));\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { GenerateReportLoadingModal } from './loading_modal';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiOverlayMask, EuiModal, EuiModalHeader, EuiTitle, EuiText, EuiModalBody, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiButton } from \"@elastic/eui\";\nimport React, { useState } from \"react\";\nexport function GenerateReportLoadingModal(props) {\n const {\n setShowLoading\n } = props;\n const [isModalVisible, setIsModalVisible] = useState(true);\n\n const closeModal = () => {\n setIsModalVisible(false);\n setShowLoading(false);\n };\n\n const showModal = () => setIsModalVisible(true);\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiOverlayMask, null, /*#__PURE__*/React.createElement(EuiModal, {\n onClose: closeModal,\n style: {\n maxWidth: 350,\n minWidth: 300\n }\n }, /*#__PURE__*/React.createElement(EuiModalHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(EuiText, {\n textAlign: \"right\"\n }, /*#__PURE__*/React.createElement(\"h2\", null, \"Generating report\")))), /*#__PURE__*/React.createElement(EuiModalBody, null, /*#__PURE__*/React.createElement(EuiText, null, \"Preparing your file for download.\"), /*#__PURE__*/React.createElement(EuiText, null, \"You can close this dialog while we continue in the background.\"), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"center\",\n alignItems: \"center\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiLoadingSpinner, {\n size: \"xl\",\n style: {\n minWidth: 75,\n minHeight: 75\n }\n }))), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"l\"\n }), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n alignItems: \"flexEnd\",\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: closeModal\n }, \"Close\")))))));\n}\n;","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useState, useEffect } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiButton, EuiTitle // @ts-ignore\n, EuiHorizontalRule, EuiPanel, EuiGlobalToastList } from '@elastic/eui';\nimport { ReportsTable } from './reports_table';\nimport { addReportsTableContent, addReportDefinitionsTableContent } from './main_utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../utils/utils';\nconst reportCountStyles = {\n color: 'gray',\n display: 'inline'\n};\nexport function Main(props) {\n const [reportsTableContent, setReportsTableContent] = useState([]);\n const [reportDefinitionsTableContent, setReportDefinitionsTableContent] = useState([]);\n const [toasts, setToasts] = useState([]);\n\n const addPermissionsMissingDownloadToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDownloadToast = () => {\n addPermissionsMissingDownloadToastHandler();\n };\n\n const addReportsTableContentErrorToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.LOADING_REPORTS_TABLE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error generating reports table.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportsTableErrorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleReportsTableErrorToast = errorType => {\n addReportsTableContentErrorToastHandler(errorType);\n };\n\n const addReportDefinitionsTableErrorToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.LOADING_DEFINITIONS_TABLE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error generating report definitions table.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDefinitionsTableErrorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleReportDefinitionsTableErrorToast = errorType => {\n addReportDefinitionsTableErrorToastHandler(errorType);\n };\n\n const addErrorOnDemandDownloadToastHandler = () => {\n const errorToast = {\n title: 'Error downloading report.',\n color: 'danger',\n iconType: 'alert',\n id: 'onDemandDownloadErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleOnDemandDownloadErrorToast = () => {\n addErrorOnDemandDownloadToastHandler();\n };\n\n const addSuccessOnDemandDownloadToastHandler = () => {\n const successToast = {\n title: 'Successfully downloaded report.',\n color: 'success',\n iconType: 'check',\n id: 'onDemandDownloadSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleOnDemandDownloadSuccessToast = () => {\n addSuccessOnDemandDownloadToastHandler();\n };\n\n const addCreateReportDefinitionSuccessToastHandler = () => {\n const successToast = {\n title: 'Successfully created report definition.',\n color: 'success',\n iconType: 'check',\n id: 'createReportDefinitionSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleCreateReportDefinitionSuccessToast = () => {\n addCreateReportDefinitionSuccessToastHandler();\n };\n\n const addEditReportDefinitionSuccessToastHandler = () => {\n const successToast = {\n title: 'Successfully updated report definition.',\n color: 'success',\n iconType: 'check',\n id: 'editReportDefinitionSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleEditReportDefinitionSuccessToast = () => {\n addEditReportDefinitionSuccessToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const pagination = {\n initialPageSize: 10,\n pageSizeOptions: [5, 10, 20]\n };\n useEffect(() => {\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }]);\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n\n if (window.location.href.includes('create=success')) {\n handleCreateReportDefinitionSuccessToast(); // refresh might not fetch the latest changes when coming from create or edit page\n // workaround to wait 1 second and refresh again\n\n setTimeout(() => {\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n }, 1000);\n } else if (window.location.href.includes('edit=success')) {\n handleEditReportDefinitionSuccessToast();\n setTimeout(() => {\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n }, 1000);\n }\n\n window.location.href = 'opendistro_kibana_reports#/';\n }, []);\n\n const refreshReportsTable = async () => {\n const {\n httpClient\n } = props;\n await httpClient.get('../api/reporting/reports').then(response => {\n setReportsTableContent(addReportsTableContent(response.data));\n }).catch(error => {\n console.log('error when fetching all reports: ', error); // permission denied error\n\n if (error.body.statusCode === 403) {\n handleReportsTableErrorToast('permissions');\n } else {\n handleReportsTableErrorToast('API');\n }\n });\n };\n\n const refreshReportsDefinitionsTable = async () => {\n const {\n httpClient\n } = props;\n await httpClient.get('../api/reporting/reportDefinitions').then(response => {\n setReportDefinitionsTableContent(addReportDefinitionsTableContent(response.data));\n }).catch(error => {\n console.log('error when fetching all report definitions: ', error);\n\n if (error.body.statusCode === 403) {\n handleReportDefinitionsTableErrorToast('permissions');\n } else {\n handleReportDefinitionsTableErrorToast('API');\n }\n });\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiPanel, {\n paddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"spaceEvenly\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Reports\", ' ', /*#__PURE__*/React.createElement(\"p\", {\n style: reportCountStyles\n }, \" (\", reportsTableContent.length, \")\")))), /*#__PURE__*/React.createElement(EuiFlexItem, {\n component: \"span\",\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: refreshReportsTable,\n iconSide: \"left\",\n iconType: \"refresh\"\n }, \"Refresh\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(ReportsTable, {\n pagination: pagination,\n reportsTableItems: reportsTableContent,\n httpClient: props['httpClient'],\n handleSuccessToast: handleOnDemandDownloadSuccessToast,\n handleErrorToast: handleOnDemandDownloadErrorToast,\n handlePermissionsMissingToast: handlePermissionsMissingDownloadToast\n })), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPageHeader, EuiTitle, EuiPageBody, EuiPageContent, EuiHorizontalRule, EuiSpacer, EuiPageHeaderSection, EuiButton, EuiIcon, EuiLink, EuiGlobalToastList, EuiOverlayMask, EuiConfirmModal } from '@elastic/eui';\nimport { ReportDetailsComponent, trimAndRenderAsText } from '../report_details/report_details';\nimport { fileFormatsUpper, generateReportFromDefinitionId } from '../main_utils';\nimport moment from 'moment';\nimport { converter } from '../../report_definitions/utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { GenerateReportLoadingModal } from '../loading_modal';\nconst ON_DEMAND = 'On demand';\nexport function ReportDefinitionDetails(props) {\n const [reportDefinitionDetails, setReportDefinitionDetails] = useState({});\n const [reportDefinitionRawResponse, setReportDefinitionRawResponse] = useState({});\n const [toasts, setToasts] = useState([]);\n const [showDeleteModal, setShowDeleteModal] = useState(false);\n const [showLoading, setShowLoading] = useState(false);\n const reportDefinitionId = props.match['params']['reportDefinitionId'];\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const handleShowDeleteModal = e => {\n setShowDeleteModal(e);\n };\n\n const addPermissionsMissingStatusChangeToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.CHANGE_SCHEDULE_STATUS);\n setToasts(toasts.concat(toast));\n };\n\n const addPermissionsMissingDeleteToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.DELETE_REPORT_DEFINITION);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDeleteToast = () => {\n addPermissionsMissingDeleteToastHandler();\n };\n\n const addPermissionsMissingGenerateReportToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const addErrorLoadingDetailsToastHandler = () => {\n const errorToast = {\n title: 'Error loading report definition details.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDefinitionDetailsErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleDetailsErrorToast = () => {\n addErrorLoadingDetailsToastHandler();\n };\n\n const addSuccessGeneratingReportToastHandler = () => {\n const successToast = {\n title: 'Successfully generated report.',\n color: 'success',\n iconType: 'check',\n id: 'generateReportSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessGeneratingReportToast = () => {\n addSuccessGeneratingReportToastHandler();\n };\n\n const addErrorGeneratingReportToastHandler = () => {\n const errorToast = {\n title: 'Error generating report.',\n color: 'danger',\n iconType: 'alert',\n id: 'generateReportErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorGeneratingReportToast = errorType => {\n if (errorType === 'permissions') {\n addPermissionsMissingGenerateReportToastHandler();\n } else if (errorType === 'API') {\n addErrorGeneratingReportToastHandler();\n }\n };\n\n const addSuccessEnablingScheduleToastHandler = () => {\n const successToast = {\n title: 'Successfully enabled schedule.',\n color: 'success',\n iconType: 'check',\n id: 'successEnableToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const addErrorEnablingScheduleToastHandler = () => {\n const errorToast = {\n title: 'Error enabling schedule.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const addSuccessDisablingScheduleToastHandler = () => {\n const successToast = {\n title: 'Successfully disabled schedule.',\n color: 'success',\n iconType: 'check',\n id: 'successDisableToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessChangingScheduleStatusToast = statusChange => {\n if (statusChange === 'enable') {\n addSuccessEnablingScheduleToastHandler();\n } else if (statusChange === 'disable') {\n addSuccessDisablingScheduleToastHandler();\n }\n };\n\n const addErrorDisablingScheduleToastHandler = () => {\n const errorToast = {\n title: 'Error disabling schedule.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDisableToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorChangingScheduleStatusToast = statusChange => {\n if (statusChange === 'enable') {\n addErrorEnablingScheduleToastHandler();\n } else if (statusChange === 'disable') {\n addErrorDisablingScheduleToastHandler();\n } else if (statusChange === 'permissions') {\n addPermissionsMissingStatusChangeToastHandler();\n }\n };\n\n const addErrorDeletingReportDefinitionToastHandler = () => {\n const errorToast = {\n title: 'Error deleting report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDeleteToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorDeletingReportDefinitionToast = () => {\n addErrorDeletingReportDefinitionToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const handleReportDefinitionDetails = e => {\n setReportDefinitionDetails(e);\n };\n\n const handleReportDefinitionRawResponse = e => {\n setReportDefinitionRawResponse(e);\n };\n\n const DeleteConfirmationModal = () => {\n const closeModal = () => {\n setShowDeleteModal(false);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiOverlayMask, null, /*#__PURE__*/React.createElement(EuiConfirmModal, {\n title: \"Delete report definition\",\n onCancel: closeModal,\n onConfirm: deleteReportDefinition,\n cancelButtonText: \"Cancel\",\n confirmButtonText: \"Delete\",\n buttonColor: \"danger\",\n defaultFocusedButton: \"confirm\"\n }, /*#__PURE__*/React.createElement(\"p\", null, \"Are you sure you want to delete \\\"\", reportDefinitionDetails.name, \"\\\"?\"))));\n };\n\n const humanReadableScheduleDetails = trigger => {\n let scheduleDetails = '';\n\n if (trigger.trigger_type === 'Schedule') {\n if (trigger.trigger_params.schedule_type === 'Recurring') {\n // Daily\n if (trigger.trigger_params.schedule.interval.unit === 'DAYS' && trigger.trigger_params.schedule.interval.period === 1) {\n const date = new Date(trigger.trigger_params.schedule.interval.start_time);\n scheduleDetails = 'Daily @ ' + date.toTimeString();\n } // By interval\n else {\n const date = new Date(trigger.trigger_params.schedule.interval.start_time);\n scheduleDetails = 'By interval, every ' + trigger.trigger_params.schedule.interval.period + ' ' + trigger.trigger_params.schedule.interval.unit.toLowerCase() + ', starting @ ' + date.toTimeString();\n }\n } // Cron\n else if (trigger.trigger_params.schedule_type === 'Cron based') {\n scheduleDetails = 'Cron based: ' + trigger.trigger_params.schedule.cron.expression + ' (' + trigger.trigger_params.schedule.cron.timezone + ')';\n }\n }\n\n return scheduleDetails;\n };\n\n const getReportDefinitionDetailsMetadata = data => {\n const reportDefinition = data.report_definition;\n const {\n report_params: reportParams,\n trigger,\n delivery,\n time_created: timeCreated,\n last_updated: lastUpdated\n } = reportDefinition;\n const {\n trigger_type: triggerType,\n trigger_params: triggerParams\n } = trigger;\n const {\n delivery_type: deliveryType,\n delivery_params: deliveryParams\n } = delivery;\n const {\n core_params: {\n base_url: baseUrl,\n report_format: reportFormat,\n time_duration: timeDuration\n }\n } = reportParams;\n let readableDate = new Date(timeCreated);\n let displayCreatedDate = readableDate.toDateString() + ' ' + readableDate.toLocaleTimeString();\n let readableUpdatedDate = new Date(lastUpdated);\n let displayUpdatedDate = readableUpdatedDate.toDateString() + ' ' + readableUpdatedDate.toLocaleTimeString();\n let reportDefinitionDetails = {\n name: reportParams.report_name,\n description: reportParams.description === '' ? `\\u2014` : reportParams.description,\n created: displayCreatedDate,\n lastUpdated: displayUpdatedDate,\n source: reportParams.report_source,\n baseUrl: baseUrl,\n // TODO: need better display\n timePeriod: moment.duration(timeDuration).humanize(),\n fileFormat: reportFormat,\n reportHeader: reportParams.core_params.hasOwnProperty('header') && reportParams.core_params.header != \"\" ? converter.makeMarkdown(reportParams.core_params.header) : `\\u2014`,\n reportFooter: reportParams.core_params.hasOwnProperty('footer') && reportParams.core_params.footer != \"\" ? converter.makeMarkdown(reportParams.core_params.footer) : `\\u2014`,\n triggerType: triggerType,\n scheduleDetails: triggerParams ? humanReadableScheduleDetails(data.report_definition.trigger) : `\\u2014`,\n channel: deliveryType,\n status: reportDefinition.status,\n kibanaRecipients: deliveryParams.kibana_recipients ? deliveryParams.kibana_recipients : `\\u2014`,\n emailRecipients: deliveryType === 'Channel' ? deliveryParams.recipients : `\\u2014`,\n emailSubject: deliveryType === 'Channel' ? deliveryParams.title : `\\u2014`,\n emailBody: deliveryType === 'Channel' ? deliveryParams.textDescription : `\\u2014`\n };\n return reportDefinitionDetails;\n };\n\n useEffect(() => {\n const {\n httpClient\n } = props;\n httpClient.get(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(response => {\n handleReportDefinitionRawResponse(response);\n handleReportDefinitionDetails(getReportDefinitionDetailsMetadata(response));\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: `Report definition details: ${response.report_definition.report_params.report_name}`\n }]);\n }).catch(error => {\n console.error('error when getting report definition details:', error);\n handleDetailsErrorToast();\n });\n }, []);\n\n const downloadIconDownload = async () => {\n handleLoading(true);\n await generateReportFromDetails();\n handleLoading(false);\n };\n\n const fileFormatDownload = data => {\n let formatUpper = data['fileFormat'];\n formatUpper = fileFormatsUpper[formatUpper];\n return /*#__PURE__*/React.createElement(EuiLink, {\n onClick: downloadIconDownload\n }, formatUpper + ' ', /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }));\n };\n\n const sourceURL = data => {\n return /*#__PURE__*/React.createElement(EuiLink, {\n href: `${data.baseUrl}`,\n target: \"_blank\"\n }, data['source']);\n };\n\n const getRelativeStartDate = duration => {\n duration = moment.duration(duration);\n let time_difference = moment.now() - duration;\n return new Date(time_difference);\n };\n\n const changeScheduledReportDefinitionStatus = statusChange => {\n let updatedReportDefinition = reportDefinitionRawResponse.report_definition;\n\n if (statusChange === 'Disable') {\n updatedReportDefinition.trigger.trigger_params.enabled = false;\n updatedReportDefinition.status = 'Disabled';\n } else if (statusChange === 'Enable') {\n updatedReportDefinition.trigger.trigger_params.enabled = true;\n updatedReportDefinition.status = 'Active';\n }\n\n const {\n httpClient\n } = props;\n httpClient.put(`../api/reporting/reportDefinitions/${reportDefinitionId}`, {\n body: JSON.stringify(updatedReportDefinition),\n params: reportDefinitionId.toString()\n }).then(() => {\n const updatedRawResponse = {\n report_definition: {}\n };\n updatedRawResponse.report_definition = updatedReportDefinition;\n handleReportDefinitionRawResponse(updatedRawResponse);\n setReportDefinitionDetails(getReportDefinitionDetailsMetadata(updatedRawResponse));\n\n if (statusChange === 'Enable') {\n handleSuccessChangingScheduleStatusToast('enable');\n } else if (statusChange === 'Disable') {\n handleSuccessChangingScheduleStatusToast('disable');\n }\n }).catch(error => {\n console.error('error in updating report definition status:', error);\n\n if (error.body.statusCode === 403) {\n handleErrorChangingScheduleStatusToast('permissions');\n } else {\n if (statusChange === 'Enable') {\n handleErrorChangingScheduleStatusToast('enable');\n } else if (statusChange === 'Disable') {\n handleErrorChangingScheduleStatusToast('disable');\n }\n }\n });\n };\n\n const ScheduledDefinitionStatus = () => {\n const status = reportDefinitionDetails.status === 'Active' ? 'Disable' : 'Enable';\n return /*#__PURE__*/React.createElement(EuiButton, {\n onClick: () => changeScheduledReportDefinitionStatus(status),\n id: 'changeStatusFromDetailsButton'\n }, status);\n };\n\n const generateReportFromDetails = async () => {\n const {\n httpClient\n } = props;\n let generateReportSuccess = await generateReportFromDefinitionId(reportDefinitionId, httpClient);\n\n if (generateReportSuccess.status) {\n handleSuccessGeneratingReportToast();\n } else {\n if (generateReportSuccess.permissionsError) {\n handleErrorGeneratingReportToast('permissions');\n } else {\n handleErrorGeneratingReportToast('API');\n }\n }\n };\n\n const deleteReportDefinition = () => {\n const {\n httpClient\n } = props;\n httpClient.delete(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(() => {\n window.location.assign(`opendistro_kibana_reports#/`);\n }).catch(error => {\n console.log('error when deleting report definition:', error);\n\n if (error.body.statusCode === 403) {\n handlePermissionsMissingDeleteToast();\n } else {\n handleErrorDeletingReportDefinitionToast();\n }\n });\n };\n\n const showActionButton = reportDefinitionDetails.triggerType === ON_DEMAND ? /*#__PURE__*/React.createElement(EuiButton, {\n onClick: () => generateReportFromDetails(),\n id: 'generateReportFromDetailsButton'\n }, \"Generate report\") : /*#__PURE__*/React.createElement(ScheduledDefinitionStatus, null);\n const triggerSection = reportDefinitionDetails.triggerType === ON_DEMAND ? /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Trigger type',\n reportDetailsComponentContent: reportDefinitionDetails.triggerType\n }) : /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Trigger type',\n reportDetailsComponentContent: reportDefinitionDetails.triggerType\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule details',\n reportDetailsComponentContent: reportDefinitionDetails.scheduleDetails\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Status',\n reportDetailsComponentContent: reportDefinitionDetails.status\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null));\n const showDeleteConfirmationModal = showDeleteModal ? /*#__PURE__*/React.createElement(DeleteConfirmationModal, null) : null;\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, {\n size: \"l\"\n }, /*#__PURE__*/React.createElement(\"h1\", null, \"Report definition details\")), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"m\"\n }), /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiPageHeaderSection, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, reportDefinitionDetails.name))))), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\",\n alignItems: \"flexEnd\",\n gutterSize: \"l\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n color: 'danger',\n onClick: handleShowDeleteModal,\n id: 'deleteReportDefinitionButton'\n }, \"Delete\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, showActionButton), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => {\n window.location.assign(`opendistro_kibana_reports#/edit/${reportDefinitionId}`);\n },\n id: 'editReportDefinitionButton'\n }, \"Edit\")))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report settings\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Name',\n reportDetailsComponentContent: reportDefinitionDetails.name\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Description',\n reportDetailsComponentContent: reportDefinitionDetails.description\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Created',\n reportDetailsComponentContent: reportDefinitionDetails.created\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Last updated',\n reportDetailsComponentContent: reportDefinitionDetails.lastUpdated\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Source',\n reportDetailsComponentContent: sourceURL(reportDefinitionDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Time period',\n reportDetailsComponentContent: `Last ${reportDefinitionDetails.timePeriod}`\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'File format',\n reportDetailsComponentContent: fileFormatDownload(reportDefinitionDetails)\n }), /*#__PURE__*/React.createElement(EuiFlexItem, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report header',\n reportDetailsComponentContent: trimAndRenderAsText(reportDefinitionDetails.reportHeader)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report footer',\n reportDetailsComponentContent: trimAndRenderAsText(reportDefinitionDetails.reportFooter)\n }), /*#__PURE__*/React.createElement(EuiFlexItem, null), /*#__PURE__*/React.createElement(EuiFlexItem, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report trigger\")), /*#__PURE__*/React.createElement(EuiSpacer, null), triggerSection, /*#__PURE__*/React.createElement(EuiSpacer, null)), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }), showDeleteConfirmationModal, showLoadingModal));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPageHeader, EuiTitle, EuiPageBody, EuiPageContent, EuiHorizontalRule, EuiSpacer, EuiDescriptionList, EuiDescriptionListTitle, EuiDescriptionListDescription, EuiPageHeaderSection, EuiLink, EuiIcon, EuiGlobalToastList } from '@elastic/eui';\nimport { fileFormatsUpper, generateReportById } from '../main_utils';\nimport { GenerateReportLoadingModal } from '../loading_modal';\nimport { converter } from '../../report_definitions/utils';\nimport dateMath from '@elastic/datemath';\nimport { permissionsMissingActions, permissionsMissingToast } from '../../utils/utils';\nexport const ReportDetailsComponent = props => {\n const {\n reportDetailsComponentTitle,\n reportDetailsComponentContent\n } = props;\n return /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiDescriptionList, null, /*#__PURE__*/React.createElement(EuiDescriptionListTitle, null, reportDetailsComponentTitle), /*#__PURE__*/React.createElement(EuiDescriptionListDescription, null, reportDetailsComponentContent)));\n}; // convert markdown to plain text, trim it if it's longer than 3 lines\n\nexport const trimAndRenderAsText = markdown => {\n if (!markdown) return markdown;\n const lines = markdown.split('\\n').filter(line => line);\n const elements = lines.slice(0, 3).map((line, i) => /*#__PURE__*/React.createElement(\"p\", {\n key: i\n }, line));\n return lines.length <= 3 ? elements : elements.concat( /*#__PURE__*/React.createElement(\"p\", {\n key: 3\n }, \"...\"));\n};\nexport const formatEmails = emails => {\n return Array.isArray(emails) ? emails.join(', ') : emails;\n};\nexport function ReportDetails(props) {\n const [reportDetails, setReportDetails] = useState({});\n const [toasts, setToasts] = useState([]);\n const [showLoading, setShowLoading] = useState(false);\n const reportId = props.match['params']['reportId'];\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const addPermissionsMissingDownloadToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDownloadToast = () => {\n addPermissionsMissingDownloadToastHandler();\n };\n\n const addErrorToastHandler = () => {\n const errorToast = {\n title: 'Error loading report details.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDetailsErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorToast = () => {\n addErrorToastHandler();\n };\n\n const addSuccessToastHandler = () => {\n const successToast = {\n title: 'Success',\n color: 'success',\n text: /*#__PURE__*/React.createElement(\"p\", null, \"Report successfully downloaded!\"),\n id: 'onDemandDownloadSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessToast = () => {\n addSuccessToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const handleReportDetails = e => {\n setReportDetails(e);\n };\n\n const convertTimestamp = timestamp => {\n let displayDate = `\\u2014`;\n\n if (timestamp) {\n let readableDate = new Date(timestamp);\n displayDate = readableDate.toLocaleString();\n }\n\n return displayDate;\n };\n\n const parseTimePeriod = queryUrl => {\n let [timeStringRegEx, fromDateString, toDateString] = queryUrl.match(/time:\\(from:(.+),to:(.+?)\\)/);\n fromDateString = fromDateString.replace(/[']+/g, '');\n toDateString = toDateString.replace(/[']+/g, '');\n let fromDateParsed = dateMath.parse(fromDateString);\n let toDateParsed = dateMath.parse(toDateString);\n const fromTimePeriod = fromDateParsed === null || fromDateParsed === void 0 ? void 0 : fromDateParsed.toDate();\n const toTimePeriod = toDateParsed === null || toDateParsed === void 0 ? void 0 : toDateParsed.toDate();\n return (fromTimePeriod === null || fromTimePeriod === void 0 ? void 0 : fromTimePeriod.toLocaleString()) + ' -> ' + (toTimePeriod === null || toTimePeriod === void 0 ? void 0 : toTimePeriod.toLocaleString());\n };\n\n const getReportDetailsData = report => {\n const {\n report_definition: reportDefinition,\n last_updated: lastUpdated,\n state,\n query_url: queryUrl\n } = report;\n const {\n report_params: reportParams,\n trigger,\n delivery\n } = reportDefinition;\n const {\n trigger_type: triggerType,\n trigger_params: triggerParams\n } = trigger;\n const {\n delivery_type: deliveryType,\n delivery_params: deliveryParams\n } = delivery;\n const coreParams = reportParams.core_params; // covert timestamp to local date-time string\n\n let reportDetails = {\n reportName: reportParams.report_name,\n description: reportParams.description === '' ? `\\u2014` : reportParams.description,\n created: convertTimestamp(report.time_created),\n lastUpdated: convertTimestamp(report.last_updated),\n source: reportParams.report_source,\n // TODO: we have all data needed, time_from, time_to, time_duration,\n // think of a way to better display\n time_period: parseTimePeriod(queryUrl),\n defaultFileFormat: coreParams.report_format,\n state: state,\n reportHeader: reportParams.core_params.hasOwnProperty('header') && reportParams.core_params.header != \"\" ? converter.makeMarkdown(reportParams.core_params.header) : `\\u2014`,\n reportFooter: reportParams.core_params.hasOwnProperty('footer') && reportParams.core_params.footer != \"\" ? converter.makeMarkdown(reportParams.core_params.footer) : `\\u2014`,\n triggerType: triggerType,\n scheduleType: triggerParams ? triggerParams.schedule_type : `\\u2014`,\n scheduleDetails: `\\u2014`,\n alertDetails: `\\u2014`,\n channel: deliveryType,\n emailRecipients: deliveryType === 'Channel' ? deliveryParams.recipients : `\\u2014`,\n emailSubject: deliveryType === 'Channel' ? deliveryParams.title : `\\u2014`,\n emailBody: deliveryType === 'Channel' ? deliveryParams.textDescription : `\\u2014`,\n queryUrl: queryUrl\n };\n return reportDetails;\n };\n\n useEffect(() => {\n const {\n httpClient\n } = props;\n httpClient.get('../api/reporting/reports/' + reportId).then(response => {\n handleReportDetails(getReportDetailsData(response));\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: 'Report details: ' + response.report_definition.report_params.report_name\n }]);\n }).catch(error => {\n console.log('Error when fetching report details: ', error);\n handleErrorToast();\n });\n }, []);\n\n const downloadIconDownload = async () => {\n handleLoading(true);\n await generateReportById(reportId, props.httpClient, handleSuccessToast, handleErrorToast, handlePermissionsMissingDownloadToast);\n handleLoading(false);\n };\n\n const fileFormatDownload = data => {\n let formatUpper = data['defaultFileFormat'];\n formatUpper = fileFormatsUpper[formatUpper];\n return /*#__PURE__*/React.createElement(EuiLink, {\n onClick: downloadIconDownload\n }, formatUpper + ' ', /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }));\n };\n\n const sourceURL = data => {\n return /*#__PURE__*/React.createElement(EuiLink, {\n href: `${data.queryUrl}`,\n target: \"_blank\"\n }, data['source']);\n };\n\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, {\n size: \"l\"\n }, /*#__PURE__*/React.createElement(\"h1\", null, \"Report details\")), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"m\"\n }), /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiPageHeaderSection, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, reportDetails['reportName'])))))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report Settings\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Name',\n reportDetailsComponentContent: reportDetails['reportName']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Description',\n reportDetailsComponentContent: reportDetails['description']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Created',\n reportDetailsComponentContent: reportDetails['created']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Last updated',\n reportDetailsComponentContent: reportDetails['lastUpdated']\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Source',\n reportDetailsComponentContent: sourceURL(reportDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Time period',\n reportDetailsComponentContent: reportDetails.time_period\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'File format',\n reportDetailsComponentContent: fileFormatDownload(reportDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'State',\n reportDetailsComponentContent: reportDetails['state']\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report header',\n reportDetailsComponentContent: trimAndRenderAsText(reportDetails['reportHeader'])\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report footer',\n reportDetailsComponentContent: trimAndRenderAsText(reportDetails['reportFooter'])\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null), /*#__PURE__*/React.createElement(ReportDetailsComponent, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report trigger\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report type',\n reportDetailsComponentContent: reportDetails['triggerType']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule type',\n reportDetailsComponentContent: reportDetails['scheduleType']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule details',\n reportDetailsComponentContent: reportDetails['scheduleDetails']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null)), /*#__PURE__*/React.createElement(EuiSpacer, null)), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }), showLoadingModal));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { Fragment, useState } from 'react';\nimport { EuiLink, EuiText, EuiIcon, EuiEmptyPrompt, EuiInMemoryTable } from '@elastic/eui';\nimport { fileFormatsUpper, humanReadableDate, generateReportById } from './main_utils';\nimport { GenerateReportLoadingModal } from './loading_modal';\nimport dateMath from '@elastic/datemath';\nconst reportStatusOptions = ['Created', 'Error', 'Pending', 'Shared', 'Archived'];\nconst reportTypeOptions = ['Schedule', 'On demand'];\nconst emptyMessageReports = /*#__PURE__*/React.createElement(EuiEmptyPrompt, {\n title: /*#__PURE__*/React.createElement(\"h3\", null, \"No reports to display\"),\n titleSize: \"xs\",\n body: /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiText, null, \"Create a report definition, or share/download a report from a dashboard, saved search or visualization.\"), /*#__PURE__*/React.createElement(EuiText, null, \"To learn more, see\", ' ', /*#__PURE__*/React.createElement(EuiLink, {\n href: \"https://opendistro.github.io/for-elasticsearch-docs/docs/kibana/reporting/\",\n target: \"_blank\"\n }, \"Get started with Kibana reporting \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"popout\"\n }))))\n});\nexport function ReportsTable(props) {\n const {\n pagination,\n reportsTableItems,\n httpClient,\n handleSuccessToast,\n handleErrorToast,\n handlePermissionsMissingToast\n } = props;\n const [sortField, setSortField] = useState('timeCreated');\n const [sortDirection, setSortDirection] = useState('des');\n const [showLoading, setShowLoading] = useState(false);\n const [message, setMessage] = useState('');\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const onDemandDownload = async id => {\n handleLoading(true);\n await generateReportById(id, httpClient, handleSuccessToast, handleErrorToast, handlePermissionsMissingToast);\n handleLoading(false);\n };\n\n const parseTimePeriod = queryUrl => {\n let [timeStringRegEx, fromDateString, toDateString] = queryUrl.match(/time:\\(from:(.+),to:(.+?)\\)/);\n fromDateString = fromDateString.replace(/[']+/g, '');\n toDateString = toDateString.replace(/[']+/g, '');\n let fromDateParsed = dateMath.parse(fromDateString);\n let toDateParsed = dateMath.parse(toDateString);\n const fromTimePeriod = fromDateParsed === null || fromDateParsed === void 0 ? void 0 : fromDateParsed.toDate();\n const toTimePeriod = toDateParsed === null || toDateParsed === void 0 ? void 0 : toDateParsed.toDate();\n return (fromTimePeriod === null || fromTimePeriod === void 0 ? void 0 : fromTimePeriod.toLocaleString()) + ' -> ' + (toTimePeriod === null || toTimePeriod === void 0 ? void 0 : toTimePeriod.toLocaleString());\n };\n\n const reportsTableColumns = [{\n field: 'reportName',\n name: 'Report ID',\n render: reportName => {\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, reportName);\n }\n }, {\n // TODO: link to dashboard/visualization snapshot, use \"queryUrl\" field. Display dashboard name?\n field: 'reportSource',\n name: 'Source',\n render: (reportSource, item) => item.state === 'Pending' ? /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, reportSource) : /*#__PURE__*/React.createElement(EuiLink, {\n href: item.url,\n target: \"_blank\"\n }, reportSource)\n }, // {\n // field: 'type',\n // name: 'Type',\n // sortable: true,\n // truncateText: false,\n // },\n {\n field: 'timeCreated',\n name: 'Creation time',\n render: date => {\n let readable = humanReadableDate(date);\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, readable);\n }\n }, {\n field: 'url',\n name: 'Time period',\n render: url => {\n let timePeriod = parseTimePeriod(url);\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, timePeriod);\n }\n }, // {\n // field: 'state',\n // name: 'State',\n // sortable: true,\n // truncateText: false,\n // },\n {\n field: 'id',\n name: 'Generate',\n render: (id, item) => item.state === 'Pending' ? /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, fileFormatsUpper[item.format], \" \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n })) : /*#__PURE__*/React.createElement(EuiLink, {\n onClick: () => onDemandDownload(id)\n }, fileFormatsUpper[item.format], \" \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }))\n }];\n const sorting = {\n sort: {\n field: sortField,\n direction: sortDirection\n }\n };\n const reportsListSearch = {\n box: {\n incremental: true,\n placeholder: 'Search by Report ID'\n } // filters: [\n // {\n // type: 'field_value_selection',\n // field: 'type',\n // name: 'Type',\n // multiselect: false,\n // options: reportTypeOptions.map((type) => ({\n // value: type,\n // name: type,\n // view: type,\n // })),\n // },\n // {\n // type: 'field_value_selection',\n // field: 'state',\n // name: 'State',\n // multiselect: false,\n // options: reportStatusOptions.map((state) => ({\n // value: state,\n // name: state,\n // view: state,\n // })),\n // },\n // ],\n\n };\n const displayMessage = reportsTableItems.length === 0 ? emptyMessageReports : '0 reports match the search criteria. Search again';\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(EuiInMemoryTable, {\n items: reportsTableItems,\n itemId: \"id\",\n loading: false,\n message: displayMessage,\n columns: reportsTableColumns,\n search: reportsListSearch,\n pagination: pagination,\n sorting: sorting,\n hasActions: true,\n tableLayout: 'auto'\n }), showLoadingModal);\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiGlobalToastList, EuiButton, EuiTitle, EuiPageBody, EuiSpacer } from '@elastic/eui';\nimport { ReportSettings } from '../report_settings';\nimport { ReportDelivery } from '../delivery';\nimport { ReportTrigger } from '../report_trigger';\nimport { generateReportFromDefinitionId } from '../../main/main_utils';\nimport { converter } from '../utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { definitionInputValidation } from '../utils/utils';\nexport function CreateReport(props) {\n let createReportDefinitionRequest = {\n report_params: {\n report_name: '',\n report_source: '',\n description: '',\n core_params: {\n base_url: '',\n report_format: '',\n time_duration: ''\n }\n },\n delivery: {\n delivery_type: '',\n delivery_params: {}\n },\n trigger: {\n trigger_type: ''\n }\n };\n const [toasts, setToasts] = useState([]);\n const [comingFromError, setComingFromError] = useState(false);\n const [preErrorData, setPreErrorData] = useState({});\n const [showSettingsReportNameError, setShowSettingsReportNameError] = useState(false);\n const [settingsReportNameErrorMessage, setSettingsReportNameErrorMessage] = useState('');\n const [showTriggerIntervalNaNError, setShowTriggerIntervalNaNError] = useState(false);\n const [showCronError, setShowCronError] = useState(false);\n const [showEmailRecipientsError, setShowEmailRecipientsError] = useState(false);\n const [emailRecipientsErrorMessage, setEmailRecipientsErrorMessage] = useState('');\n const [showTimeRangeError, setShowTimeRangeError] = useState(false); // preserve the state of the request after an invalid create report definition request\n\n if (comingFromError) {\n createReportDefinitionRequest = preErrorData;\n }\n\n const addInputValidationErrorToastHandler = () => {\n const errorToast = {\n title: 'One or more fields have an error. Please check and try again.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInputValidationErrorToast = () => {\n addInputValidationErrorToastHandler();\n };\n\n const addErrorOnCreateToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.CREATING_REPORT_DEFINITION);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error creating report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleErrorOnCreateToast = errorType => {\n addErrorOnCreateToastHandler(errorType);\n };\n\n const addInvalidTimeRangeToastHandler = () => {\n const errorToast = {\n title: 'Invalid time range selected.',\n color: 'danger',\n iconType: 'alert',\n id: 'timeRangeErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInvalidTimeRangeToast = () => {\n addInvalidTimeRangeToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n let timeRange = {\n timeFrom: new Date(),\n timeTo: new Date()\n };\n\n const createNewReportDefinition = async (metadata, timeRange) => {\n const {\n httpClient\n } = props; //TODO: need better handle\n\n if (metadata.trigger.trigger_type === 'On demand' && metadata.trigger.trigger_params !== undefined) {\n delete metadata.trigger.trigger_params;\n }\n\n let error = false;\n await definitionInputValidation(metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage).then(response => {\n error = response;\n });\n\n if (error) {\n handleInputValidationErrorToast();\n setPreErrorData(metadata);\n setComingFromError(true);\n } else {\n // convert header and footer to html\n if ('header' in metadata.report_params.core_params) {\n metadata.report_params.core_params.header = converter.makeHtml(metadata.report_params.core_params.header);\n }\n\n if ('footer' in metadata.report_params.core_params) {\n metadata.report_params.core_params.footer = converter.makeHtml(metadata.report_params.core_params.footer);\n }\n\n httpClient.post('../api/reporting/reportDefinition', {\n body: JSON.stringify(metadata),\n headers: {\n 'Content-Type': 'application/json'\n }\n }).then(async resp => {\n //TODO: consider handle the on demand report generation from server side instead\n if (metadata.trigger.trigger_type === 'On demand') {\n const reportDefinitionId = resp.scheduler_response.reportDefinitionId;\n generateReportFromDefinitionId(reportDefinitionId, httpClient);\n }\n\n window.location.assign(`opendistro_kibana_reports#/create=success`);\n }).catch(error => {\n console.log('error in creating report definition: ' + error);\n\n if (error.body.statusCode === 403) {\n handleErrorOnCreateToast('permissions');\n } else {\n handleErrorOnCreateToast('API');\n }\n });\n }\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: 'Create report definition',\n href: '#/create'\n }]);\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h1\", null, \"Create report definition\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportSettings, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showSettingsReportNameError: showSettingsReportNameError,\n settingsReportNameErrorMessage: settingsReportNameErrorMessage,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportTrigger, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n showTriggerIntervalNaNError: showTriggerIntervalNaNError,\n showCronError: showCronError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportDelivery, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n showEmailRecipientsError: showEmailRecipientsError,\n emailRecipientsErrorMessage: emailRecipientsErrorMessage\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButtonEmpty, {\n onClick: () => {\n window.location.assign(`opendistro_kibana_reports#/`);\n }\n }, \"Cancel\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => createNewReportDefinition(createReportDefinitionRequest, timeRange),\n id: 'createNewReportDefinition'\n }, \"Create\"))), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiSpacer, EuiCheckbox } from '@elastic/eui';\nimport { DELIVERY_TYPE_OPTIONS } from './delivery_constants';\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { EmailDelivery } from './email';\nexport function ReportDelivery(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps\n } = props;\n const [emailCheckbox, setEmailCheckbox] = useState(false);\n\n const handleEmailCheckbox = e => {\n setEmailCheckbox(e.target.checked);\n\n if (e.target.checked) {\n // if checked, set delivery type to email\n reportDefinitionRequest.delivery.delivery_type = DELIVERY_TYPE_OPTIONS[1].id;\n } else {\n // uncheck email checkbox means to use default setting, which is kibana user\n defaultCreateDeliveryParams();\n }\n };\n\n const emailDelivery = emailCheckbox ? /*#__PURE__*/React.createElement(EmailDelivery, props) : null;\n\n const defaultCreateDeliveryParams = () => {\n reportDefinitionRequest.delivery = {\n delivery_type: DELIVERY_TYPE_OPTIONS[0].id,\n delivery_params: {\n kibana_recipients: []\n }\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n const isEmailSelected = response.report_definition.delivery.delivery_type === DELIVERY_TYPE_OPTIONS[1].id;\n handleEmailCheckbox({\n target: {\n checked: isEmailSelected\n }\n });\n });\n } else {\n // By default it's set to deliver to kibana user\n defaultCreateDeliveryParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l',\n hidden: true\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Notification settings\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiCheckbox, {\n id: \"emailCheckboxDelivery\",\n label: \"Add email recipients\",\n checked: emailCheckbox,\n onChange: handleEmailCheckbox\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), emailDelivery));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const EMAIL_RECIPIENT_OPTIONS = [];\nexport const DELIVERY_TYPE_OPTIONS = [{\n id: 'Kibana user',\n label: 'Kibana user'\n}, {\n id: 'Channel',\n label: 'Email'\n}];","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiComboBox, EuiFieldText, EuiFormRow, EuiSpacer } from '@elastic/eui';\nimport React, { useEffect } from 'react';\nimport { useState } from 'react';\nimport ReactMDE from 'react-mde';\nimport { converter } from '../utils';\nimport { DELIVERY_TYPE_OPTIONS } from './delivery_constants';\nexport const EmailDelivery = props => {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n showEmailRecipientsError,\n emailRecipientsErrorMessage\n } = props;\n const [emailRecipients, setEmailRecipients] = useState([]);\n const [selectedEmailRecipients, setSelectedEmailRecipients] = useState([]);\n const [emailSubject, setEmailSubject] = useState('');\n const [emailBody, setEmailBody] = useState('');\n const [selectedTab, setSelectedTab] = React.useState('write');\n\n const handleCreateEmailRecipient = (searchValue, flattenedOptions = []) => {\n const normalizedSearchValue = searchValue.trim().toLowerCase();\n\n if (!normalizedSearchValue) {\n return;\n }\n\n const newOption = {\n label: searchValue\n }; // Create the option if it doesn't exist.\n\n if (flattenedOptions.findIndex(option => option.label.trim().toLowerCase() === normalizedSearchValue) === -1) {\n setEmailRecipients([...emailRecipients, newOption]);\n }\n\n handleSelectEmailRecipients([...selectedEmailRecipients, newOption]);\n };\n\n const handleSelectEmailRecipients = e => {\n setSelectedEmailRecipients(e);\n reportDefinitionRequest.delivery.delivery_params.recipients = e.map(option => option.label);\n };\n\n const handleEmailSubject = e => {\n setEmailSubject(e.target.value);\n reportDefinitionRequest.delivery.delivery_params.title = e.target.value;\n };\n\n const handleEmailBody = e => {\n setEmailBody(e);\n reportDefinitionRequest.delivery.delivery_params.textDescription = e;\n reportDefinitionRequest.delivery.delivery_params.htmlDescription = converter.makeHtml(e);\n }; // TODO: need better handling when we add full support for kibana user report delivery\n\n\n const optionalMessageLabel = `Add optional message (${selectedTab} mode)`;\n\n const defaultEditDeliveryParams = delivery => {\n //TODO: need better handle?\n // if the original notification setting is kibana user\n if (delivery.delivery_type === DELIVERY_TYPE_OPTIONS[0].id) {\n defaultCreateDeliveryParams();\n delete reportDefinitionRequest.delivery.delivery_params.kibana_recipients;\n } else {\n //@ts-ignore\n const emailParams = delivery.delivery_params;\n const {\n recipients,\n title,\n textDescription\n } = emailParams;\n const recipientsOptions = recipients.map(email => ({\n label: email\n }));\n handleSelectEmailRecipients(recipientsOptions);\n setEmailRecipients(recipientsOptions);\n setEmailSubject(title);\n reportDefinitionRequest.delivery.delivery_params.title = title;\n handleEmailBody(textDescription);\n }\n };\n\n const defaultCreateDeliveryParams = () => {\n reportDefinitionRequest.delivery.delivery_params = {\n recipients: selectedEmailRecipients.map(option => option.label),\n title: emailSubject,\n textDescription: emailBody,\n htmlDescription: converter.makeHtml(emailBody)\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n defaultEditDeliveryParams(response.report_definition.delivery);\n });\n } else {\n defaultCreateDeliveryParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Email recipients\",\n helpText: \"Select or add users\",\n isInvalid: showEmailRecipientsError,\n error: emailRecipientsErrorMessage\n }, /*#__PURE__*/React.createElement(EuiComboBox, {\n placeholder: 'Add users here',\n options: emailRecipients,\n selectedOptions: selectedEmailRecipients,\n onChange: handleSelectEmailRecipients,\n onCreateOption: handleCreateEmailRecipient,\n isClearable: true,\n \"data-test-subj\": \"demoComboBox\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Email subject\"\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Subject line\",\n value: emailSubject,\n onChange: handleEmailSubject\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: optionalMessageLabel,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMDE, {\n value: emailBody,\n onChange: handleEmailBody,\n selectedTab: selectedTab,\n onTabChange: setSelectedTab,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"xs\"\n }));\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportDelivery } from './delivery';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiButton, EuiPage, EuiTitle, EuiPageBody, EuiSpacer, EuiGlobalToastList } from '@elastic/eui';\nimport { ReportSettings } from '../report_settings';\nimport { ReportDelivery } from '../delivery';\nimport { ReportTrigger } from '../report_trigger';\nimport { converter } from '../utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { definitionInputValidation } from '../utils/utils';\nexport function EditReportDefinition(props) {\n const [toasts, setToasts] = useState([]);\n const [comingFromError, setComingFromError] = useState(false);\n const [preErrorData, setPreErrorData] = useState({});\n const [showSettingsReportNameError, setShowSettingsReportNameError] = useState(false);\n const [settingsReportNameErrorMessage, setSettingsReportNameErrorMessage] = useState('');\n const [showTriggerIntervalNaNError, setShowTriggerIntervalNaNError] = useState(false);\n const [showCronError, setShowCronError] = useState(false);\n const [showEmailRecipientsError, setShowEmailRecipientsError] = useState(false);\n const [emailRecipientsErrorMessage, setEmailRecipientsErrorMessage] = useState('');\n const [showTimeRangeError, setShowTimeRangeError] = useState(false);\n\n const addPermissionsMissingViewEditPageToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.VIEWING_EDIT_PAGE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error loading report definition values.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleViewEditPageErrorToast = errorType => {\n addPermissionsMissingViewEditPageToastHandler(errorType);\n };\n\n const addInputValidationErrorToastHandler = () => {\n const errorToast = {\n title: 'One or more fields have an error. Please check and try again.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInputValidationErrorToast = () => {\n addInputValidationErrorToastHandler();\n };\n\n const addErrorUpdatingReportDefinitionToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.UPDATING_DEFINITION);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error updating report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleErrorUpdatingReportDefinitionToast = errorType => {\n addErrorUpdatingReportDefinitionToastHandler(errorType);\n };\n\n const addErrorDeletingReportDefinitionToastHandler = () => {\n const errorToast = {\n title: 'Error deleting old scheduled report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDeleteToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorDeletingReportDefinitionToast = () => {\n addErrorDeletingReportDefinitionToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const reportDefinitionId = props['match']['params']['reportDefinitionId'];\n let reportDefinition;\n let editReportDefinitionRequest = {\n report_params: {\n report_name: '',\n report_source: '',\n description: '',\n core_params: {\n base_url: '',\n report_format: '',\n time_duration: ''\n }\n },\n delivery: {\n delivery_type: '',\n delivery_params: {}\n },\n trigger: {\n trigger_type: ''\n },\n time_created: 0,\n last_updated: 0,\n status: ''\n };\n reportDefinition = editReportDefinitionRequest; // initialize reportDefinition object\n\n let timeRange = {\n timeFrom: new Date(),\n timeTo: new Date()\n };\n\n if (comingFromError) {\n editReportDefinitionRequest = preErrorData;\n }\n\n const callUpdateAPI = async metadata => {\n const {\n httpClient\n } = props;\n httpClient.put(`../api/reporting/reportDefinitions/${reportDefinitionId}`, {\n body: JSON.stringify(metadata),\n params: reportDefinitionId.toString()\n }).then(async () => {\n window.location.assign(`opendistro_kibana_reports#/edit=success`);\n }).catch(error => {\n console.log('error in updating report definition:', error);\n\n if (error.body.statusCode === 400) {\n handleInputValidationErrorToast();\n } else if (error.body.statusCode === 403) {\n handleErrorUpdatingReportDefinitionToast('permissions');\n } else {\n handleErrorUpdatingReportDefinitionToast('API');\n }\n\n setPreErrorData(metadata);\n setComingFromError(true);\n });\n };\n\n const editReportDefinition = async metadata => {\n if ('header' in metadata.report_params.core_params) {\n metadata.report_params.core_params.header = converter.makeHtml(metadata.report_params.core_params.header);\n }\n\n if ('footer' in metadata.report_params.core_params) {\n metadata.report_params.core_params.footer = converter.makeHtml(metadata.report_params.core_params.footer);\n } // client-side input validation\n\n\n let error = false;\n await definitionInputValidation(metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage).then(response => {\n error = response;\n });\n\n if (error) {\n handleInputValidationErrorToast();\n setPreErrorData(metadata);\n setComingFromError(true);\n } else {\n await callUpdateAPI(metadata);\n }\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n const {\n httpClient\n } = props;\n httpClient.get(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(response => {\n reportDefinition = response.report_definition;\n const {\n time_created: timeCreated,\n status,\n last_updated: lastUpdated,\n report_params: {\n report_name: reportName\n }\n } = reportDefinition; // configure non-editable fields\n\n editReportDefinitionRequest.time_created = timeCreated;\n editReportDefinitionRequest.last_updated = lastUpdated;\n editReportDefinitionRequest.status = status;\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: `Report definition details: ${reportName}`,\n href: `#/report_definition_details/${reportDefinitionId}`\n }, {\n text: `Edit report definition: ${reportName}`\n }]);\n }).catch(error => {\n console.error('error when loading edit report definition page: ', error);\n\n if (error.body.statusCode === 403) {\n handleViewEditPageErrorToast('permissions');\n } else {\n handleViewEditPageErrorToast('API');\n }\n });\n }, []);\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h1\", null, \"Edit report definition\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportSettings, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showSettingsReportNameError: showSettingsReportNameError,\n settingsReportNameErrorMessage: settingsReportNameErrorMessage,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportTrigger, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showTriggerIntervalNaNError: showTriggerIntervalNaNError,\n showCronError: showCronError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportDelivery, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showEmailRecipientsError: showEmailRecipientsError,\n emailRecipientsErrorMessage: emailRecipientsErrorMessage\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButtonEmpty, {\n onClick: () => {\n window.location.assign('opendistro_kibana_reports#/');\n }\n }, \"Cancel\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => editReportDefinition(editReportDefinitionRequest),\n id: 'editReportDefinitionButton'\n }, \"Save Changes\"))), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportSettings } from './report_settings';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFieldText, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiText, EuiSpacer, EuiRadioGroup, EuiSelect, EuiTextArea, EuiCheckboxGroup } from '@elastic/eui';\nimport { REPORT_SOURCE_RADIOS, PDF_PNG_FILE_FORMAT_OPTIONS, HEADER_FOOTER_CHECKBOX, REPORT_SOURCE_TYPES } from './report_settings_constants';\nimport ReactMde from 'react-mde';\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { parseInContextUrl, getSavedSearchBaseUrlCreate, getVisualizationBaseUrlCreate, getSavedSearchOptions, getVisualizationOptions, getDashboardBaseUrlCreate, getDashboardOptions, handleDataToVisualReportSourceChange } from './report_settings_helpers';\nimport { TimeRangeSelect } from './time_range';\nimport { converter } from '../utils';\nexport function ReportSettings(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n timeRange,\n showSettingsReportNameError,\n settingsReportNameErrorMessage,\n showTimeRangeError\n } = props;\n const [reportName, setReportName] = useState('');\n const [reportDescription, setReportDescription] = useState('');\n const [reportSourceId, setReportSourceId] = useState('dashboardReportSource');\n const [dashboardSourceSelect, setDashboardSourceSelect] = useState('');\n const [dashboards, setDashboards] = useState([]);\n const [visualizationSourceSelect, setVisualizationSourceSelect] = useState('');\n const [visualizations, setVisualizations] = useState([]);\n const [savedSearchSourceSelect, setSavedSearchSourceSelect] = useState('');\n const [savedSearches, setSavedSearches] = useState([]);\n const [fileFormat, setFileFormat] = useState('pdf');\n\n const handleDashboards = e => {\n setDashboards(e);\n };\n\n const handleVisualizations = e => {\n setVisualizations(e);\n };\n\n const handleSavedSearches = e => {\n setSavedSearches(e);\n };\n\n const handleReportName = e => {\n setReportName(e.target.value);\n reportDefinitionRequest.report_params.report_name = e.target.value.toString();\n };\n\n const handleReportDescription = e => {\n setReportDescription(e.target.value);\n reportDefinitionRequest.report_params.description = e.target.value.toString();\n };\n\n const handleReportSource = e => {\n setReportSourceId(e);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n if (e === 'dashboardReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Dashboard';\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, editDefinitionId, fromInContext) + dashboards[0].value; // set params to visual report params after switch from saved search\n\n handleDataToVisualReportSourceChange(reportDefinitionRequest);\n setFileFormat('pdf');\n } else if (e === 'visualizationReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Visualization';\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, fromInContext) + visualizations[0].value; // set params to visual report params after switch from saved search\n\n handleDataToVisualReportSourceChange(reportDefinitionRequest);\n setFileFormat('pdf');\n } else if (e === 'savedSearchReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Saved search';\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, fromInContext) + savedSearches[0].value;\n reportDefinitionRequest.report_params.core_params.saved_search_id = savedSearches[0].value;\n reportDefinitionRequest.report_params.core_params.report_format = 'csv';\n reportDefinitionRequest.report_params.core_params.limit = 10000;\n reportDefinitionRequest.report_params.core_params.excel = true;\n }\n };\n\n const handleDashboardSelect = e => {\n setDashboardSourceSelect(e.target.value);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleVisualizationSelect = e => {\n setVisualizationSourceSelect(e.target.value);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleSavedSearchSelect = e => {\n setSavedSearchSourceSelect(e.target.value);\n reportDefinitionRequest.report_params.core_params.saved_search_id = e.target.value;\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleFileFormat = e => {\n setFileFormat(e);\n reportDefinitionRequest.report_params.core_params.report_format = e.toString();\n };\n\n const PDFandPNGFileFormats = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"File format\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: PDF_PNG_FILE_FORMAT_OPTIONS,\n idSelected: fileFormat,\n onChange: handleFileFormat\n })));\n };\n\n const SettingsMarkdown = () => {\n const [checkboxIdSelectHeaderFooter, setCheckboxIdSelectHeaderFooter] = useState({\n ['header']: false,\n ['footer']: false\n });\n const [footer, setFooter] = useState('');\n const [selectedTabFooter, setSelectedTabFooter] = React.useState('write');\n const [header, setHeader] = useState('');\n const [selectedTabHeader, setSelectedTabHeader] = React.useState('write');\n\n const handleHeader = e => {\n setHeader(e);\n reportDefinitionRequest.report_params.core_params.header = e;\n };\n\n const handleFooter = e => {\n setFooter(e);\n reportDefinitionRequest.report_params.core_params.footer = e;\n };\n\n const handleCheckboxHeaderFooter = optionId => {\n const newCheckboxIdToSelectedMap = { ...checkboxIdSelectHeaderFooter,\n ...{\n [optionId]: !checkboxIdSelectHeaderFooter[optionId]\n }\n };\n setCheckboxIdSelectHeaderFooter(newCheckboxIdToSelectedMap);\n };\n\n const showFooter = checkboxIdSelectHeaderFooter.footer ? /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Footer\",\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMde, {\n value: footer,\n onChange: handleFooter,\n selectedTab: selectedTabFooter,\n onTabChange: setSelectedTabFooter,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })) : null;\n const showHeader = checkboxIdSelectHeaderFooter.header ? /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Header\",\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMde, {\n value: header,\n onChange: handleHeader,\n selectedTab: selectedTabHeader,\n onTabChange: setSelectedTabHeader,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })) : null;\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n const reportDefinition = response.report_definition;\n const {\n report_params: {\n core_params: {\n header,\n footer\n }\n }\n } = reportDefinition; // set header/footer default\n\n if (header) {\n checkboxIdSelectHeaderFooter.header = true;\n\n if (!unmounted) {\n setHeader(converter.makeMarkdown(header));\n }\n }\n\n if (footer) {\n checkboxIdSelectHeaderFooter.footer = true;\n\n if (!unmounted) {\n setFooter(converter.makeMarkdown(footer));\n }\n }\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n } else {\n // keeps header/footer from re-rendering empty when other fields in Report Settings are changed\n checkboxIdSelectHeaderFooter.header = 'header' in reportDefinitionRequest.report_params.core_params;\n checkboxIdSelectHeaderFooter.footer = 'footer' in reportDefinitionRequest.report_params.core_params;\n\n if (checkboxIdSelectHeaderFooter.header) {\n setHeader(reportDefinitionRequest.report_params.core_params.header);\n }\n\n if (checkboxIdSelectHeaderFooter.footer) {\n setFooter(reportDefinitionRequest.report_params.core_params.footer);\n }\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiCheckboxGroup, {\n options: HEADER_FOOTER_CHECKBOX,\n idToSelectedMap: checkboxIdSelectHeaderFooter,\n onChange: handleCheckboxHeaderFooter,\n legend: {\n children: 'Header and footer'\n }\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), showHeader, showFooter);\n };\n\n const ReportSourceDashboard = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select dashboard\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceDashboardSelect\",\n options: dashboards,\n value: dashboardSourceSelect,\n onChange: handleDashboardSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ReportSourceVisualization = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select visualization\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceVisualizationSelect\",\n options: visualizations,\n value: visualizationSourceSelect,\n onChange: handleVisualizationSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ReportSourceSavedSearch = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select saved search\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceSavedSearchSelect\",\n options: savedSearches,\n value: savedSearchSourceSelect,\n onChange: handleSavedSearchSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const VisualReportFormatAndMarkdown = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(PDFandPNGFileFormats, null), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const setReportSourceDropdownOption = (options, reportSource, url) => {\n let index = 0;\n\n if (reportSource === REPORT_SOURCE_TYPES.dashboard) {\n for (index = 0; index < options.dashboard.length; ++index) {\n if (url.includes(options.dashboard[index].value)) {\n setDashboardSourceSelect(options.dashboard[index].value);\n }\n }\n } else if (reportSource === REPORT_SOURCE_TYPES.visualization) {\n for (index = 0; index < options.visualizations.length; ++index) {\n if (url.includes(options.visualizations[index].value)) {\n setVisualizationSourceSelect(options.visualizations[index].value);\n }\n }\n } else if (reportSource === REPORT_SOURCE_TYPES.savedSearch) {\n for (index = 0; index < options.savedSearch.length; ++index) {\n if (url.includes(options.savedSearch[index].value)) {\n setSavedSearchSourceSelect(options.savedSearch[index].value);\n }\n }\n }\n };\n\n const setDefaultFileFormat = fileFormat => {\n let index = 0;\n\n for (index = 0; index < PDF_PNG_FILE_FORMAT_OPTIONS.length; ++index) {\n if (fileFormat.toUpperCase() === PDF_PNG_FILE_FORMAT_OPTIONS[index].label) {\n setFileFormat(PDF_PNG_FILE_FORMAT_OPTIONS[index].id);\n }\n }\n };\n\n const setInContextDefaultConfiguration = () => {\n const url = window.location.href;\n const id = parseInContextUrl(url, 'id');\n\n if (url.includes('dashboard')) {\n setReportSourceId('dashboardReportSource');\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[0].label;\n setDashboardSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, id, true) + id;\n } else if (url.includes('visualize')) {\n setReportSourceId('visualizationReportSource');\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[1].label;\n setVisualizationSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, true) + id;\n } else if (url.includes('discover')) {\n setReportSourceId('savedSearchReportSource');\n reportDefinitionRequest.report_params.core_params.report_format = 'csv';\n reportDefinitionRequest.report_params.core_params.saved_search_id = id;\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[2].label;\n setSavedSearchSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, true) + id;\n }\n };\n\n const setDefaultEditValues = async (response, reportSourceOptions) => {\n setReportName(response.report_definition.report_params.report_name);\n setReportDescription(response.report_definition.report_params.description);\n reportDefinitionRequest.report_params.report_name = response.report_definition.report_params.report_name;\n reportDefinitionRequest.report_params.description = response.report_definition.report_params.description;\n reportDefinitionRequest.report_params = response.report_definition.report_params;\n const reportSource = response.report_definition.report_params.report_source;\n REPORT_SOURCE_RADIOS.map(radio => {\n if (radio.label === reportSource) {\n setReportSourceId(radio.id);\n reportDefinitionRequest.report_params.report_source = reportSource;\n }\n });\n setDefaultFileFormat(response.report_definition.report_params.core_params.report_format);\n setReportSourceDropdownOption(reportSourceOptions, reportSource, response.report_definition.report_params.core_params.base_url);\n };\n\n const defaultConfigurationEdit = async httpClientProps => {\n let editData = {};\n await httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n editData = response;\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n return editData;\n };\n\n const defaultConfigurationCreate = async httpClientProps => {\n let reportSourceOptions = {\n dashboard: [],\n visualizations: [],\n savedSearch: []\n };\n reportDefinitionRequest.report_params.core_params.report_format = fileFormat;\n await httpClientProps.get('../api/reporting/getReportSource/dashboard').then(async response => {\n let dashboardOptions = getDashboardOptions(response['hits']['hits']);\n reportSourceOptions.dashboard = dashboardOptions;\n handleDashboards(dashboardOptions);\n\n if (!edit) {\n setDashboardSourceSelect(dashboardOptions[0].value);\n reportDefinitionRequest.report_params.report_source = 'Dashboard';\n reportDefinitionRequest['report_params']['core_params']['base_url'] = getDashboardBaseUrlCreate(edit, editDefinitionId, false) + response['hits']['hits'][0]['_id'].substring(10);\n }\n }).catch(error => {\n console.log('error when fetching dashboards:', error);\n });\n await httpClientProps.get('../api/reporting/getReportSource/visualization').then(async response => {\n let visualizationOptions = getVisualizationOptions(response['hits']['hits']);\n reportSourceOptions.visualizations = visualizationOptions;\n await handleVisualizations(visualizationOptions);\n await setVisualizationSourceSelect(visualizationOptions[0].value);\n }).catch(error => {\n console.log('error when fetching visualizations:', error);\n });\n await httpClientProps.get('../api/reporting/getReportSource/search').then(async response => {\n let savedSearchOptions = getSavedSearchOptions(response['hits']['hits']);\n reportSourceOptions.savedSearch = savedSearchOptions;\n await handleSavedSearches(savedSearchOptions);\n await setSavedSearchSourceSelect(savedSearchOptions[0].value);\n }).catch(error => {\n console.log('error when fetching saved searches:', error);\n });\n return reportSourceOptions;\n };\n\n useEffect(() => {\n let reportSourceOptions = {};\n let editData = {};\n\n if (edit) {\n defaultConfigurationEdit(httpClientProps).then(async response => {\n editData = response;\n });\n }\n\n defaultConfigurationCreate(httpClientProps).then(async response => {\n reportSourceOptions = response; // if coming from in-context menu\n\n if (window.location.href.indexOf('?') > -1) {\n setInContextDefaultConfiguration();\n }\n\n if (edit) {\n setDefaultEditValues(editData, reportSourceOptions);\n }\n });\n }, []);\n const displayDashboardSelect = reportSourceId === 'dashboardReportSource' ? /*#__PURE__*/React.createElement(ReportSourceDashboard, null) : null;\n const displayVisualizationSelect = reportSourceId === 'visualizationReportSource' ? /*#__PURE__*/React.createElement(ReportSourceVisualization, null) : null;\n const displaySavedSearchSelect = reportSourceId === 'savedSearchReportSource' ? /*#__PURE__*/React.createElement(ReportSourceSavedSearch, null) : null;\n const displayVisualReportsFormatAndMarkdown = reportSourceId != 'savedSearchReportSource' ? /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(VisualReportFormatAndMarkdown, null), /*#__PURE__*/React.createElement(SettingsMarkdown, null)) : /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"File format\"\n }, /*#__PURE__*/React.createElement(EuiText, null, /*#__PURE__*/React.createElement(\"p\", null, \"CSV\"))));\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Report Settings\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Name\",\n helpText: \"Valid characters are a-z, A-Z, 0-9, (), [], _ (underscore), - (hyphen) and (space).\",\n isInvalid: showSettingsReportNameError,\n error: settingsReportNameErrorMessage,\n id: 'reportSettingsName'\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Report name (e.g Log Traffic Daily Report)\",\n value: reportName,\n onChange: handleReportName\n })))), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n style: {\n maxWidth: 600\n }\n }, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Description (optional)\",\n id: 'reportSettingsDescription'\n }, /*#__PURE__*/React.createElement(EuiTextArea, {\n placeholder: \"Describe this report (e.g Morning daily reports for log traffic)\",\n value: reportDescription,\n onChange: handleReportDescription\n })))), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Report source\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: REPORT_SOURCE_RADIOS,\n idSelected: reportSourceId,\n onChange: handleReportSource,\n disabled: edit\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), displayDashboardSelect, displayVisualizationSelect, displaySavedSearchSelect, /*#__PURE__*/React.createElement(TimeRangeSelect, {\n timeRange: timeRange,\n reportDefinitionRequest: reportDefinitionRequest,\n edit: edit,\n id: editDefinitionId,\n httpClientProps: httpClientProps,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), displayVisualReportsFormatAndMarkdown, /*#__PURE__*/React.createElement(EuiSpacer, null)));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const REPORT_SOURCE_RADIOS = [{\n id: 'dashboardReportSource',\n label: 'Dashboard'\n}, {\n id: 'visualizationReportSource',\n label: 'Visualization'\n}, {\n id: 'savedSearchReportSource',\n label: 'Saved search'\n}];\nexport const PDF_PNG_FILE_FORMAT_OPTIONS = [{\n id: 'pdf',\n label: 'PDF'\n}, {\n id: 'png',\n label: 'PNG'\n}];\nexport const SAVED_SEARCH_FORMAT_OPTIONS = [{\n id: 'csvFormat',\n label: 'CSV'\n}, {\n id: 'xlsFormat',\n label: 'XLS'\n}];\nexport const HEADER_FOOTER_CHECKBOX = [{\n id: 'header',\n label: 'Add header'\n}, {\n id: 'footer',\n label: 'Add footer'\n}];\nexport const REPORT_SOURCE_TYPES = {\n dashboard: 'Dashboard',\n visualization: 'Visualization',\n savedSearch: 'Saved search'\n};\nexport const commonTimeRanges = [{\n start: 'now/d',\n end: 'now',\n label: 'Today so far'\n}, {\n start: 'now/w',\n end: 'now',\n label: 'Week to date'\n}, {\n start: 'now/M',\n end: 'now',\n label: 'Month to date'\n}, {\n start: 'now/y',\n end: 'now',\n label: 'Year to date'\n}];","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const parseInContextUrl = (url, parameter) => {\n const info = url.split('?');\n\n if (parameter === 'id') {\n return info[1].substring(info[1].indexOf(':') + 1, info[1].length);\n } else if (parameter === 'timeFrom') {\n return info[2].substring(info[2].indexOf('=') + 1, info[2].length);\n } else if (parameter === 'timeTo') {\n return info[3].substring(info[3].indexOf('=') + 1, info[3].length);\n }\n\n return 'error: invalid parameter';\n};\nexport const getDashboardBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/dashboards#/view/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'dashboards#/view/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'dashboards#/view/');\n};\nexport const getVisualizationBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/visualize#/edit/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'visualize#/edit/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'visualize#/edit/');\n};\nexport const getSavedSearchBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/discover#/view/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'discover#/view/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'discover#/view/');\n};\nexport const getDashboardOptions = data => {\n let index;\n let dashboard_options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(10),\n text: data[index]['_source']['dashboard']['title']\n };\n dashboard_options.push(entry);\n }\n\n return dashboard_options;\n};\nexport const getVisualizationOptions = data => {\n let index;\n let options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(14),\n text: data[index]['_source']['visualization']['title']\n };\n options.push(entry);\n }\n\n return options;\n};\nexport const getSavedSearchOptions = data => {\n let index;\n let options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(7),\n text: data[index]['_source']['search']['title']\n };\n options.push(entry);\n }\n\n return options;\n};\nexport const handleDataToVisualReportSourceChange = reportDefinitionRequest => {\n delete reportDefinitionRequest.report_params.core_params.saved_search_id;\n delete reportDefinitionRequest.report_params.core_params.limit;\n delete reportDefinitionRequest.report_params.core_params.excel;\n reportDefinitionRequest.report_params.core_params.report_format = 'pdf';\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport moment from 'moment';\nimport React, { useState, useEffect } from 'react';\nimport { parseInContextUrl } from './report_settings_helpers';\nimport dateMath from '@elastic/datemath';\nimport { EuiFormRow, EuiGlobalToastList, EuiSuperDatePicker } from '@elastic/eui';\nimport { commonTimeRanges } from './report_settings_constants';\nexport function TimeRangeSelect(props) {\n const {\n reportDefinitionRequest,\n timeRange,\n edit,\n id,\n httpClientProps,\n showTimeRangeError\n } = props;\n const [recentlyUsedRanges, setRecentlyUsedRanges] = useState([]);\n const [isLoading, setIsLoading] = useState(false);\n const [start, setStart] = useState('now-30m');\n const [end, setEnd] = useState('now');\n const [toasts, setToasts] = useState([]);\n\n const addInvalidTimeRangeToastHandler = () => {\n const errorToast = {\n title: 'Invalid time range selected',\n color: 'danger',\n iconType: 'alert',\n id: 'timeRangeErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInvalidTimeRangeToast = () => {\n addInvalidTimeRangeToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const isValidTimeRange = (timeRangeMoment, limit, handleInvalidTimeRangeToast) => {\n if (limit === 'start') {\n if (!timeRangeMoment || !timeRangeMoment.isValid()) {\n handleInvalidTimeRangeToast();\n }\n } else if (limit === 'end') {\n if (!timeRangeMoment || !timeRangeMoment.isValid() || timeRangeMoment > moment.now()) {\n handleInvalidTimeRangeToast();\n }\n }\n };\n\n const setDefaultEditTimeRange = (duration, unmounted) => {\n let time_difference = moment.now() - duration;\n const fromDate = new Date(time_difference);\n parseTimeRange(fromDate, end, reportDefinitionRequest);\n\n if (!unmounted) {\n setStart(fromDate.toISOString());\n setEnd(end);\n }\n }; // valid time range check for absolute time end date\n\n\n const checkValidAbsoluteEndDate = end => {\n let endDate = new Date(end);\n let nowDate = new Date(moment.now());\n let valid = true;\n\n if (endDate.getTime() > nowDate.getTime()) {\n end = 'now';\n valid = false;\n }\n\n return valid;\n };\n\n useEffect(() => {\n let unmounted = false; // if we are coming from the in-context menu\n\n if (window.location.href.indexOf('?') > -1) {\n const url = window.location.href;\n const timeFrom = parseInContextUrl(url, 'timeFrom');\n const timeTo = parseInContextUrl(url, 'timeTo');\n parseTimeRange(timeFrom, timeTo, reportDefinitionRequest);\n\n if (!unmounted) {\n setStart(timeFrom);\n setEnd(timeTo);\n }\n } else {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${id}`).then(async response => {\n let duration = response.report_definition.report_params.core_params.time_duration;\n duration = moment.duration(duration);\n setDefaultEditTimeRange(duration, unmounted);\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n } else {\n parseTimeRange(start, end, reportDefinitionRequest);\n }\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n\n const onTimeChange = ({\n start,\n end\n }) => {\n isValidTimeRange(dateMath.parse(start), 'start', handleInvalidTimeRangeToast);\n isValidTimeRange(dateMath.parse(end, {\n roundUp: true\n }), 'end', handleInvalidTimeRangeToast);\n const recentlyUsedRange = recentlyUsedRanges.filter(recentlyUsedRange => {\n const isDuplicate = recentlyUsedRange.start === start && recentlyUsedRange.end === end;\n return !isDuplicate;\n });\n const validEndDate = checkValidAbsoluteEndDate(end);\n\n if (!validEndDate) {\n handleInvalidTimeRangeToast();\n return;\n }\n\n recentlyUsedRange.unshift({\n start,\n end\n });\n setStart(start);\n setEnd(end);\n setRecentlyUsedRanges(recentlyUsedRange.length > 10 ? recentlyUsedRange.slice(0, 9) : recentlyUsedRange);\n setIsLoading(true);\n startLoading();\n parseTimeRange(start, end, reportDefinitionRequest);\n };\n\n const parseTimeRange = (start, end, reportDefinitionRequest) => {\n timeRange.timeFrom = dateMath.parse(start);\n timeRange.timeTo = dateMath.parse(end);\n const timeDuration = moment.duration(dateMath.parse(end).diff(dateMath.parse(start)));\n reportDefinitionRequest.report_params.core_params.time_duration = timeDuration.toISOString();\n };\n\n const startLoading = () => {\n setTimeout(stopLoading, 1000);\n };\n\n const stopLoading = () => {\n setIsLoading(false);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Time range\",\n helpText: \"Time range is relative to the report creation date on the report trigger.\",\n isInvalid: showTimeRangeError,\n error: 'Invalid time range selected.'\n }, /*#__PURE__*/React.createElement(EuiSuperDatePicker, {\n isDisabled: false,\n isLoading: isLoading,\n start: start,\n end: end,\n onTimeChange: onTimeChange,\n showUpdateButton: false,\n commonlyUsedRanges: commonTimeRanges\n }))), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportTrigger } from './report_trigger';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiFormRow, EuiRadioGroup, EuiDatePicker, EuiSelect, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiText, EuiFieldText, EuiCheckboxGroup, EuiLink, EuiFieldNumber } from '@elastic/eui';\nimport moment from 'moment';\nimport { SCHEDULE_RECURRING_OPTIONS, INTERVAL_TIME_PERIODS, WEEKLY_CHECKBOX_OPTIONS, MONTHLY_ON_THE_OPTIONS, TRIGGER_TYPE_OPTIONS, SCHEDULE_TYPE_OPTIONS, TIMEZONE_OPTIONS } from './report_trigger_constants';\nimport { TimezoneSelect } from './timezone';\nexport function ReportTrigger(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n showTriggerIntervalNaNError,\n showCronError\n } = props;\n const [reportTriggerType, setReportTriggerType] = useState(TRIGGER_TYPE_OPTIONS[0].id);\n const [scheduleType, setScheduleType] = useState(SCHEDULE_TYPE_OPTIONS[0].label); //TODO: should read local timezone and display\n\n const [scheduleRecurringFrequency, setScheduleRecurringFrequency] = useState('daily');\n const [recurring, setRecurringTime] = useState(moment());\n const [weeklyCheckbox, setWeeklyCheckbox] = useState({\n ['monCheckbox']: true\n });\n const [monthlySelect, setMonthlySelect] = useState(MONTHLY_ON_THE_OPTIONS[0].value);\n\n const handleReportTriggerType = e => {\n setReportTriggerType(e);\n reportDefinitionRequest.trigger.trigger_type = e;\n\n if (e === 'On demand') {\n delete reportDefinitionRequest.trigger.trigger_params;\n }\n };\n\n const handleScheduleType = e => {\n setScheduleType(e);\n\n if (e === SCHEDULE_TYPE_OPTIONS[1].label) {\n delete reportDefinitionRequest.trigger.trigger_params.schedule.interval;\n } else if (e === SCHEDULE_TYPE_OPTIONS[0].label) {\n delete reportDefinitionRequest.trigger.trigger_params.schedule.cron;\n }\n };\n\n const handleScheduleRecurringFrequency = e => {\n setScheduleRecurringFrequency(e.target.value);\n reportDefinitionRequest.trigger.trigger_params.schedule_type = e.target.value;\n };\n\n const handleRecurringTime = e => {\n setRecurringTime(e);\n };\n\n const handleWeeklyCheckbox = e => {\n const newCheckboxIdToSelectedMap = { ...weeklyCheckbox,\n ...{\n [e]: !weeklyCheckbox[e]\n }\n };\n setWeeklyCheckbox(newCheckboxIdToSelectedMap);\n };\n\n const handleMonthlySelect = e => {\n setMonthlySelect(e.target.value);\n };\n\n const RequestTime = () => {\n useEffect(() => {\n let recurringDaily = {\n interval: {\n period: 1,\n unit: 'DAYS',\n start_time: recurring.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurring.valueOf(),\n schedule: recurringDaily\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurring,\n onChange: handleRecurringTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const RecurringDaily = () => {\n const [recurringDailyTime, setRecurringDailyTime] = useState(moment());\n\n const handleRecurringDailyTime = e => {\n setRecurringDailyTime(e);\n reportDefinitionRequest.trigger.trigger_params.schedule.interval.start_time = e.valueOf();\n };\n\n const setDailyParams = () => {\n let recurringDaily = {\n interval: {\n period: 1,\n unit: 'DAYS',\n start_time: recurringDailyTime.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurringDailyTime.valueOf(),\n schedule: recurringDaily\n };\n };\n\n const isDailySchedule = response => {\n return response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id && response.report_definition.trigger.trigger_params.schedule.interval.period === 1 && response.report_definition.trigger.trigger_params.schedule.interval === 'DAYS';\n };\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n // if switching from on demand to schedule\n if (response.report_definition.trigger.trigger_type === 'On demand') {\n setDailyParams();\n } else if (isDailySchedule(response)) {\n const date = moment(response.report_definition.trigger.trigger_params.schedule.interval.start_time);\n\n if (!unmounted) {\n setRecurringDailyTime(date);\n }\n } // if switching from on-demand to schedule\n else if (reportDefinitionRequest.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n setDailyParams();\n }\n });\n } else {\n setDailyParams();\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurringDailyTime,\n onChange: handleRecurringDailyTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const RecurringInterval = () => {\n const [intervalText, setIntervalText] = useState('');\n const [intervalTimePeriod, setIntervalTimePeriod] = useState(INTERVAL_TIME_PERIODS[0].value);\n const [recurringIntervalTime, setRecurringIntervalTime] = useState(moment());\n\n const handleRecurringIntervalTime = e => {\n setRecurringIntervalTime(e);\n reportDefinitionRequest.trigger.trigger_params.schedule.interval.start_time = e.valueOf();\n };\n\n const handleIntervalText = e => {\n setIntervalText(e.target.value);\n };\n\n const handleIntervalTimePeriod = e => {\n setIntervalTimePeriod(e.target.value);\n };\n\n useEffect(() => {\n let interval = {\n interval: {\n period: parseInt(intervalText, 10),\n unit: intervalTimePeriod,\n start_time: recurringIntervalTime.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurringIntervalTime.valueOf(),\n schedule: interval\n };\n }, [intervalTimePeriod, intervalText]); // second useEffect() only to be triggered before render when on Edit\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n if (response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n const date = moment(response.report_definition.trigger.trigger_params.schedule.interval.start_time);\n\n if (!unmounted) {\n setRecurringIntervalTime(date);\n setIntervalText(response.report_definition.trigger.trigger_params.schedule.interval.period.toString());\n setIntervalTimePeriod(response.report_definition.trigger.trigger_params.schedule.interval.unit);\n }\n }\n });\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Every\",\n isInvalid: showTriggerIntervalNaNError,\n error: 'Interval must be a number.'\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Must be a number\",\n value: intervalText,\n onChange: handleIntervalText\n })), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiFormRow, null, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"intervalTimeUnit\",\n options: INTERVAL_TIME_PERIODS,\n value: intervalTimePeriod,\n onChange: handleIntervalTimePeriod\n }))))), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Start time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurringIntervalTime,\n onChange: handleRecurringIntervalTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })));\n };\n\n const RecurringWeekly = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Every\"\n }, /*#__PURE__*/React.createElement(EuiCheckboxGroup, {\n options: WEEKLY_CHECKBOX_OPTIONS,\n idToSelectedMap: weeklyCheckbox,\n onChange: handleWeeklyCheckbox\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(RequestTime, null));\n };\n\n const RecurringMonthly = () => {\n const [monthlyDayNumber, setMonthlyDayNumber] = useState('');\n\n const handleMonthlyDayNumber = e => {\n setMonthlyDayNumber(e.target.value);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"On the\"\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"monthlySelect\",\n options: MONTHLY_ON_THE_OPTIONS,\n value: monthlySelect,\n onChange: handleMonthlySelect\n })), /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFieldNumber, {\n placeholder: 'Day of month',\n value: monthlyDayNumber,\n onChange: handleMonthlyDayNumber\n })))), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"s\"\n }), /*#__PURE__*/React.createElement(RequestTime, null));\n };\n\n const CronExpression = () => {\n const [cronExpression, setCronExpression] = useState('');\n\n const handleCronExpression = e => {\n setCronExpression(e.target.value);\n reportDefinitionRequest.trigger.trigger_params.schedule.cron.expression = e.target.value;\n };\n\n const setCronParams = () => {\n let cron = {\n cron: {\n expression: '',\n timezone: TIMEZONE_OPTIONS[0].value\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: Date.now().valueOf(),\n schedule: cron\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n // if switching from on demand to schedule\n if (response.report_definition.trigger.trigger_type === 'On demand') {\n setCronParams();\n } else if (response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[1].id) {\n setCronExpression(response.report_definition.trigger.trigger_params.schedule.cron.expression);\n } else {\n setCronParams();\n }\n });\n } else {\n setCronParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Custom cron expression\",\n isInvalid: showCronError,\n error: 'Invalid cron expression.',\n labelAppend: /*#__PURE__*/React.createElement(EuiText, {\n size: \"xs\"\n }, /*#__PURE__*/React.createElement(EuiLink, {\n href: \"https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/cron/\",\n target: \"_blank\"\n }, \"Cron help\"))\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: 'Ex: 0 12 * * * (Fire at 12:00 PM (noon) every day)',\n value: cronExpression,\n onChange: handleCronExpression\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ScheduleTriggerRecurring = () => {\n const display_daily = scheduleRecurringFrequency === 'daily' ? /*#__PURE__*/React.createElement(RecurringDaily, null) : null;\n const display_interval = scheduleRecurringFrequency === 'byInterval' ? /*#__PURE__*/React.createElement(RecurringInterval, null) : null;\n const display_weekly = scheduleRecurringFrequency === 'weekly' ? /*#__PURE__*/React.createElement(RecurringWeekly, null) : null;\n const display_monthly = scheduleRecurringFrequency === 'monthly' ? /*#__PURE__*/React.createElement(RecurringMonthly, null) : null;\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Frequency\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"recurringFrequencySelect\",\n options: SCHEDULE_RECURRING_OPTIONS,\n value: scheduleRecurringFrequency,\n onChange: handleScheduleRecurringFrequency\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), display_daily, display_interval, display_weekly, display_monthly);\n };\n\n const ScheduleTrigger = () => {\n const display_recurring = scheduleType === SCHEDULE_TYPE_OPTIONS[0].id ? /*#__PURE__*/React.createElement(ScheduleTriggerRecurring, null) : null;\n const display_cron = scheduleType === SCHEDULE_TYPE_OPTIONS[1].id ? /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(CronExpression, null), /*#__PURE__*/React.createElement(TimezoneSelect, {\n reportDefinitionRequest: reportDefinitionRequest,\n httpClientProps: httpClientProps,\n edit: edit,\n editDefinitionId: editDefinitionId\n })) : null;\n useEffect(() => {\n // Set default trigger_type\n SCHEDULE_TYPE_OPTIONS.map(item => {\n if (item.id === scheduleType) {\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n schedule_type: item.id //TODO: need better handle\n\n };\n\n if (!edit) {\n reportDefinitionRequest.trigger.trigger_params.enabled = true;\n }\n\n if (!('enabled' in reportDefinitionRequest.trigger.trigger_params)) {\n reportDefinitionRequest.trigger.trigger_params.enabled = true;\n }\n }\n });\n }, [scheduleType]);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: SCHEDULE_TYPE_OPTIONS,\n idSelected: scheduleType,\n onChange: handleScheduleType\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), display_recurring, display_cron);\n };\n\n const schedule = reportTriggerType === 'Schedule' ? /*#__PURE__*/React.createElement(ScheduleTrigger, null) : null;\n\n const defaultEditTriggerType = trigger_type => {\n let index = 0;\n\n for (index; index < TRIGGER_TYPE_OPTIONS.length; ++index) {\n if (TRIGGER_TYPE_OPTIONS[index].id === trigger_type) {\n setReportTriggerType(TRIGGER_TYPE_OPTIONS[index].id);\n }\n }\n };\n\n const defaultEditRequestType = trigger => {\n let index = 0;\n\n for (index; index < SCHEDULE_TYPE_OPTIONS.length; ++index) {\n if (SCHEDULE_TYPE_OPTIONS[index].id === trigger.trigger_params.schedule_type) {\n setScheduleType(SCHEDULE_TYPE_OPTIONS[index].id);\n }\n }\n };\n\n const defaultEditScheduleFrequency = trigger_params => {\n if (trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n if (trigger_params.schedule.interval.unit === 'DAYS') {\n setScheduleRecurringFrequency('daily');\n } else {\n setScheduleRecurringFrequency('byInterval');\n }\n }\n };\n\n const defaultConfigurationEdit = trigger => {\n defaultEditTriggerType(trigger.trigger_type);\n\n if (trigger.trigger_type === 'Schedule') {\n defaultEditScheduleFrequency(trigger.trigger_params);\n defaultEditRequestType(trigger);\n } else if (trigger.trigger_type == 'On demand') {\n setReportTriggerType('On demand');\n reportDefinitionRequest.trigger.trigger_type = 'On demand';\n }\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n defaultConfigurationEdit(response.report_definition.trigger);\n reportDefinitionRequest.trigger = response.report_definition.trigger;\n });\n } // Set default trigger_type for create new report definition\n else {\n TRIGGER_TYPE_OPTIONS.map(item => {\n if (item.id === reportTriggerType) {\n reportDefinitionRequest.trigger.trigger_type = item.id;\n }\n });\n }\n }, []);\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Report trigger\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Trigger type\",\n id: \"reportDefinitionTriggerTypes\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: TRIGGER_TYPE_OPTIONS,\n idSelected: reportTriggerType,\n onChange: handleReportTriggerType\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), schedule));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport moment from 'moment-timezone';\nexport const TRIGGER_TYPE_OPTIONS = [{\n id: 'On demand',\n label: 'On demand'\n}, {\n id: 'Schedule',\n label: 'Schedule'\n}];\nexport const SCHEDULE_TYPE_OPTIONS = [{\n id: 'Recurring',\n label: 'Recurring'\n}, {\n id: 'Cron based',\n label: 'Cron-based'\n}];\nexport const SCHEDULE_RECURRING_OPTIONS = [{\n value: 'daily',\n text: 'Daily'\n}, {\n value: 'byInterval',\n text: 'By interval'\n} // TODO: disable on UI. Add them back once we support\n// {\n// value: 'weekly',\n// text: 'Weekly',\n// },\n// {\n// value: 'monthly',\n// text: 'Monthly',\n// },\n];\nexport const INTERVAL_TIME_PERIODS = [{\n value: 'MINUTES',\n text: 'Minutes'\n}, {\n value: 'HOURS',\n text: 'Hours'\n}, {\n value: 'DAYS',\n text: 'Days'\n}];\nexport const WEEKLY_CHECKBOX_OPTIONS = [{\n id: 'monCheckbox',\n label: 'Mon'\n}, {\n id: 'tueCheckbox',\n label: 'Tue'\n}, {\n id: 'wedCheckbox',\n label: 'Wed'\n}, {\n id: 'thuCheckbox',\n label: 'Thu'\n}, {\n id: 'friCheckbox',\n label: 'Fri'\n}, {\n id: 'satCheckbox',\n label: 'Sat'\n}, {\n id: 'sunCheckbox',\n label: 'Sun'\n}];\nexport const MONTHLY_ON_THE_OPTIONS = [{\n value: 'day',\n text: 'Day'\n}];\nexport const TIMEZONE_OPTIONS = moment.tz.names().map(tz => ({\n value: tz,\n text: tz\n}));","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiFormRow, EuiSelect } from '@elastic/eui';\nimport React, { useState, useEffect } from 'react';\nimport { TIMEZONE_OPTIONS } from './report_trigger_constants';\nexport function TimezoneSelect(props) {\n const {\n reportDefinitionRequest,\n httpClientProps,\n edit,\n editDefinitionId\n } = props;\n const [timezone, setTimezone] = useState(TIMEZONE_OPTIONS[0].value);\n\n const handleTimezone = e => {\n setTimezone(e.target.value);\n\n if (reportDefinitionRequest.trigger.trigger_params.schedule_type === 'Cron based') {\n reportDefinitionRequest.trigger.trigger_params.schedule.cron.timezone = e.target.value;\n }\n };\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n if (!unmounted && reportDefinitionRequest.trigger.trigger_params.schedule_type === 'Cron based') {\n setTimezone(response.report_definition.trigger.trigger_params.schedule.cron.timezone);\n }\n });\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Timezone\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"setTimezone\",\n options: TIMEZONE_OPTIONS,\n value: timezone,\n onChange: handleTimezone\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport Showdown from 'showdown';\nexport const converter = new Showdown.Converter({\n tables: true,\n simplifiedAutoLink: true,\n strikethrough: true,\n tasklists: true,\n noHeaderId: true\n});","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { isValidCron } from \"cron-validator\";\nimport moment from \"moment\";\nexport const definitionInputValidation = async (metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage) => {\n // check report name\n // allow a-z, A-Z, 0-9, (), [], ',' - and _ and spaces\n let regexp = /^[\\w\\-\\s\\(\\)\\[\\]\\,\\_\\-+]+$/;\n\n if (metadata.report_params.report_name.search(regexp) === -1) {\n setShowSettingsReportNameError(true);\n\n if (metadata.report_params.report_name === '') {\n setSettingsReportNameErrorMessage('Name must not be empty.');\n } else {\n setSettingsReportNameErrorMessage('Invalid characters in report name.');\n }\n\n error = true;\n } // if recurring by interval and input is not a number\n\n\n if (metadata.trigger.trigger_type === 'Schedule' && metadata.trigger.trigger_params.schedule_type === 'Recurring') {\n let interval = parseInt(metadata.trigger.trigger_params.schedule.interval.period);\n\n if (isNaN(interval)) {\n setShowTriggerIntervalNaNError(true);\n error = true;\n }\n } // if time range is invalid\n\n\n const nowDate = new Date(moment.now());\n\n if (timeRange.timeFrom > timeRange.timeTo || timeRange.timeTo > nowDate) {\n setShowTimeRangeError(true);\n error = true;\n } // if cron based and cron input is invalid\n\n\n if (metadata.trigger.trigger_type === 'Schedule' && metadata.trigger.trigger_params.schedule_type === 'Cron based') {\n if (!isValidCron(metadata.trigger.trigger_params.schedule.cron.expression)) {\n setShowCronError(true);\n error = true;\n }\n } // if email delivery\n\n\n if (metadata.delivery.delivery_type === 'Channel') {\n // no recipients are listed\n if (metadata.delivery.delivery_params.recipients.length === 0) {\n setShowEmailRecipientsError(true);\n setEmailRecipientsErrorMessage('Email recipients list cannot be empty.');\n error = true;\n } // recipients have invalid email addresses: regexp checks format xxxxx@yyyy.zzz\n\n\n let emailRegExp = /\\S+@\\S+\\.\\S+/;\n let index;\n let recipients = metadata.delivery.delivery_params.recipients;\n\n for (index = 0; index < recipients.length; ++index) {\n if (recipients[0].search(emailRegExp) === -1) {\n setShowEmailRecipientsError(true);\n setEmailRecipientsErrorMessage('Invalid email addresses in recipients list.');\n error = true;\n }\n }\n }\n\n return error;\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from \"react\";\nexport const permissionsMissingToast = action => {\n return {\n title: 'Error ' + action,\n color: 'danger',\n iconType: 'alert',\n id: 'permissionsMissingErrorToast' + action.replace(' ', ''),\n text: /*#__PURE__*/React.createElement(\"p\", null, \"Insufficient permissions. Reach out to your Kibana administrator.\")\n };\n};\nexport const permissionsMissingActions = {\n CHANGE_SCHEDULE_STATUS: 'changing schedule status.',\n DELETE_REPORT_DEFINITION: 'deleting report definition.',\n GENERATING_REPORT: 'generating report.',\n LOADING_REPORTS_TABLE: 'loading reports table.',\n LOADING_DEFINITIONS_TABLE: 'loading report definitions table.',\n VIEWING_EDIT_PAGE: 'viewing edit page.',\n UPDATING_DEFINITION: 'updating report definition',\n CREATING_REPORT_DEFINITION: 'creating new report definition.'\n};"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7eA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxNA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3EA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnJA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClRA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7HA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1LA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7cA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"1.plugin.js","sources":["/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/application.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/app.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/loading_modal/index.ts","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/loading_modal/loading_modal.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/main.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/report_definition_details/report_definition_details.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/report_details/report_details.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/main/reports_table.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/create/create_report_definition.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/delivery_constants.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/email.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/delivery/index.ts","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/edit/edit_report_definition.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/index.ts","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_constants.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/report_settings_helpers.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_settings/time_range.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/index.ts","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/report_trigger_constants.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/report_trigger/timezone.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/utils/index.ts","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/report_definitions/utils/utils.tsx","/plugin:opendistro_kibana_reports/.kibana-reports/kibana-reports/public/components/utils/utils.tsx"],"sourcesContent":["/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { OpendistroKibanaReportsApp } from './components/app';\nexport const renderApp = ({\n notifications,\n http,\n chrome\n}, {\n navigation\n}, {\n appBasePath,\n element\n}) => {\n ReactDOM.render( /*#__PURE__*/React.createElement(OpendistroKibanaReportsApp, {\n basename: appBasePath,\n notifications: notifications,\n http: http,\n navigation: navigation,\n chrome: chrome\n }), element);\n return () => ReactDOM.unmountComponentAtNode(element);\n};","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from 'react';\nimport { I18nProvider } from '@kbn/i18n/react';\nimport { HashRouter as Router, Route, Switch } from 'react-router-dom';\nimport { EuiPage, EuiPageBody, EuiPageContentBody, EuiPageContentHeader, EuiPageContentHeaderSection } from '@elastic/eui';\nimport { CreateReport } from './report_definitions/create/create_report_definition';\nimport { Main } from './main/main';\nimport { ReportDetails } from './main/report_details/report_details';\nimport { ReportDefinitionDetails } from './main/report_definition_details/report_definition_details';\nimport { EditReportDefinition } from './report_definitions/edit/edit_report_definition';\nconst styles = {\n float: 'left',\n width: '100%',\n maxWidth: '1600px'\n};\nexport const OpendistroKibanaReportsApp = ({\n basename,\n notifications,\n http,\n navigation,\n chrome\n}) => {\n // Render the application DOM.\n return /*#__PURE__*/React.createElement(Router, {\n basename: '/' + basename\n }, /*#__PURE__*/React.createElement(I18nProvider, null, /*#__PURE__*/React.createElement(\"div\", {\n style: styles\n }, /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiPageContentHeader, null, /*#__PURE__*/React.createElement(EuiPageContentHeaderSection, null)), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {\n path: \"/report_details/:reportId\",\n render: props => /*#__PURE__*/React.createElement(ReportDetails, _extends({\n title: \"Report Details\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/report_definition_details/:reportDefinitionId\",\n render: props => /*#__PURE__*/React.createElement(ReportDefinitionDetails, _extends({\n title: \"Report Definition Details\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/create\",\n render: props => /*#__PURE__*/React.createElement(CreateReport, _extends({\n title: \"Create Report\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/edit/:reportDefinitionId\",\n render: props => /*#__PURE__*/React.createElement(EditReportDefinition, _extends({\n title: \"Edit Report Definition\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }), /*#__PURE__*/React.createElement(Route, {\n path: \"/\",\n render: props => /*#__PURE__*/React.createElement(Main, _extends({\n title: \"Reporting Homepage\",\n httpClient: http\n }, props, {\n setBreadcrumbs: chrome.setBreadcrumbs\n }))\n }))))))));\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { GenerateReportLoadingModal } from './loading_modal';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiOverlayMask, EuiModal, EuiModalHeader, EuiTitle, EuiText, EuiModalBody, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiButton } from \"@elastic/eui\";\nimport React, { useState } from \"react\";\nexport function GenerateReportLoadingModal(props) {\n const {\n setShowLoading\n } = props;\n const [isModalVisible, setIsModalVisible] = useState(true);\n\n const closeModal = () => {\n setIsModalVisible(false);\n setShowLoading(false);\n };\n\n const showModal = () => setIsModalVisible(true);\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiOverlayMask, null, /*#__PURE__*/React.createElement(EuiModal, {\n onClose: closeModal,\n style: {\n maxWidth: 350,\n minWidth: 300\n }\n }, /*#__PURE__*/React.createElement(EuiModalHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(EuiText, {\n textAlign: \"right\"\n }, /*#__PURE__*/React.createElement(\"h2\", null, \"Generating report\")))), /*#__PURE__*/React.createElement(EuiModalBody, null, /*#__PURE__*/React.createElement(EuiText, null, \"Preparing your file for download.\"), /*#__PURE__*/React.createElement(EuiText, null, \"You can close this dialog while we continue in the background.\"), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"center\",\n alignItems: \"center\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiLoadingSpinner, {\n size: \"xl\",\n style: {\n minWidth: 75,\n minHeight: 75\n }\n }))), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"l\"\n }), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n alignItems: \"flexEnd\",\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: closeModal\n }, \"Close\")))))));\n}\n;","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useState, useEffect } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiButton, EuiTitle // @ts-ignore\n, EuiHorizontalRule, EuiPanel, EuiGlobalToastList } from '@elastic/eui';\nimport { ReportsTable } from './reports_table';\nimport { addReportsTableContent, addReportDefinitionsTableContent } from './main_utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../utils/utils';\nconst reportCountStyles = {\n color: 'gray',\n display: 'inline'\n};\nexport function Main(props) {\n const [reportsTableContent, setReportsTableContent] = useState([]);\n const [reportDefinitionsTableContent, setReportDefinitionsTableContent] = useState([]);\n const [toasts, setToasts] = useState([]);\n\n const addPermissionsMissingDownloadToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDownloadToast = () => {\n addPermissionsMissingDownloadToastHandler();\n };\n\n const addReportsTableContentErrorToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.LOADING_REPORTS_TABLE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error generating reports table.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportsTableErrorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleReportsTableErrorToast = errorType => {\n addReportsTableContentErrorToastHandler(errorType);\n };\n\n const addReportDefinitionsTableErrorToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.LOADING_DEFINITIONS_TABLE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error generating report definitions table.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDefinitionsTableErrorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleReportDefinitionsTableErrorToast = errorType => {\n addReportDefinitionsTableErrorToastHandler(errorType);\n };\n\n const addErrorOnDemandDownloadToastHandler = () => {\n const errorToast = {\n title: 'Error downloading report.',\n color: 'danger',\n iconType: 'alert',\n id: 'onDemandDownloadErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleOnDemandDownloadErrorToast = () => {\n addErrorOnDemandDownloadToastHandler();\n };\n\n const addSuccessOnDemandDownloadToastHandler = () => {\n const successToast = {\n title: 'Successfully downloaded report.',\n color: 'success',\n iconType: 'check',\n id: 'onDemandDownloadSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleOnDemandDownloadSuccessToast = () => {\n addSuccessOnDemandDownloadToastHandler();\n };\n\n const addCreateReportDefinitionSuccessToastHandler = () => {\n const successToast = {\n title: 'Successfully created report definition.',\n color: 'success',\n iconType: 'check',\n id: 'createReportDefinitionSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleCreateReportDefinitionSuccessToast = () => {\n addCreateReportDefinitionSuccessToastHandler();\n };\n\n const addEditReportDefinitionSuccessToastHandler = () => {\n const successToast = {\n title: 'Successfully updated report definition.',\n color: 'success',\n iconType: 'check',\n id: 'editReportDefinitionSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleEditReportDefinitionSuccessToast = () => {\n addEditReportDefinitionSuccessToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const pagination = {\n initialPageSize: 10,\n pageSizeOptions: [5, 10, 20]\n };\n useEffect(() => {\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }]);\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n\n if (window.location.href.includes('create=success')) {\n handleCreateReportDefinitionSuccessToast(); // refresh might not fetch the latest changes when coming from create or edit page\n // workaround to wait 1 second and refresh again\n\n setTimeout(() => {\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n }, 1000);\n } else if (window.location.href.includes('edit=success')) {\n handleEditReportDefinitionSuccessToast();\n setTimeout(() => {\n refreshReportsTable();\n refreshReportsDefinitionsTable();\n }, 1000);\n }\n\n window.location.href = 'opendistro_kibana_reports#/';\n }, []);\n\n const refreshReportsTable = async () => {\n const {\n httpClient\n } = props;\n await httpClient.get('../api/reporting/reports').then(response => {\n setReportsTableContent(addReportsTableContent(response.data));\n }).catch(error => {\n console.log('error when fetching all reports: ', error); // permission denied error\n\n if (error.body.statusCode === 403) {\n handleReportsTableErrorToast('permissions');\n } else {\n handleReportsTableErrorToast('API');\n }\n });\n };\n\n const refreshReportsDefinitionsTable = async () => {\n const {\n httpClient\n } = props;\n await httpClient.get('../api/reporting/reportDefinitions').then(response => {\n setReportDefinitionsTableContent(addReportDefinitionsTableContent(response.data));\n }).catch(error => {\n console.log('error when fetching all report definitions: ', error);\n\n if (error.body.statusCode === 403) {\n handleReportDefinitionsTableErrorToast('permissions');\n } else {\n handleReportDefinitionsTableErrorToast('API');\n }\n });\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiPanel, {\n paddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"spaceEvenly\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Reports\", ' ', /*#__PURE__*/React.createElement(\"p\", {\n style: reportCountStyles\n }, \" (\", reportsTableContent.length, \")\")))), /*#__PURE__*/React.createElement(EuiFlexItem, {\n component: \"span\",\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: refreshReportsTable,\n iconSide: \"left\",\n iconType: \"refresh\"\n }, \"Refresh\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(ReportsTable, {\n pagination: pagination,\n reportsTableItems: reportsTableContent,\n httpClient: props['httpClient'],\n handleSuccessToast: handleOnDemandDownloadSuccessToast,\n handleErrorToast: handleOnDemandDownloadErrorToast,\n handlePermissionsMissingToast: handlePermissionsMissingDownloadToast\n })), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPageHeader, EuiTitle, EuiPageBody, EuiPageContent, EuiHorizontalRule, EuiSpacer, EuiPageHeaderSection, EuiButton, EuiIcon, EuiLink, EuiGlobalToastList, EuiOverlayMask, EuiConfirmModal } from '@elastic/eui';\nimport { ReportDetailsComponent, trimAndRenderAsText } from '../report_details/report_details';\nimport { fileFormatsUpper, generateReportFromDefinitionId } from '../main_utils';\nimport moment from 'moment';\nimport { converter } from '../../report_definitions/utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { GenerateReportLoadingModal } from '../loading_modal';\nconst ON_DEMAND = 'On demand';\nexport function ReportDefinitionDetails(props) {\n const [reportDefinitionDetails, setReportDefinitionDetails] = useState({});\n const [reportDefinitionRawResponse, setReportDefinitionRawResponse] = useState({});\n const [toasts, setToasts] = useState([]);\n const [showDeleteModal, setShowDeleteModal] = useState(false);\n const [showLoading, setShowLoading] = useState(false);\n const reportDefinitionId = props.match['params']['reportDefinitionId'];\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const handleShowDeleteModal = e => {\n setShowDeleteModal(e);\n };\n\n const addPermissionsMissingStatusChangeToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.CHANGE_SCHEDULE_STATUS);\n setToasts(toasts.concat(toast));\n };\n\n const addPermissionsMissingDeleteToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.DELETE_REPORT_DEFINITION);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDeleteToast = () => {\n addPermissionsMissingDeleteToastHandler();\n };\n\n const addPermissionsMissingGenerateReportToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const addErrorLoadingDetailsToastHandler = () => {\n const errorToast = {\n title: 'Error loading report definition details.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDefinitionDetailsErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleDetailsErrorToast = () => {\n addErrorLoadingDetailsToastHandler();\n };\n\n const addSuccessGeneratingReportToastHandler = () => {\n const successToast = {\n title: 'Successfully generated report.',\n color: 'success',\n iconType: 'check',\n id: 'generateReportSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessGeneratingReportToast = () => {\n addSuccessGeneratingReportToastHandler();\n };\n\n const addErrorGeneratingReportToastHandler = () => {\n const errorToast = {\n title: 'Error generating report.',\n color: 'danger',\n iconType: 'alert',\n id: 'generateReportErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorGeneratingReportToast = errorType => {\n if (errorType === 'permissions') {\n addPermissionsMissingGenerateReportToastHandler();\n } else if (errorType === 'API') {\n addErrorGeneratingReportToastHandler();\n }\n };\n\n const addSuccessEnablingScheduleToastHandler = () => {\n const successToast = {\n title: 'Successfully enabled schedule.',\n color: 'success',\n iconType: 'check',\n id: 'successEnableToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const addErrorEnablingScheduleToastHandler = () => {\n const errorToast = {\n title: 'Error enabling schedule.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const addSuccessDisablingScheduleToastHandler = () => {\n const successToast = {\n title: 'Successfully disabled schedule.',\n color: 'success',\n iconType: 'check',\n id: 'successDisableToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessChangingScheduleStatusToast = statusChange => {\n if (statusChange === 'enable') {\n addSuccessEnablingScheduleToastHandler();\n } else if (statusChange === 'disable') {\n addSuccessDisablingScheduleToastHandler();\n }\n };\n\n const addErrorDisablingScheduleToastHandler = () => {\n const errorToast = {\n title: 'Error disabling schedule.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDisableToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorChangingScheduleStatusToast = statusChange => {\n if (statusChange === 'enable') {\n addErrorEnablingScheduleToastHandler();\n } else if (statusChange === 'disable') {\n addErrorDisablingScheduleToastHandler();\n } else if (statusChange === 'permissions') {\n addPermissionsMissingStatusChangeToastHandler();\n }\n };\n\n const addErrorDeletingReportDefinitionToastHandler = () => {\n const errorToast = {\n title: 'Error deleting report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDeleteToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorDeletingReportDefinitionToast = () => {\n addErrorDeletingReportDefinitionToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const handleReportDefinitionDetails = e => {\n setReportDefinitionDetails(e);\n };\n\n const handleReportDefinitionRawResponse = e => {\n setReportDefinitionRawResponse(e);\n };\n\n const DeleteConfirmationModal = () => {\n const closeModal = () => {\n setShowDeleteModal(false);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiOverlayMask, null, /*#__PURE__*/React.createElement(EuiConfirmModal, {\n title: \"Delete report definition\",\n onCancel: closeModal,\n onConfirm: deleteReportDefinition,\n cancelButtonText: \"Cancel\",\n confirmButtonText: \"Delete\",\n buttonColor: \"danger\",\n defaultFocusedButton: \"confirm\"\n }, /*#__PURE__*/React.createElement(\"p\", null, \"Are you sure you want to delete \\\"\", reportDefinitionDetails.name, \"\\\"?\"))));\n };\n\n const humanReadableScheduleDetails = trigger => {\n let scheduleDetails = '';\n\n if (trigger.trigger_type === 'Schedule') {\n if (trigger.trigger_params.schedule_type === 'Recurring') {\n // Daily\n if (trigger.trigger_params.schedule.interval.unit === 'DAYS' && trigger.trigger_params.schedule.interval.period === 1) {\n const date = new Date(trigger.trigger_params.schedule.interval.start_time);\n scheduleDetails = 'Daily @ ' + date.toTimeString();\n } // By interval\n else {\n const date = new Date(trigger.trigger_params.schedule.interval.start_time);\n scheduleDetails = 'By interval, every ' + trigger.trigger_params.schedule.interval.period + ' ' + trigger.trigger_params.schedule.interval.unit.toLowerCase() + ', starting @ ' + date.toTimeString();\n }\n } // Cron\n else if (trigger.trigger_params.schedule_type === 'Cron based') {\n scheduleDetails = 'Cron based: ' + trigger.trigger_params.schedule.cron.expression + ' (' + trigger.trigger_params.schedule.cron.timezone + ')';\n }\n }\n\n return scheduleDetails;\n };\n\n const getReportDefinitionDetailsMetadata = data => {\n const reportDefinition = data.report_definition;\n const {\n report_params: reportParams,\n trigger,\n delivery,\n time_created: timeCreated,\n last_updated: lastUpdated\n } = reportDefinition;\n const {\n trigger_type: triggerType,\n trigger_params: triggerParams\n } = trigger;\n const {\n delivery_type: deliveryType,\n delivery_params: deliveryParams\n } = delivery;\n const {\n core_params: {\n base_url: baseUrl,\n report_format: reportFormat,\n time_duration: timeDuration\n }\n } = reportParams;\n let readableDate = new Date(timeCreated);\n let displayCreatedDate = readableDate.toDateString() + ' ' + readableDate.toLocaleTimeString();\n let readableUpdatedDate = new Date(lastUpdated);\n let displayUpdatedDate = readableUpdatedDate.toDateString() + ' ' + readableUpdatedDate.toLocaleTimeString();\n let reportDefinitionDetails = {\n name: reportParams.report_name,\n description: reportParams.description === '' ? `\\u2014` : reportParams.description,\n created: displayCreatedDate,\n lastUpdated: displayUpdatedDate,\n source: reportParams.report_source,\n baseUrl: baseUrl,\n // TODO: need better display\n timePeriod: moment.duration(timeDuration).humanize(),\n fileFormat: reportFormat,\n reportHeader: reportParams.core_params.hasOwnProperty('header') && reportParams.core_params.header != \"\" ? converter.makeMarkdown(reportParams.core_params.header) : `\\u2014`,\n reportFooter: reportParams.core_params.hasOwnProperty('footer') && reportParams.core_params.footer != \"\" ? converter.makeMarkdown(reportParams.core_params.footer) : `\\u2014`,\n triggerType: triggerType,\n scheduleDetails: triggerParams ? humanReadableScheduleDetails(data.report_definition.trigger) : `\\u2014`,\n channel: deliveryType,\n status: reportDefinition.status,\n kibanaRecipients: deliveryParams.kibana_recipients ? deliveryParams.kibana_recipients : `\\u2014`,\n emailRecipients: deliveryType === 'Channel' ? deliveryParams.recipients : `\\u2014`,\n emailSubject: deliveryType === 'Channel' ? deliveryParams.title : `\\u2014`,\n emailBody: deliveryType === 'Channel' ? deliveryParams.textDescription : `\\u2014`\n };\n return reportDefinitionDetails;\n };\n\n useEffect(() => {\n const {\n httpClient\n } = props;\n httpClient.get(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(response => {\n handleReportDefinitionRawResponse(response);\n handleReportDefinitionDetails(getReportDefinitionDetailsMetadata(response));\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: `Report definition details: ${response.report_definition.report_params.report_name}`\n }]);\n }).catch(error => {\n console.error('error when getting report definition details:', error);\n handleDetailsErrorToast();\n });\n }, []);\n\n const downloadIconDownload = async () => {\n handleLoading(true);\n await generateReportFromDetails();\n handleLoading(false);\n };\n\n const fileFormatDownload = data => {\n let formatUpper = data['fileFormat'];\n formatUpper = fileFormatsUpper[formatUpper];\n return /*#__PURE__*/React.createElement(EuiLink, {\n onClick: downloadIconDownload\n }, formatUpper + ' ', /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }));\n };\n\n const sourceURL = data => {\n return /*#__PURE__*/React.createElement(EuiLink, {\n href: `${data.baseUrl}`,\n target: \"_blank\"\n }, data['source']);\n };\n\n const getRelativeStartDate = duration => {\n duration = moment.duration(duration);\n let time_difference = moment.now() - duration;\n return new Date(time_difference);\n };\n\n const changeScheduledReportDefinitionStatus = statusChange => {\n let updatedReportDefinition = reportDefinitionRawResponse.report_definition;\n\n if (statusChange === 'Disable') {\n updatedReportDefinition.trigger.trigger_params.enabled = false;\n updatedReportDefinition.status = 'Disabled';\n } else if (statusChange === 'Enable') {\n updatedReportDefinition.trigger.trigger_params.enabled = true;\n updatedReportDefinition.status = 'Active';\n }\n\n const {\n httpClient\n } = props;\n httpClient.put(`../api/reporting/reportDefinitions/${reportDefinitionId}`, {\n body: JSON.stringify(updatedReportDefinition),\n params: reportDefinitionId.toString()\n }).then(() => {\n const updatedRawResponse = {\n report_definition: {}\n };\n updatedRawResponse.report_definition = updatedReportDefinition;\n handleReportDefinitionRawResponse(updatedRawResponse);\n setReportDefinitionDetails(getReportDefinitionDetailsMetadata(updatedRawResponse));\n\n if (statusChange === 'Enable') {\n handleSuccessChangingScheduleStatusToast('enable');\n } else if (statusChange === 'Disable') {\n handleSuccessChangingScheduleStatusToast('disable');\n }\n }).catch(error => {\n console.error('error in updating report definition status:', error);\n\n if (error.body.statusCode === 403) {\n handleErrorChangingScheduleStatusToast('permissions');\n } else {\n if (statusChange === 'Enable') {\n handleErrorChangingScheduleStatusToast('enable');\n } else if (statusChange === 'Disable') {\n handleErrorChangingScheduleStatusToast('disable');\n }\n }\n });\n };\n\n const ScheduledDefinitionStatus = () => {\n const status = reportDefinitionDetails.status === 'Active' ? 'Disable' : 'Enable';\n return /*#__PURE__*/React.createElement(EuiButton, {\n onClick: () => changeScheduledReportDefinitionStatus(status),\n id: 'changeStatusFromDetailsButton'\n }, status);\n };\n\n const generateReportFromDetails = async () => {\n const {\n httpClient\n } = props;\n let generateReportSuccess = await generateReportFromDefinitionId(reportDefinitionId, httpClient);\n\n if (generateReportSuccess.status) {\n handleSuccessGeneratingReportToast();\n } else {\n if (generateReportSuccess.permissionsError) {\n handleErrorGeneratingReportToast('permissions');\n } else {\n handleErrorGeneratingReportToast('API');\n }\n }\n };\n\n const deleteReportDefinition = () => {\n const {\n httpClient\n } = props;\n httpClient.delete(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(() => {\n window.location.assign(`opendistro_kibana_reports#/`);\n }).catch(error => {\n console.log('error when deleting report definition:', error);\n\n if (error.body.statusCode === 403) {\n handlePermissionsMissingDeleteToast();\n } else {\n handleErrorDeletingReportDefinitionToast();\n }\n });\n };\n\n const showActionButton = reportDefinitionDetails.triggerType === ON_DEMAND ? /*#__PURE__*/React.createElement(EuiButton, {\n onClick: () => generateReportFromDetails(),\n id: 'generateReportFromDetailsButton'\n }, \"Generate report\") : /*#__PURE__*/React.createElement(ScheduledDefinitionStatus, null);\n const triggerSection = reportDefinitionDetails.triggerType === ON_DEMAND ? /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Trigger type',\n reportDetailsComponentContent: reportDefinitionDetails.triggerType\n }) : /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Trigger type',\n reportDetailsComponentContent: reportDefinitionDetails.triggerType\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule details',\n reportDetailsComponentContent: reportDefinitionDetails.scheduleDetails\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Status',\n reportDetailsComponentContent: reportDefinitionDetails.status\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null));\n const showDeleteConfirmationModal = showDeleteModal ? /*#__PURE__*/React.createElement(DeleteConfirmationModal, null) : null;\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, {\n size: \"l\"\n }, /*#__PURE__*/React.createElement(\"h1\", null, \"Report definition details\")), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"m\"\n }), /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiPageHeaderSection, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, reportDefinitionDetails.name))))), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\",\n alignItems: \"flexEnd\",\n gutterSize: \"l\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n color: 'danger',\n onClick: handleShowDeleteModal,\n id: 'deleteReportDefinitionButton'\n }, \"Delete\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, showActionButton), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => {\n window.location.assign(`opendistro_kibana_reports#/edit/${reportDefinitionId}`);\n },\n id: 'editReportDefinitionButton'\n }, \"Edit\")))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report settings\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Name',\n reportDetailsComponentContent: reportDefinitionDetails.name\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Description',\n reportDetailsComponentContent: reportDefinitionDetails.description\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Created',\n reportDetailsComponentContent: reportDefinitionDetails.created\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Last updated',\n reportDetailsComponentContent: reportDefinitionDetails.lastUpdated\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Source',\n reportDetailsComponentContent: sourceURL(reportDefinitionDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Time period',\n reportDetailsComponentContent: `Last ${reportDefinitionDetails.timePeriod}`\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'File format',\n reportDetailsComponentContent: fileFormatDownload(reportDefinitionDetails)\n }), /*#__PURE__*/React.createElement(EuiFlexItem, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report header',\n reportDetailsComponentContent: trimAndRenderAsText(reportDefinitionDetails.reportHeader)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report footer',\n reportDetailsComponentContent: trimAndRenderAsText(reportDefinitionDetails.reportFooter)\n }), /*#__PURE__*/React.createElement(EuiFlexItem, null), /*#__PURE__*/React.createElement(EuiFlexItem, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report trigger\")), /*#__PURE__*/React.createElement(EuiSpacer, null), triggerSection, /*#__PURE__*/React.createElement(EuiSpacer, null)), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }), showDeleteConfirmationModal, showLoadingModal));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPageHeader, EuiTitle, EuiPageBody, EuiPageContent, EuiHorizontalRule, EuiSpacer, EuiDescriptionList, EuiDescriptionListTitle, EuiDescriptionListDescription, EuiPageHeaderSection, EuiLink, EuiIcon, EuiGlobalToastList } from '@elastic/eui';\nimport { fileFormatsUpper, generateReportById } from '../main_utils';\nimport { GenerateReportLoadingModal } from '../loading_modal';\nimport { converter } from '../../report_definitions/utils';\nimport dateMath from '@elastic/datemath';\nimport { permissionsMissingActions, permissionsMissingToast } from '../../utils/utils';\nexport const ReportDetailsComponent = props => {\n const {\n reportDetailsComponentTitle,\n reportDetailsComponentContent\n } = props;\n return /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiDescriptionList, null, /*#__PURE__*/React.createElement(EuiDescriptionListTitle, null, reportDetailsComponentTitle), /*#__PURE__*/React.createElement(EuiDescriptionListDescription, null, reportDetailsComponentContent)));\n}; // convert markdown to plain text, trim it if it's longer than 3 lines\n\nexport const trimAndRenderAsText = markdown => {\n if (!markdown) return markdown;\n const lines = markdown.split('\\n').filter(line => line);\n const elements = lines.slice(0, 3).map((line, i) => /*#__PURE__*/React.createElement(\"p\", {\n key: i\n }, line));\n return lines.length <= 3 ? elements : elements.concat( /*#__PURE__*/React.createElement(\"p\", {\n key: 3\n }, \"...\"));\n};\nexport const formatEmails = emails => {\n return Array.isArray(emails) ? emails.join(', ') : emails;\n};\nexport function ReportDetails(props) {\n const [reportDetails, setReportDetails] = useState({});\n const [toasts, setToasts] = useState([]);\n const [showLoading, setShowLoading] = useState(false);\n const reportId = props.match['params']['reportId'];\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const addPermissionsMissingDownloadToastHandler = () => {\n const toast = permissionsMissingToast(permissionsMissingActions.GENERATING_REPORT);\n setToasts(toasts.concat(toast));\n };\n\n const handlePermissionsMissingDownloadToast = () => {\n addPermissionsMissingDownloadToastHandler();\n };\n\n const addErrorToastHandler = () => {\n const errorToast = {\n title: 'Error loading report details.',\n color: 'danger',\n iconType: 'alert',\n id: 'reportDetailsErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorToast = () => {\n addErrorToastHandler();\n };\n\n const addSuccessToastHandler = () => {\n const successToast = {\n title: 'Success',\n color: 'success',\n text: /*#__PURE__*/React.createElement(\"p\", null, \"Report successfully downloaded!\"),\n id: 'onDemandDownloadSuccessToast'\n };\n setToasts(toasts.concat(successToast));\n };\n\n const handleSuccessToast = () => {\n addSuccessToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const handleReportDetails = e => {\n setReportDetails(e);\n };\n\n const convertTimestamp = timestamp => {\n let displayDate = `\\u2014`;\n\n if (timestamp) {\n let readableDate = new Date(timestamp);\n displayDate = readableDate.toLocaleString();\n }\n\n return displayDate;\n };\n\n const parseTimePeriod = queryUrl => {\n let [timeStringRegEx, fromDateString, toDateString] = queryUrl.match(/time:\\(from:(.+),to:(.+?)\\)/);\n fromDateString = fromDateString.replace(/[']+/g, '');\n toDateString = toDateString.replace(/[']+/g, '');\n let fromDateParsed = dateMath.parse(fromDateString);\n let toDateParsed = dateMath.parse(toDateString);\n const fromTimePeriod = fromDateParsed === null || fromDateParsed === void 0 ? void 0 : fromDateParsed.toDate();\n const toTimePeriod = toDateParsed === null || toDateParsed === void 0 ? void 0 : toDateParsed.toDate();\n return (fromTimePeriod === null || fromTimePeriod === void 0 ? void 0 : fromTimePeriod.toLocaleString()) + ' -> ' + (toTimePeriod === null || toTimePeriod === void 0 ? void 0 : toTimePeriod.toLocaleString());\n };\n\n const getReportDetailsData = report => {\n const {\n report_definition: reportDefinition,\n last_updated: lastUpdated,\n state,\n query_url: queryUrl\n } = report;\n const {\n report_params: reportParams,\n trigger,\n delivery\n } = reportDefinition;\n const {\n trigger_type: triggerType,\n trigger_params: triggerParams\n } = trigger;\n const {\n delivery_type: deliveryType,\n delivery_params: deliveryParams\n } = delivery;\n const coreParams = reportParams.core_params; // covert timestamp to local date-time string\n\n let reportDetails = {\n reportName: reportParams.report_name,\n description: reportParams.description === '' ? `\\u2014` : reportParams.description,\n created: convertTimestamp(report.time_created),\n lastUpdated: convertTimestamp(report.last_updated),\n source: reportParams.report_source,\n // TODO: we have all data needed, time_from, time_to, time_duration,\n // think of a way to better display\n time_period: parseTimePeriod(queryUrl),\n defaultFileFormat: coreParams.report_format,\n state: state,\n reportHeader: reportParams.core_params.hasOwnProperty('header') && reportParams.core_params.header != \"\" ? converter.makeMarkdown(reportParams.core_params.header) : `\\u2014`,\n reportFooter: reportParams.core_params.hasOwnProperty('footer') && reportParams.core_params.footer != \"\" ? converter.makeMarkdown(reportParams.core_params.footer) : `\\u2014`,\n triggerType: triggerType,\n scheduleType: triggerParams ? triggerParams.schedule_type : `\\u2014`,\n scheduleDetails: `\\u2014`,\n alertDetails: `\\u2014`,\n channel: deliveryType,\n emailRecipients: deliveryType === 'Channel' ? deliveryParams.recipients : `\\u2014`,\n emailSubject: deliveryType === 'Channel' ? deliveryParams.title : `\\u2014`,\n emailBody: deliveryType === 'Channel' ? deliveryParams.textDescription : `\\u2014`,\n queryUrl: queryUrl\n };\n return reportDetails;\n };\n\n useEffect(() => {\n const {\n httpClient\n } = props;\n httpClient.get('../api/reporting/reports/' + reportId).then(response => {\n handleReportDetails(getReportDetailsData(response));\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: 'Report details: ' + response.report_definition.report_params.report_name\n }]);\n }).catch(error => {\n console.log('Error when fetching report details: ', error);\n handleErrorToast();\n });\n }, []);\n\n const downloadIconDownload = async () => {\n handleLoading(true);\n await generateReportById(reportId, props.httpClient, handleSuccessToast, handleErrorToast, handlePermissionsMissingDownloadToast);\n handleLoading(false);\n };\n\n const fileFormatDownload = data => {\n let formatUpper = data['defaultFileFormat'];\n formatUpper = fileFormatsUpper[formatUpper];\n return /*#__PURE__*/React.createElement(EuiLink, {\n onClick: downloadIconDownload\n }, formatUpper + ' ', /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }));\n };\n\n const sourceURL = data => {\n return /*#__PURE__*/React.createElement(EuiLink, {\n href: `${data.queryUrl}`,\n target: \"_blank\"\n }, data['source']);\n };\n\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, {\n size: \"l\"\n }, /*#__PURE__*/React.createElement(\"h1\", null, \"Report details\")), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"m\"\n }), /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiPageHeaderSection, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, reportDetails['reportName'])))))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report Settings\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Name',\n reportDetailsComponentContent: reportDetails['reportName']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Description',\n reportDetailsComponentContent: reportDetails['description']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Created',\n reportDetailsComponentContent: reportDetails['created']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Last updated',\n reportDetailsComponentContent: reportDetails['lastUpdated']\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Source',\n reportDetailsComponentContent: sourceURL(reportDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Time period',\n reportDetailsComponentContent: reportDetails.time_period\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'File format',\n reportDetailsComponentContent: fileFormatDownload(reportDetails)\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'State',\n reportDetailsComponentContent: reportDetails['state']\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report header',\n reportDetailsComponentContent: trimAndRenderAsText(reportDetails['reportHeader'])\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report footer',\n reportDetailsComponentContent: trimAndRenderAsText(reportDetails['reportFooter'])\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null), /*#__PURE__*/React.createElement(ReportDetailsComponent, null)), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h3\", null, \"Report trigger\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Report type',\n reportDetailsComponentContent: reportDetails['triggerType']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule type',\n reportDetailsComponentContent: reportDetails['scheduleType']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, {\n reportDetailsComponentTitle: 'Schedule details',\n reportDetailsComponentContent: reportDetails['scheduleDetails']\n }), /*#__PURE__*/React.createElement(ReportDetailsComponent, null)), /*#__PURE__*/React.createElement(EuiSpacer, null)), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n }), showLoadingModal));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { Fragment, useState } from 'react';\nimport { EuiLink, EuiText, EuiIcon, EuiEmptyPrompt, EuiInMemoryTable } from '@elastic/eui';\nimport { fileFormatsUpper, humanReadableDate, generateReportById } from './main_utils';\nimport { GenerateReportLoadingModal } from './loading_modal';\nimport dateMath from '@elastic/datemath';\nconst reportStatusOptions = ['Created', 'Error', 'Pending', 'Shared', 'Archived'];\nconst reportTypeOptions = ['Schedule', 'On demand'];\nconst emptyMessageReports = /*#__PURE__*/React.createElement(EuiEmptyPrompt, {\n title: /*#__PURE__*/React.createElement(\"h3\", null, \"No reports to display\"),\n titleSize: \"xs\",\n body: /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiText, null, \"Create a report definition, or share/download a report from a dashboard, saved search or visualization.\"), /*#__PURE__*/React.createElement(EuiText, null, \"To learn more, see\", ' ', /*#__PURE__*/React.createElement(EuiLink, {\n href: \"https://opendistro.github.io/for-elasticsearch-docs/docs/kibana/reporting/\",\n target: \"_blank\"\n }, \"Get started with Kibana reporting \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"popout\"\n }))))\n});\nexport function ReportsTable(props) {\n const {\n pagination,\n reportsTableItems,\n httpClient,\n handleSuccessToast,\n handleErrorToast,\n handlePermissionsMissingToast\n } = props;\n const [sortField, setSortField] = useState('timeCreated');\n const [sortDirection, setSortDirection] = useState('des');\n const [showLoading, setShowLoading] = useState(false);\n const [message, setMessage] = useState('');\n\n const handleLoading = e => {\n setShowLoading(e);\n };\n\n const onDemandDownload = async id => {\n handleLoading(true);\n await generateReportById(id, httpClient, handleSuccessToast, handleErrorToast, handlePermissionsMissingToast);\n handleLoading(false);\n };\n\n const parseTimePeriod = queryUrl => {\n let [timeStringRegEx, fromDateString, toDateString] = queryUrl.match(/time:\\(from:(.+),to:(.+?)\\)/);\n fromDateString = fromDateString.replace(/[']+/g, '');\n toDateString = toDateString.replace(/[']+/g, '');\n let fromDateParsed = dateMath.parse(fromDateString);\n let toDateParsed = dateMath.parse(toDateString);\n const fromTimePeriod = fromDateParsed === null || fromDateParsed === void 0 ? void 0 : fromDateParsed.toDate();\n const toTimePeriod = toDateParsed === null || toDateParsed === void 0 ? void 0 : toDateParsed.toDate();\n return (fromTimePeriod === null || fromTimePeriod === void 0 ? void 0 : fromTimePeriod.toLocaleString()) + ' -> ' + (toTimePeriod === null || toTimePeriod === void 0 ? void 0 : toTimePeriod.toLocaleString());\n };\n\n const reportsTableColumns = [{\n field: 'reportName',\n name: 'Report ID',\n render: reportName => {\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, reportName);\n }\n }, {\n // TODO: link to dashboard/visualization snapshot, use \"queryUrl\" field. Display dashboard name?\n field: 'reportSource',\n name: 'Source',\n render: (reportSource, item) => item.state === 'Pending' ? /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, reportSource) : /*#__PURE__*/React.createElement(EuiLink, {\n href: item.url,\n target: \"_blank\"\n }, reportSource)\n }, // {\n // field: 'type',\n // name: 'Type',\n // sortable: true,\n // truncateText: false,\n // },\n {\n field: 'timeCreated',\n name: 'Creation time',\n render: date => {\n let readable = humanReadableDate(date);\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, readable);\n }\n }, {\n field: 'url',\n name: 'Time period',\n render: url => {\n let timePeriod = parseTimePeriod(url);\n return /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, timePeriod);\n }\n }, // {\n // field: 'state',\n // name: 'State',\n // sortable: true,\n // truncateText: false,\n // },\n {\n field: 'id',\n name: 'Generate',\n render: (id, item) => item.state === 'Pending' ? /*#__PURE__*/React.createElement(EuiText, {\n size: \"s\"\n }, fileFormatsUpper[item.format], \" \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n })) : /*#__PURE__*/React.createElement(EuiLink, {\n onClick: () => onDemandDownload(id)\n }, fileFormatsUpper[item.format], \" \", /*#__PURE__*/React.createElement(EuiIcon, {\n type: \"importAction\"\n }))\n }];\n const sorting = {\n sort: {\n field: sortField,\n direction: sortDirection\n }\n };\n const reportsListSearch = {\n box: {\n incremental: true,\n placeholder: 'Search by Report ID'\n } // filters: [\n // {\n // type: 'field_value_selection',\n // field: 'type',\n // name: 'Type',\n // multiselect: false,\n // options: reportTypeOptions.map((type) => ({\n // value: type,\n // name: type,\n // view: type,\n // })),\n // },\n // {\n // type: 'field_value_selection',\n // field: 'state',\n // name: 'State',\n // multiselect: false,\n // options: reportStatusOptions.map((state) => ({\n // value: state,\n // name: state,\n // view: state,\n // })),\n // },\n // ],\n\n };\n const displayMessage = reportsTableItems.length === 0 ? emptyMessageReports : '0 reports match the search criteria. Search again';\n const showLoadingModal = showLoading ? /*#__PURE__*/React.createElement(GenerateReportLoadingModal, {\n setShowLoading: setShowLoading\n }) : null;\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(EuiInMemoryTable, {\n items: reportsTableItems,\n itemId: \"id\",\n loading: false,\n message: displayMessage,\n columns: reportsTableColumns,\n search: reportsListSearch,\n pagination: pagination,\n sorting: sorting,\n hasActions: true,\n tableLayout: 'auto'\n }), showLoadingModal);\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiGlobalToastList, EuiButton, EuiTitle, EuiPageBody, EuiSpacer } from '@elastic/eui';\nimport { ReportSettings } from '../report_settings';\nimport { ReportDelivery } from '../delivery';\nimport { ReportTrigger } from '../report_trigger';\nimport { generateReportFromDefinitionId } from '../../main/main_utils';\nimport { converter } from '../utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { definitionInputValidation } from '../utils/utils';\nexport function CreateReport(props) {\n let createReportDefinitionRequest = {\n report_params: {\n report_name: '',\n report_source: '',\n description: '',\n core_params: {\n base_url: '',\n report_format: '',\n time_duration: ''\n }\n },\n delivery: {\n delivery_type: '',\n delivery_params: {}\n },\n trigger: {\n trigger_type: ''\n }\n };\n const [toasts, setToasts] = useState([]);\n const [comingFromError, setComingFromError] = useState(false);\n const [preErrorData, setPreErrorData] = useState({});\n const [showSettingsReportNameError, setShowSettingsReportNameError] = useState(false);\n const [settingsReportNameErrorMessage, setSettingsReportNameErrorMessage] = useState('');\n const [showTriggerIntervalNaNError, setShowTriggerIntervalNaNError] = useState(false);\n const [showCronError, setShowCronError] = useState(false);\n const [showEmailRecipientsError, setShowEmailRecipientsError] = useState(false);\n const [emailRecipientsErrorMessage, setEmailRecipientsErrorMessage] = useState('');\n const [showTimeRangeError, setShowTimeRangeError] = useState(false); // preserve the state of the request after an invalid create report definition request\n\n if (comingFromError) {\n createReportDefinitionRequest = preErrorData;\n }\n\n const addInputValidationErrorToastHandler = () => {\n const errorToast = {\n title: 'One or more fields have an error. Please check and try again.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInputValidationErrorToast = () => {\n addInputValidationErrorToastHandler();\n };\n\n const addErrorOnCreateToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.CREATING_REPORT_DEFINITION);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error creating report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleErrorOnCreateToast = errorType => {\n addErrorOnCreateToastHandler(errorType);\n };\n\n const addInvalidTimeRangeToastHandler = () => {\n const errorToast = {\n title: 'Invalid time range selected.',\n color: 'danger',\n iconType: 'alert',\n id: 'timeRangeErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInvalidTimeRangeToast = () => {\n addInvalidTimeRangeToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n let timeRange = {\n timeFrom: new Date(),\n timeTo: new Date()\n };\n\n const createNewReportDefinition = async (metadata, timeRange) => {\n const {\n httpClient\n } = props; //TODO: need better handle\n\n if (metadata.trigger.trigger_type === 'On demand' && metadata.trigger.trigger_params !== undefined) {\n delete metadata.trigger.trigger_params;\n }\n\n let error = false;\n await definitionInputValidation(metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage).then(response => {\n error = response;\n });\n\n if (error) {\n handleInputValidationErrorToast();\n setPreErrorData(metadata);\n setComingFromError(true);\n } else {\n // convert header and footer to html\n if ('header' in metadata.report_params.core_params) {\n metadata.report_params.core_params.header = converter.makeHtml(metadata.report_params.core_params.header);\n }\n\n if ('footer' in metadata.report_params.core_params) {\n metadata.report_params.core_params.footer = converter.makeHtml(metadata.report_params.core_params.footer);\n }\n\n httpClient.post('../api/reporting/reportDefinition', {\n body: JSON.stringify(metadata),\n headers: {\n 'Content-Type': 'application/json'\n }\n }).then(async resp => {\n //TODO: consider handle the on demand report generation from server side instead\n if (metadata.trigger.trigger_type === 'On demand') {\n const reportDefinitionId = resp.scheduler_response.reportDefinitionId;\n generateReportFromDefinitionId(reportDefinitionId, httpClient);\n }\n\n window.location.assign(`opendistro_kibana_reports#/create=success`);\n }).catch(error => {\n console.log('error in creating report definition: ' + error);\n\n if (error.body.statusCode === 403) {\n handleErrorOnCreateToast('permissions');\n } else {\n handleErrorOnCreateToast('API');\n }\n });\n }\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: 'Create report definition',\n href: '#/create'\n }]);\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h1\", null, \"Create report definition\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportSettings, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showSettingsReportNameError: showSettingsReportNameError,\n settingsReportNameErrorMessage: settingsReportNameErrorMessage,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportTrigger, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n showTriggerIntervalNaNError: showTriggerIntervalNaNError,\n showCronError: showCronError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportDelivery, {\n edit: false,\n reportDefinitionRequest: createReportDefinitionRequest,\n showEmailRecipientsError: showEmailRecipientsError,\n emailRecipientsErrorMessage: emailRecipientsErrorMessage\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButtonEmpty, {\n onClick: () => {\n window.location.assign(`opendistro_kibana_reports#/`);\n }\n }, \"Cancel\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => createNewReportDefinition(createReportDefinitionRequest, timeRange),\n id: 'createNewReportDefinition'\n }, \"Create\"))), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiSpacer, EuiCheckbox } from '@elastic/eui';\nimport { DELIVERY_TYPE_OPTIONS } from './delivery_constants';\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { EmailDelivery } from './email';\nexport function ReportDelivery(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps\n } = props;\n const [emailCheckbox, setEmailCheckbox] = useState(false);\n\n const handleEmailCheckbox = e => {\n setEmailCheckbox(e.target.checked);\n\n if (e.target.checked) {\n // if checked, set delivery type to email\n reportDefinitionRequest.delivery.delivery_type = DELIVERY_TYPE_OPTIONS[1].id;\n } else {\n // uncheck email checkbox means to use default setting, which is kibana user\n defaultCreateDeliveryParams();\n }\n };\n\n const emailDelivery = emailCheckbox ? /*#__PURE__*/React.createElement(EmailDelivery, props) : null;\n\n const defaultCreateDeliveryParams = () => {\n reportDefinitionRequest.delivery = {\n delivery_type: DELIVERY_TYPE_OPTIONS[0].id,\n delivery_params: {\n kibana_recipients: []\n }\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n const isEmailSelected = response.report_definition.delivery.delivery_type === DELIVERY_TYPE_OPTIONS[1].id;\n handleEmailCheckbox({\n target: {\n checked: isEmailSelected\n }\n });\n });\n } else {\n // By default it's set to deliver to kibana user\n defaultCreateDeliveryParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l',\n hidden: true\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Notification settings\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiCheckbox, {\n id: \"emailCheckboxDelivery\",\n label: \"Add email recipients\",\n checked: emailCheckbox,\n onChange: handleEmailCheckbox\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), emailDelivery));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const EMAIL_RECIPIENT_OPTIONS = [];\nexport const DELIVERY_TYPE_OPTIONS = [{\n id: 'Kibana user',\n label: 'Kibana user'\n}, {\n id: 'Channel',\n label: 'Email'\n}];","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiComboBox, EuiFieldText, EuiFormRow, EuiSpacer } from '@elastic/eui';\nimport React, { useEffect } from 'react';\nimport { useState } from 'react';\nimport ReactMDE from 'react-mde';\nimport { converter } from '../utils';\nimport { DELIVERY_TYPE_OPTIONS } from './delivery_constants';\nexport const EmailDelivery = props => {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n showEmailRecipientsError,\n emailRecipientsErrorMessage\n } = props;\n const [emailRecipients, setEmailRecipients] = useState([]);\n const [selectedEmailRecipients, setSelectedEmailRecipients] = useState([]);\n const [emailSubject, setEmailSubject] = useState('');\n const [emailBody, setEmailBody] = useState('');\n const [selectedTab, setSelectedTab] = React.useState('write');\n\n const handleCreateEmailRecipient = (searchValue, flattenedOptions = []) => {\n const normalizedSearchValue = searchValue.trim().toLowerCase();\n\n if (!normalizedSearchValue) {\n return;\n }\n\n const newOption = {\n label: searchValue\n }; // Create the option if it doesn't exist.\n\n if (flattenedOptions.findIndex(option => option.label.trim().toLowerCase() === normalizedSearchValue) === -1) {\n setEmailRecipients([...emailRecipients, newOption]);\n }\n\n handleSelectEmailRecipients([...selectedEmailRecipients, newOption]);\n };\n\n const handleSelectEmailRecipients = e => {\n setSelectedEmailRecipients(e);\n reportDefinitionRequest.delivery.delivery_params.recipients = e.map(option => option.label);\n };\n\n const handleEmailSubject = e => {\n setEmailSubject(e.target.value);\n reportDefinitionRequest.delivery.delivery_params.title = e.target.value;\n };\n\n const handleEmailBody = e => {\n setEmailBody(e);\n reportDefinitionRequest.delivery.delivery_params.textDescription = e;\n reportDefinitionRequest.delivery.delivery_params.htmlDescription = converter.makeHtml(e);\n }; // TODO: need better handling when we add full support for kibana user report delivery\n\n\n const optionalMessageLabel = `Add optional message (${selectedTab} mode)`;\n\n const defaultEditDeliveryParams = delivery => {\n //TODO: need better handle?\n // if the original notification setting is kibana user\n if (delivery.delivery_type === DELIVERY_TYPE_OPTIONS[0].id) {\n defaultCreateDeliveryParams();\n delete reportDefinitionRequest.delivery.delivery_params.kibana_recipients;\n } else {\n //@ts-ignore\n const emailParams = delivery.delivery_params;\n const {\n recipients,\n title,\n textDescription\n } = emailParams;\n const recipientsOptions = recipients.map(email => ({\n label: email\n }));\n handleSelectEmailRecipients(recipientsOptions);\n setEmailRecipients(recipientsOptions);\n setEmailSubject(title);\n reportDefinitionRequest.delivery.delivery_params.title = title;\n handleEmailBody(textDescription);\n }\n };\n\n const defaultCreateDeliveryParams = () => {\n reportDefinitionRequest.delivery.delivery_params = {\n recipients: selectedEmailRecipients.map(option => option.label),\n title: emailSubject,\n textDescription: emailBody,\n htmlDescription: converter.makeHtml(emailBody)\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n defaultEditDeliveryParams(response.report_definition.delivery);\n });\n } else {\n defaultCreateDeliveryParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Email recipients\",\n helpText: \"Select or add users\",\n isInvalid: showEmailRecipientsError,\n error: emailRecipientsErrorMessage\n }, /*#__PURE__*/React.createElement(EuiComboBox, {\n placeholder: 'Add users here',\n options: emailRecipients,\n selectedOptions: selectedEmailRecipients,\n onChange: handleSelectEmailRecipients,\n onCreateOption: handleCreateEmailRecipient,\n isClearable: true,\n \"data-test-subj\": \"demoComboBox\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Email subject\"\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Subject line\",\n value: emailSubject,\n onChange: handleEmailSubject\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: optionalMessageLabel,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMDE, {\n value: emailBody,\n onChange: handleEmailBody,\n selectedTab: selectedTab,\n onTabChange: setSelectedTab,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"xs\"\n }));\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportDelivery } from './delivery';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiButton, EuiPage, EuiTitle, EuiPageBody, EuiSpacer, EuiGlobalToastList } from '@elastic/eui';\nimport { ReportSettings } from '../report_settings';\nimport { ReportDelivery } from '../delivery';\nimport { ReportTrigger } from '../report_trigger';\nimport { converter } from '../utils';\nimport { permissionsMissingToast, permissionsMissingActions } from '../../utils/utils';\nimport { definitionInputValidation } from '../utils/utils';\nexport function EditReportDefinition(props) {\n const [toasts, setToasts] = useState([]);\n const [comingFromError, setComingFromError] = useState(false);\n const [preErrorData, setPreErrorData] = useState({});\n const [showSettingsReportNameError, setShowSettingsReportNameError] = useState(false);\n const [settingsReportNameErrorMessage, setSettingsReportNameErrorMessage] = useState('');\n const [showTriggerIntervalNaNError, setShowTriggerIntervalNaNError] = useState(false);\n const [showCronError, setShowCronError] = useState(false);\n const [showEmailRecipientsError, setShowEmailRecipientsError] = useState(false);\n const [emailRecipientsErrorMessage, setEmailRecipientsErrorMessage] = useState('');\n const [showTimeRangeError, setShowTimeRangeError] = useState(false);\n\n const addPermissionsMissingViewEditPageToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.VIEWING_EDIT_PAGE);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error loading report definition values.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleViewEditPageErrorToast = errorType => {\n addPermissionsMissingViewEditPageToastHandler(errorType);\n };\n\n const addInputValidationErrorToastHandler = () => {\n const errorToast = {\n title: 'One or more fields have an error. Please check and try again.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInputValidationErrorToast = () => {\n addInputValidationErrorToastHandler();\n };\n\n const addErrorUpdatingReportDefinitionToastHandler = errorType => {\n let toast = {};\n\n if (errorType === 'permissions') {\n toast = permissionsMissingToast(permissionsMissingActions.UPDATING_DEFINITION);\n } else if (errorType === 'API') {\n toast = {\n title: 'Error updating report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorToast'\n };\n }\n\n setToasts(toasts.concat(toast));\n };\n\n const handleErrorUpdatingReportDefinitionToast = errorType => {\n addErrorUpdatingReportDefinitionToastHandler(errorType);\n };\n\n const addErrorDeletingReportDefinitionToastHandler = () => {\n const errorToast = {\n title: 'Error deleting old scheduled report definition.',\n color: 'danger',\n iconType: 'alert',\n id: 'errorDeleteToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleErrorDeletingReportDefinitionToast = () => {\n addErrorDeletingReportDefinitionToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const reportDefinitionId = props['match']['params']['reportDefinitionId'];\n let reportDefinition;\n let editReportDefinitionRequest = {\n report_params: {\n report_name: '',\n report_source: '',\n description: '',\n core_params: {\n base_url: '',\n report_format: '',\n time_duration: ''\n }\n },\n delivery: {\n delivery_type: '',\n delivery_params: {}\n },\n trigger: {\n trigger_type: ''\n },\n time_created: 0,\n last_updated: 0,\n status: ''\n };\n reportDefinition = editReportDefinitionRequest; // initialize reportDefinition object\n\n let timeRange = {\n timeFrom: new Date(),\n timeTo: new Date()\n };\n\n if (comingFromError) {\n editReportDefinitionRequest = preErrorData;\n }\n\n const callUpdateAPI = async metadata => {\n const {\n httpClient\n } = props;\n httpClient.put(`../api/reporting/reportDefinitions/${reportDefinitionId}`, {\n body: JSON.stringify(metadata),\n params: reportDefinitionId.toString()\n }).then(async () => {\n window.location.assign(`opendistro_kibana_reports#/edit=success`);\n }).catch(error => {\n console.log('error in updating report definition:', error);\n\n if (error.body.statusCode === 400) {\n handleInputValidationErrorToast();\n } else if (error.body.statusCode === 403) {\n handleErrorUpdatingReportDefinitionToast('permissions');\n } else {\n handleErrorUpdatingReportDefinitionToast('API');\n }\n\n setPreErrorData(metadata);\n setComingFromError(true);\n });\n };\n\n const editReportDefinition = async metadata => {\n if ('header' in metadata.report_params.core_params) {\n metadata.report_params.core_params.header = converter.makeHtml(metadata.report_params.core_params.header);\n }\n\n if ('footer' in metadata.report_params.core_params) {\n metadata.report_params.core_params.footer = converter.makeHtml(metadata.report_params.core_params.footer);\n } // client-side input validation\n\n\n let error = false;\n await definitionInputValidation(metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage).then(response => {\n error = response;\n });\n\n if (error) {\n handleInputValidationErrorToast();\n setPreErrorData(metadata);\n setComingFromError(true);\n } else {\n await callUpdateAPI(metadata);\n }\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n const {\n httpClient\n } = props;\n httpClient.get(`../api/reporting/reportDefinitions/${reportDefinitionId}`).then(response => {\n reportDefinition = response.report_definition;\n const {\n time_created: timeCreated,\n status,\n last_updated: lastUpdated,\n report_params: {\n report_name: reportName\n }\n } = reportDefinition; // configure non-editable fields\n\n editReportDefinitionRequest.time_created = timeCreated;\n editReportDefinitionRequest.last_updated = lastUpdated;\n editReportDefinitionRequest.status = status;\n props.setBreadcrumbs([{\n text: 'Reporting',\n href: '#'\n }, {\n text: `Report definition details: ${reportName}`,\n href: `#/report_definition_details/${reportDefinitionId}`\n }, {\n text: `Edit report definition: ${reportName}`\n }]);\n }).catch(error => {\n console.error('error when loading edit report definition page: ', error);\n\n if (error.body.statusCode === 403) {\n handleViewEditPageErrorToast('permissions');\n } else {\n handleViewEditPageErrorToast('API');\n }\n });\n }, []);\n return /*#__PURE__*/React.createElement(EuiPage, null, /*#__PURE__*/React.createElement(EuiPageBody, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h1\", null, \"Edit report definition\")), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportSettings, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showSettingsReportNameError: showSettingsReportNameError,\n settingsReportNameErrorMessage: settingsReportNameErrorMessage,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportTrigger, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showTriggerIntervalNaNError: showTriggerIntervalNaNError,\n showCronError: showCronError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(ReportDelivery, {\n edit: true,\n editDefinitionId: reportDefinitionId,\n reportDefinitionRequest: editReportDefinitionRequest,\n httpClientProps: props['httpClient'],\n timeRange: timeRange,\n showEmailRecipientsError: showEmailRecipientsError,\n emailRecipientsErrorMessage: emailRecipientsErrorMessage\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"flexEnd\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButtonEmpty, {\n onClick: () => {\n window.location.assign('opendistro_kibana_reports#/');\n }\n }, \"Cancel\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n fill: true,\n onClick: () => editReportDefinition(editReportDefinitionRequest),\n id: 'editReportDefinitionButton'\n }, \"Save Changes\"))), /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportSettings } from './report_settings';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiFieldText, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiText, EuiSpacer, EuiRadioGroup, EuiSelect, EuiTextArea, EuiCheckboxGroup } from '@elastic/eui';\nimport { REPORT_SOURCE_RADIOS, PDF_PNG_FILE_FORMAT_OPTIONS, HEADER_FOOTER_CHECKBOX, REPORT_SOURCE_TYPES } from './report_settings_constants';\nimport ReactMde from 'react-mde';\nimport 'react-mde/lib/styles/css/react-mde-all.css';\nimport { parseInContextUrl, getSavedSearchBaseUrlCreate, getVisualizationBaseUrlCreate, getSavedSearchOptions, getVisualizationOptions, getDashboardBaseUrlCreate, getDashboardOptions, handleDataToVisualReportSourceChange } from './report_settings_helpers';\nimport { TimeRangeSelect } from './time_range';\nimport { converter } from '../utils';\nexport function ReportSettings(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n timeRange,\n showSettingsReportNameError,\n settingsReportNameErrorMessage,\n showTimeRangeError\n } = props;\n const [reportName, setReportName] = useState('');\n const [reportDescription, setReportDescription] = useState('');\n const [reportSourceId, setReportSourceId] = useState('dashboardReportSource');\n const [dashboardSourceSelect, setDashboardSourceSelect] = useState('');\n const [dashboards, setDashboards] = useState([]);\n const [visualizationSourceSelect, setVisualizationSourceSelect] = useState('');\n const [visualizations, setVisualizations] = useState([]);\n const [savedSearchSourceSelect, setSavedSearchSourceSelect] = useState('');\n const [savedSearches, setSavedSearches] = useState([]);\n const [fileFormat, setFileFormat] = useState('pdf');\n\n const handleDashboards = e => {\n setDashboards(e);\n };\n\n const handleVisualizations = e => {\n setVisualizations(e);\n };\n\n const handleSavedSearches = e => {\n setSavedSearches(e);\n };\n\n const handleReportName = e => {\n setReportName(e.target.value);\n reportDefinitionRequest.report_params.report_name = e.target.value.toString();\n };\n\n const handleReportDescription = e => {\n setReportDescription(e.target.value);\n reportDefinitionRequest.report_params.description = e.target.value.toString();\n };\n\n const handleReportSource = e => {\n setReportSourceId(e);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n if (e === 'dashboardReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Dashboard';\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, editDefinitionId, fromInContext) + dashboards[0].value; // set params to visual report params after switch from saved search\n\n handleDataToVisualReportSourceChange(reportDefinitionRequest);\n setFileFormat('pdf');\n } else if (e === 'visualizationReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Visualization';\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, fromInContext) + visualizations[0].value; // set params to visual report params after switch from saved search\n\n handleDataToVisualReportSourceChange(reportDefinitionRequest);\n setFileFormat('pdf');\n } else if (e === 'savedSearchReportSource') {\n reportDefinitionRequest.report_params.report_source = 'Saved search';\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, fromInContext) + savedSearches[0].value;\n reportDefinitionRequest.report_params.core_params.saved_search_id = savedSearches[0].value;\n reportDefinitionRequest.report_params.core_params.report_format = 'csv';\n reportDefinitionRequest.report_params.core_params.limit = 10000;\n reportDefinitionRequest.report_params.core_params.excel = true;\n }\n };\n\n const handleDashboardSelect = e => {\n setDashboardSourceSelect(e.target.value);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleVisualizationSelect = e => {\n setVisualizationSourceSelect(e.target.value);\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleSavedSearchSelect = e => {\n setSavedSearchSourceSelect(e.target.value);\n reportDefinitionRequest.report_params.core_params.saved_search_id = e.target.value;\n let fromInContext = false;\n\n if (window.location.href.includes('?')) {\n fromInContext = true;\n }\n\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, fromInContext) + e.target.value;\n };\n\n const handleFileFormat = e => {\n setFileFormat(e);\n reportDefinitionRequest.report_params.core_params.report_format = e.toString();\n };\n\n const PDFandPNGFileFormats = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"File format\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: PDF_PNG_FILE_FORMAT_OPTIONS,\n idSelected: fileFormat,\n onChange: handleFileFormat\n })));\n };\n\n const SettingsMarkdown = () => {\n const [checkboxIdSelectHeaderFooter, setCheckboxIdSelectHeaderFooter] = useState({\n ['header']: false,\n ['footer']: false\n });\n const [footer, setFooter] = useState('');\n const [selectedTabFooter, setSelectedTabFooter] = React.useState('write');\n const [header, setHeader] = useState('');\n const [selectedTabHeader, setSelectedTabHeader] = React.useState('write');\n\n const handleHeader = e => {\n setHeader(e);\n reportDefinitionRequest.report_params.core_params.header = e;\n };\n\n const handleFooter = e => {\n setFooter(e);\n reportDefinitionRequest.report_params.core_params.footer = e;\n };\n\n const handleCheckboxHeaderFooter = optionId => {\n const newCheckboxIdToSelectedMap = { ...checkboxIdSelectHeaderFooter,\n ...{\n [optionId]: !checkboxIdSelectHeaderFooter[optionId]\n }\n };\n setCheckboxIdSelectHeaderFooter(newCheckboxIdToSelectedMap);\n };\n\n const showFooter = checkboxIdSelectHeaderFooter.footer ? /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Footer\",\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMde, {\n value: footer,\n onChange: handleFooter,\n selectedTab: selectedTabFooter,\n onTabChange: setSelectedTabFooter,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })) : null;\n const showHeader = checkboxIdSelectHeaderFooter.header ? /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Header\",\n fullWidth: true\n }, /*#__PURE__*/React.createElement(ReactMde, {\n value: header,\n onChange: handleHeader,\n selectedTab: selectedTabHeader,\n onTabChange: setSelectedTabHeader,\n toolbarCommands: [['header', 'bold', 'italic', 'strikethrough'], ['unordered-list', 'ordered-list', 'checked-list']],\n generateMarkdownPreview: markdown => Promise.resolve(converter.makeHtml(markdown))\n })) : null;\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n const reportDefinition = response.report_definition;\n const {\n report_params: {\n core_params: {\n header,\n footer\n }\n }\n } = reportDefinition; // set header/footer default\n\n if (header) {\n checkboxIdSelectHeaderFooter.header = true;\n\n if (!unmounted) {\n setHeader(converter.makeMarkdown(header));\n }\n }\n\n if (footer) {\n checkboxIdSelectHeaderFooter.footer = true;\n\n if (!unmounted) {\n setFooter(converter.makeMarkdown(footer));\n }\n }\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n } else {\n // keeps header/footer from re-rendering empty when other fields in Report Settings are changed\n checkboxIdSelectHeaderFooter.header = 'header' in reportDefinitionRequest.report_params.core_params;\n checkboxIdSelectHeaderFooter.footer = 'footer' in reportDefinitionRequest.report_params.core_params;\n\n if (checkboxIdSelectHeaderFooter.header) {\n setHeader(reportDefinitionRequest.report_params.core_params.header);\n }\n\n if (checkboxIdSelectHeaderFooter.footer) {\n setFooter(reportDefinitionRequest.report_params.core_params.footer);\n }\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiCheckboxGroup, {\n options: HEADER_FOOTER_CHECKBOX,\n idToSelectedMap: checkboxIdSelectHeaderFooter,\n onChange: handleCheckboxHeaderFooter,\n legend: {\n children: 'Header and footer'\n }\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), showHeader, showFooter);\n };\n\n const ReportSourceDashboard = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select dashboard\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceDashboardSelect\",\n options: dashboards,\n value: dashboardSourceSelect,\n onChange: handleDashboardSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ReportSourceVisualization = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select visualization\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceVisualizationSelect\",\n options: visualizations,\n value: visualizationSourceSelect,\n onChange: handleVisualizationSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ReportSourceSavedSearch = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Select saved search\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"reportSourceSavedSearchSelect\",\n options: savedSearches,\n value: savedSearchSourceSelect,\n onChange: handleSavedSearchSelect\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const VisualReportFormatAndMarkdown = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(PDFandPNGFileFormats, null), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const setReportSourceDropdownOption = (options, reportSource, url) => {\n let index = 0;\n\n if (reportSource === REPORT_SOURCE_TYPES.dashboard) {\n for (index = 0; index < options.dashboard.length; ++index) {\n if (url.includes(options.dashboard[index].value)) {\n setDashboardSourceSelect(options.dashboard[index].value);\n }\n }\n } else if (reportSource === REPORT_SOURCE_TYPES.visualization) {\n for (index = 0; index < options.visualizations.length; ++index) {\n if (url.includes(options.visualizations[index].value)) {\n setVisualizationSourceSelect(options.visualizations[index].value);\n }\n }\n } else if (reportSource === REPORT_SOURCE_TYPES.savedSearch) {\n for (index = 0; index < options.savedSearch.length; ++index) {\n if (url.includes(options.savedSearch[index].value)) {\n setSavedSearchSourceSelect(options.savedSearch[index].value);\n }\n }\n }\n };\n\n const setDefaultFileFormat = fileFormat => {\n let index = 0;\n\n for (index = 0; index < PDF_PNG_FILE_FORMAT_OPTIONS.length; ++index) {\n if (fileFormat.toUpperCase() === PDF_PNG_FILE_FORMAT_OPTIONS[index].label) {\n setFileFormat(PDF_PNG_FILE_FORMAT_OPTIONS[index].id);\n }\n }\n };\n\n const setInContextDefaultConfiguration = () => {\n const url = window.location.href;\n const id = parseInContextUrl(url, 'id');\n\n if (url.includes('dashboard')) {\n setReportSourceId('dashboardReportSource');\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[0].label;\n setDashboardSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getDashboardBaseUrlCreate(edit, id, true) + id;\n } else if (url.includes('visualize')) {\n setReportSourceId('visualizationReportSource');\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[1].label;\n setVisualizationSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getVisualizationBaseUrlCreate(edit, editDefinitionId, true) + id;\n } else if (url.includes('discover')) {\n setReportSourceId('savedSearchReportSource');\n reportDefinitionRequest.report_params.core_params.report_format = 'csv';\n reportDefinitionRequest.report_params.core_params.saved_search_id = id;\n reportDefinitionRequest.report_params.report_source = REPORT_SOURCE_RADIOS[2].label;\n setSavedSearchSourceSelect(id);\n reportDefinitionRequest.report_params.core_params.base_url = getSavedSearchBaseUrlCreate(edit, editDefinitionId, true) + id;\n }\n };\n\n const setDefaultEditValues = async (response, reportSourceOptions) => {\n setReportName(response.report_definition.report_params.report_name);\n setReportDescription(response.report_definition.report_params.description);\n reportDefinitionRequest.report_params.report_name = response.report_definition.report_params.report_name;\n reportDefinitionRequest.report_params.description = response.report_definition.report_params.description;\n reportDefinitionRequest.report_params = response.report_definition.report_params;\n const reportSource = response.report_definition.report_params.report_source;\n REPORT_SOURCE_RADIOS.map(radio => {\n if (radio.label === reportSource) {\n setReportSourceId(radio.id);\n reportDefinitionRequest.report_params.report_source = reportSource;\n }\n });\n setDefaultFileFormat(response.report_definition.report_params.core_params.report_format);\n setReportSourceDropdownOption(reportSourceOptions, reportSource, response.report_definition.report_params.core_params.base_url);\n };\n\n const defaultConfigurationEdit = async httpClientProps => {\n let editData = {};\n await httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n editData = response;\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n return editData;\n };\n\n const defaultConfigurationCreate = async httpClientProps => {\n let reportSourceOptions = {\n dashboard: [],\n visualizations: [],\n savedSearch: []\n };\n reportDefinitionRequest.report_params.core_params.report_format = fileFormat;\n await httpClientProps.get('../api/reporting/getReportSource/dashboard').then(async response => {\n let dashboardOptions = getDashboardOptions(response['hits']['hits']);\n reportSourceOptions.dashboard = dashboardOptions;\n handleDashboards(dashboardOptions);\n\n if (!edit) {\n setDashboardSourceSelect(dashboardOptions[0].value);\n reportDefinitionRequest.report_params.report_source = 'Dashboard';\n reportDefinitionRequest['report_params']['core_params']['base_url'] = getDashboardBaseUrlCreate(edit, editDefinitionId, false) + response['hits']['hits'][0]['_id'].substring(10);\n }\n }).catch(error => {\n console.log('error when fetching dashboards:', error);\n });\n await httpClientProps.get('../api/reporting/getReportSource/visualization').then(async response => {\n let visualizationOptions = getVisualizationOptions(response['hits']['hits']);\n reportSourceOptions.visualizations = visualizationOptions;\n await handleVisualizations(visualizationOptions);\n await setVisualizationSourceSelect(visualizationOptions[0].value);\n }).catch(error => {\n console.log('error when fetching visualizations:', error);\n });\n await httpClientProps.get('../api/reporting/getReportSource/search').then(async response => {\n let savedSearchOptions = getSavedSearchOptions(response['hits']['hits']);\n reportSourceOptions.savedSearch = savedSearchOptions;\n await handleSavedSearches(savedSearchOptions);\n await setSavedSearchSourceSelect(savedSearchOptions[0].value);\n }).catch(error => {\n console.log('error when fetching saved searches:', error);\n });\n return reportSourceOptions;\n };\n\n useEffect(() => {\n let reportSourceOptions = {};\n let editData = {};\n\n if (edit) {\n defaultConfigurationEdit(httpClientProps).then(async response => {\n editData = response;\n });\n }\n\n defaultConfigurationCreate(httpClientProps).then(async response => {\n reportSourceOptions = response; // if coming from in-context menu\n\n if (window.location.href.indexOf('?') > -1) {\n setInContextDefaultConfiguration();\n }\n\n if (edit) {\n setDefaultEditValues(editData, reportSourceOptions);\n }\n });\n }, []);\n const displayDashboardSelect = reportSourceId === 'dashboardReportSource' ? /*#__PURE__*/React.createElement(ReportSourceDashboard, null) : null;\n const displayVisualizationSelect = reportSourceId === 'visualizationReportSource' ? /*#__PURE__*/React.createElement(ReportSourceVisualization, null) : null;\n const displaySavedSearchSelect = reportSourceId === 'savedSearchReportSource' ? /*#__PURE__*/React.createElement(ReportSourceSavedSearch, null) : null;\n const displayVisualReportsFormatAndMarkdown = reportSourceId != 'savedSearchReportSource' ? /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(VisualReportFormatAndMarkdown, null), /*#__PURE__*/React.createElement(SettingsMarkdown, null)) : /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"File format\"\n }, /*#__PURE__*/React.createElement(EuiText, null, /*#__PURE__*/React.createElement(\"p\", null, \"CSV\"))));\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Report Settings\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Name\",\n helpText: \"Valid characters are a-z, A-Z, 0-9, (), [], _ (underscore), - (hyphen) and (space).\",\n isInvalid: showSettingsReportNameError,\n error: settingsReportNameErrorMessage,\n id: 'reportSettingsName'\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Report name (e.g Log Traffic Daily Report)\",\n value: reportName,\n onChange: handleReportName\n })))), /*#__PURE__*/React.createElement(EuiFlexGroup, {\n style: {\n maxWidth: 600\n }\n }, /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Description (optional)\",\n id: 'reportSettingsDescription'\n }, /*#__PURE__*/React.createElement(EuiTextArea, {\n placeholder: \"Describe this report (e.g Morning daily reports for log traffic)\",\n value: reportDescription,\n onChange: handleReportDescription\n })))), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Report source\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: REPORT_SOURCE_RADIOS,\n idSelected: reportSourceId,\n onChange: handleReportSource,\n disabled: edit\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), displayDashboardSelect, displayVisualizationSelect, displaySavedSearchSelect, /*#__PURE__*/React.createElement(TimeRangeSelect, {\n timeRange: timeRange,\n reportDefinitionRequest: reportDefinitionRequest,\n edit: edit,\n id: editDefinitionId,\n httpClientProps: httpClientProps,\n showTimeRangeError: showTimeRangeError\n }), /*#__PURE__*/React.createElement(EuiSpacer, null), displayVisualReportsFormatAndMarkdown, /*#__PURE__*/React.createElement(EuiSpacer, null)));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const REPORT_SOURCE_RADIOS = [{\n id: 'dashboardReportSource',\n label: 'Dashboard'\n}, {\n id: 'visualizationReportSource',\n label: 'Visualization'\n}, {\n id: 'savedSearchReportSource',\n label: 'Saved search'\n}];\nexport const PDF_PNG_FILE_FORMAT_OPTIONS = [{\n id: 'pdf',\n label: 'PDF'\n}, {\n id: 'png',\n label: 'PNG'\n}];\nexport const SAVED_SEARCH_FORMAT_OPTIONS = [{\n id: 'csvFormat',\n label: 'CSV'\n}, {\n id: 'xlsFormat',\n label: 'XLS'\n}];\nexport const HEADER_FOOTER_CHECKBOX = [{\n id: 'header',\n label: 'Add header'\n}, {\n id: 'footer',\n label: 'Add footer'\n}];\nexport const REPORT_SOURCE_TYPES = {\n dashboard: 'Dashboard',\n visualization: 'Visualization',\n savedSearch: 'Saved search'\n};\nexport const commonTimeRanges = [{\n start: 'now/d',\n end: 'now',\n label: 'Today so far'\n}, {\n start: 'now/w',\n end: 'now',\n label: 'Week to date'\n}, {\n start: 'now/M',\n end: 'now',\n label: 'Month to date'\n}, {\n start: 'now/y',\n end: 'now',\n label: 'Year to date'\n}];","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport const parseInContextUrl = (url, parameter) => {\n const info = url.split('?');\n\n if (parameter === 'id') {\n return info[1].substring(info[1].indexOf(':') + 1, info[1].length);\n } else if (parameter === 'timeFrom') {\n return info[2].substring(info[2].indexOf('=') + 1, info[2].length);\n } else if (parameter === 'timeTo') {\n return info[3].substring(info[3].indexOf('=') + 1, info[3].length);\n }\n\n return 'error: invalid parameter';\n};\nexport const getDashboardBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/dashboards#/view/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'dashboards#/view/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'dashboards#/view/');\n};\nexport const getVisualizationBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/visualize#/edit/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'visualize#/edit/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'visualize#/edit/');\n};\nexport const getSavedSearchBaseUrlCreate = (edit, editDefinitionId, fromInContext) => {\n let baseUrl;\n\n if (!fromInContext) {\n baseUrl = location.pathname + location.hash;\n } else {\n baseUrl = '/app/discover#/view/';\n }\n\n if (edit) {\n return baseUrl.replace(`opendistro_kibana_reports#/edit/${editDefinitionId}`, 'discover#/view/');\n } else if (fromInContext) {\n return baseUrl;\n }\n\n return baseUrl.replace('opendistro_kibana_reports#/create', 'discover#/view/');\n};\nexport const getDashboardOptions = data => {\n let index;\n let dashboard_options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(10),\n text: data[index]['_source']['dashboard']['title']\n };\n dashboard_options.push(entry);\n }\n\n return dashboard_options;\n};\nexport const getVisualizationOptions = data => {\n let index;\n let options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(14),\n text: data[index]['_source']['visualization']['title']\n };\n options.push(entry);\n }\n\n return options;\n};\nexport const getSavedSearchOptions = data => {\n let index;\n let options = [];\n\n for (index = 0; index < data.length; ++index) {\n let entry = {\n value: data[index]['_id'].substring(7),\n text: data[index]['_source']['search']['title']\n };\n options.push(entry);\n }\n\n return options;\n};\nexport const handleDataToVisualReportSourceChange = reportDefinitionRequest => {\n delete reportDefinitionRequest.report_params.core_params.saved_search_id;\n delete reportDefinitionRequest.report_params.core_params.limit;\n delete reportDefinitionRequest.report_params.core_params.excel;\n reportDefinitionRequest.report_params.core_params.report_format = 'pdf';\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport moment from 'moment';\nimport React, { useState, useEffect } from 'react';\nimport { parseInContextUrl } from './report_settings_helpers';\nimport dateMath from '@elastic/datemath';\nimport { EuiFormRow, EuiGlobalToastList, EuiSuperDatePicker } from '@elastic/eui';\nimport { commonTimeRanges } from './report_settings_constants';\nexport function TimeRangeSelect(props) {\n const {\n reportDefinitionRequest,\n timeRange,\n edit,\n id,\n httpClientProps,\n showTimeRangeError\n } = props;\n const [recentlyUsedRanges, setRecentlyUsedRanges] = useState([]);\n const [isLoading, setIsLoading] = useState(false);\n const [start, setStart] = useState('now-30m');\n const [end, setEnd] = useState('now');\n const [toasts, setToasts] = useState([]);\n\n const addInvalidTimeRangeToastHandler = () => {\n const errorToast = {\n title: 'Invalid time range selected',\n color: 'danger',\n iconType: 'alert',\n id: 'timeRangeErrorToast'\n };\n setToasts(toasts.concat(errorToast));\n };\n\n const handleInvalidTimeRangeToast = () => {\n addInvalidTimeRangeToastHandler();\n };\n\n const removeToast = removedToast => {\n setToasts(toasts.filter(toast => toast.id !== removedToast.id));\n };\n\n const isValidTimeRange = (timeRangeMoment, limit, handleInvalidTimeRangeToast) => {\n if (limit === 'start') {\n if (!timeRangeMoment || !timeRangeMoment.isValid()) {\n handleInvalidTimeRangeToast();\n }\n } else if (limit === 'end') {\n if (!timeRangeMoment || !timeRangeMoment.isValid() || timeRangeMoment > moment.now()) {\n handleInvalidTimeRangeToast();\n }\n }\n };\n\n const setDefaultEditTimeRange = (duration, unmounted) => {\n let time_difference = moment.now() - duration;\n const fromDate = new Date(time_difference);\n parseTimeRange(fromDate, end, reportDefinitionRequest);\n\n if (!unmounted) {\n setStart(fromDate.toISOString());\n setEnd(end);\n }\n }; // valid time range check for absolute time end date\n\n\n const checkValidAbsoluteEndDate = end => {\n let endDate = new Date(end);\n let nowDate = new Date(moment.now());\n let valid = true;\n\n if (endDate.getTime() > nowDate.getTime()) {\n end = 'now';\n valid = false;\n }\n\n return valid;\n };\n\n useEffect(() => {\n let unmounted = false; // if we are coming from the in-context menu\n\n if (window.location.href.indexOf('?') > -1) {\n const url = window.location.href;\n const timeFrom = parseInContextUrl(url, 'timeFrom');\n const timeTo = parseInContextUrl(url, 'timeTo');\n parseTimeRange(timeFrom, timeTo, reportDefinitionRequest);\n\n if (!unmounted) {\n setStart(timeFrom);\n setEnd(timeTo);\n }\n } else {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${id}`).then(async response => {\n let duration = response.report_definition.report_params.core_params.time_duration;\n duration = moment.duration(duration);\n setDefaultEditTimeRange(duration, unmounted);\n }).catch(error => {\n console.error('error in fetching report definition details:', error);\n });\n } else {\n parseTimeRange(start, end, reportDefinitionRequest);\n }\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n\n const onTimeChange = ({\n start,\n end\n }) => {\n isValidTimeRange(dateMath.parse(start), 'start', handleInvalidTimeRangeToast);\n isValidTimeRange(dateMath.parse(end, {\n roundUp: true\n }), 'end', handleInvalidTimeRangeToast);\n const recentlyUsedRange = recentlyUsedRanges.filter(recentlyUsedRange => {\n const isDuplicate = recentlyUsedRange.start === start && recentlyUsedRange.end === end;\n return !isDuplicate;\n });\n const validEndDate = checkValidAbsoluteEndDate(end);\n\n if (!validEndDate) {\n handleInvalidTimeRangeToast();\n return;\n }\n\n recentlyUsedRange.unshift({\n start,\n end\n });\n setStart(start);\n setEnd(end);\n setRecentlyUsedRanges(recentlyUsedRange.length > 10 ? recentlyUsedRange.slice(0, 9) : recentlyUsedRange);\n setIsLoading(true);\n startLoading();\n parseTimeRange(start, end, reportDefinitionRequest);\n };\n\n const parseTimeRange = (start, end, reportDefinitionRequest) => {\n timeRange.timeFrom = dateMath.parse(start);\n timeRange.timeTo = dateMath.parse(end);\n const timeDuration = moment.duration(dateMath.parse(end).diff(dateMath.parse(start)));\n reportDefinitionRequest.report_params.core_params.time_duration = timeDuration.toISOString();\n };\n\n const startLoading = () => {\n setTimeout(stopLoading, 1000);\n };\n\n const stopLoading = () => {\n setIsLoading(false);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Time range\",\n helpText: \"Time range is relative to the report creation date on the report trigger.\",\n isInvalid: showTimeRangeError,\n error: 'Invalid time range selected.'\n }, /*#__PURE__*/React.createElement(EuiSuperDatePicker, {\n isDisabled: false,\n isLoading: isLoading,\n start: start,\n end: end,\n onTimeChange: onTimeChange,\n showUpdateButton: false,\n commonlyUsedRanges: commonTimeRanges\n }))), /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiGlobalToastList, {\n toasts: toasts,\n dismissToast: removeToast,\n toastLifeTimeMs: 6000\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nexport { ReportTrigger } from './report_trigger';","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React, { useEffect, useState } from 'react';\nimport { EuiPageHeader, EuiTitle, EuiPageContent, EuiPageContentBody, EuiHorizontalRule, EuiFormRow, EuiRadioGroup, EuiDatePicker, EuiSelect, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiText, EuiFieldText, EuiCheckboxGroup, EuiLink, EuiFieldNumber } from '@elastic/eui';\nimport moment from 'moment';\nimport { SCHEDULE_RECURRING_OPTIONS, INTERVAL_TIME_PERIODS, WEEKLY_CHECKBOX_OPTIONS, MONTHLY_ON_THE_OPTIONS, TRIGGER_TYPE_OPTIONS, SCHEDULE_TYPE_OPTIONS, TIMEZONE_OPTIONS } from './report_trigger_constants';\nimport { TimezoneSelect } from './timezone';\nexport function ReportTrigger(props) {\n const {\n edit,\n editDefinitionId,\n reportDefinitionRequest,\n httpClientProps,\n showTriggerIntervalNaNError,\n showCronError\n } = props;\n const [reportTriggerType, setReportTriggerType] = useState(TRIGGER_TYPE_OPTIONS[0].id);\n const [scheduleType, setScheduleType] = useState(SCHEDULE_TYPE_OPTIONS[0].label); //TODO: should read local timezone and display\n\n const [scheduleRecurringFrequency, setScheduleRecurringFrequency] = useState('daily');\n const [recurring, setRecurringTime] = useState(moment());\n const [weeklyCheckbox, setWeeklyCheckbox] = useState({\n ['monCheckbox']: true\n });\n const [monthlySelect, setMonthlySelect] = useState(MONTHLY_ON_THE_OPTIONS[0].value);\n\n const handleReportTriggerType = e => {\n setReportTriggerType(e);\n reportDefinitionRequest.trigger.trigger_type = e;\n\n if (e === 'On demand') {\n delete reportDefinitionRequest.trigger.trigger_params;\n }\n };\n\n const handleScheduleType = e => {\n setScheduleType(e);\n\n if (e === SCHEDULE_TYPE_OPTIONS[1].label) {\n delete reportDefinitionRequest.trigger.trigger_params.schedule.interval;\n } else if (e === SCHEDULE_TYPE_OPTIONS[0].label) {\n delete reportDefinitionRequest.trigger.trigger_params.schedule.cron;\n }\n };\n\n const handleScheduleRecurringFrequency = e => {\n setScheduleRecurringFrequency(e.target.value);\n reportDefinitionRequest.trigger.trigger_params.schedule_type = e.target.value;\n };\n\n const handleRecurringTime = e => {\n setRecurringTime(e);\n };\n\n const handleWeeklyCheckbox = e => {\n const newCheckboxIdToSelectedMap = { ...weeklyCheckbox,\n ...{\n [e]: !weeklyCheckbox[e]\n }\n };\n setWeeklyCheckbox(newCheckboxIdToSelectedMap);\n };\n\n const handleMonthlySelect = e => {\n setMonthlySelect(e.target.value);\n };\n\n const RequestTime = () => {\n useEffect(() => {\n let recurringDaily = {\n interval: {\n period: 1,\n unit: 'DAYS',\n start_time: recurring.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurring.valueOf(),\n schedule: recurringDaily\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurring,\n onChange: handleRecurringTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const RecurringDaily = () => {\n const [recurringDailyTime, setRecurringDailyTime] = useState(moment());\n\n const handleRecurringDailyTime = e => {\n setRecurringDailyTime(e);\n reportDefinitionRequest.trigger.trigger_params.schedule.interval.start_time = e.valueOf();\n };\n\n const setDailyParams = () => {\n let recurringDaily = {\n interval: {\n period: 1,\n unit: 'DAYS',\n start_time: recurringDailyTime.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurringDailyTime.valueOf(),\n schedule: recurringDaily\n };\n };\n\n const isDailySchedule = response => {\n return response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id && response.report_definition.trigger.trigger_params.schedule.interval.period === 1 && response.report_definition.trigger.trigger_params.schedule.interval === 'DAYS';\n };\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n // if switching from on demand to schedule\n if (response.report_definition.trigger.trigger_type === 'On demand') {\n setDailyParams();\n } else if (isDailySchedule(response)) {\n const date = moment(response.report_definition.trigger.trigger_params.schedule.interval.start_time);\n\n if (!unmounted) {\n setRecurringDailyTime(date);\n }\n } // if switching from on-demand to schedule\n else if (reportDefinitionRequest.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n setDailyParams();\n }\n });\n } else {\n setDailyParams();\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurringDailyTime,\n onChange: handleRecurringDailyTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const RecurringInterval = () => {\n const [intervalText, setIntervalText] = useState('');\n const [intervalTimePeriod, setIntervalTimePeriod] = useState(INTERVAL_TIME_PERIODS[0].value);\n const [recurringIntervalTime, setRecurringIntervalTime] = useState(moment());\n\n const handleRecurringIntervalTime = e => {\n setRecurringIntervalTime(e);\n reportDefinitionRequest.trigger.trigger_params.schedule.interval.start_time = e.valueOf();\n };\n\n const handleIntervalText = e => {\n setIntervalText(e.target.value);\n };\n\n const handleIntervalTimePeriod = e => {\n setIntervalTimePeriod(e.target.value);\n };\n\n useEffect(() => {\n let interval = {\n interval: {\n period: parseInt(intervalText, 10),\n unit: intervalTimePeriod,\n start_time: recurringIntervalTime.valueOf()\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: recurringIntervalTime.valueOf(),\n schedule: interval\n };\n }, [intervalTimePeriod, intervalText]); // second useEffect() only to be triggered before render when on Edit\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n if (response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n const date = moment(response.report_definition.trigger.trigger_params.schedule.interval.start_time);\n\n if (!unmounted) {\n setRecurringIntervalTime(date);\n setIntervalText(response.report_definition.trigger.trigger_params.schedule.interval.period.toString());\n setIntervalTimePeriod(response.report_definition.trigger.trigger_params.schedule.interval.unit);\n }\n }\n });\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Every\",\n isInvalid: showTriggerIntervalNaNError,\n error: 'Interval must be a number.'\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: \"Must be a number\",\n value: intervalText,\n onChange: handleIntervalText\n })), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiFormRow, null, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"intervalTimeUnit\",\n options: INTERVAL_TIME_PERIODS,\n value: intervalTimePeriod,\n onChange: handleIntervalTimePeriod\n }))))), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Start time\"\n }, /*#__PURE__*/React.createElement(EuiDatePicker, {\n showTimeSelect: true,\n showTimeSelectOnly: true,\n selected: recurringIntervalTime,\n onChange: handleRecurringIntervalTime,\n dateFormat: \"HH:mm\",\n timeFormat: \"HH:mm\"\n })));\n };\n\n const RecurringWeekly = () => {\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Every\"\n }, /*#__PURE__*/React.createElement(EuiCheckboxGroup, {\n options: WEEKLY_CHECKBOX_OPTIONS,\n idToSelectedMap: weeklyCheckbox,\n onChange: handleWeeklyCheckbox\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(RequestTime, null));\n };\n\n const RecurringMonthly = () => {\n const [monthlyDayNumber, setMonthlyDayNumber] = useState('');\n\n const handleMonthlyDayNumber = e => {\n setMonthlyDayNumber(e.target.value);\n };\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"On the\"\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, null, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"monthlySelect\",\n options: MONTHLY_ON_THE_OPTIONS,\n value: monthlySelect,\n onChange: handleMonthlySelect\n })), /*#__PURE__*/React.createElement(EuiFlexItem, null, /*#__PURE__*/React.createElement(EuiFieldNumber, {\n placeholder: 'Day of month',\n value: monthlyDayNumber,\n onChange: handleMonthlyDayNumber\n })))), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"s\"\n }), /*#__PURE__*/React.createElement(RequestTime, null));\n };\n\n const CronExpression = () => {\n const [cronExpression, setCronExpression] = useState('');\n\n const handleCronExpression = e => {\n setCronExpression(e.target.value);\n reportDefinitionRequest.trigger.trigger_params.schedule.cron.expression = e.target.value;\n };\n\n const setCronParams = () => {\n let cron = {\n cron: {\n expression: '',\n timezone: TIMEZONE_OPTIONS[0].value\n }\n };\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n enabled_time: Date.now().valueOf(),\n schedule: cron\n };\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n // if switching from on demand to schedule\n if (response.report_definition.trigger.trigger_type === 'On demand') {\n setCronParams();\n } else if (response.report_definition.trigger.trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[1].id) {\n setCronExpression(response.report_definition.trigger.trigger_params.schedule.cron.expression);\n } else {\n setCronParams();\n }\n });\n } else {\n setCronParams();\n }\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Custom cron expression\",\n isInvalid: showCronError,\n error: 'Invalid cron expression.',\n labelAppend: /*#__PURE__*/React.createElement(EuiText, {\n size: \"xs\"\n }, /*#__PURE__*/React.createElement(EuiLink, {\n href: \"https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/cron/\",\n target: \"_blank\"\n }, \"Cron help\"))\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n placeholder: 'Ex: 0 12 * * * (Fire at 12:00 PM (noon) every day)',\n value: cronExpression,\n onChange: handleCronExpression\n })), /*#__PURE__*/React.createElement(EuiSpacer, null));\n };\n\n const ScheduleTriggerRecurring = () => {\n const display_daily = scheduleRecurringFrequency === 'daily' ? /*#__PURE__*/React.createElement(RecurringDaily, null) : null;\n const display_interval = scheduleRecurringFrequency === 'byInterval' ? /*#__PURE__*/React.createElement(RecurringInterval, null) : null;\n const display_weekly = scheduleRecurringFrequency === 'weekly' ? /*#__PURE__*/React.createElement(RecurringWeekly, null) : null;\n const display_monthly = scheduleRecurringFrequency === 'monthly' ? /*#__PURE__*/React.createElement(RecurringMonthly, null) : null;\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Frequency\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"recurringFrequencySelect\",\n options: SCHEDULE_RECURRING_OPTIONS,\n value: scheduleRecurringFrequency,\n onChange: handleScheduleRecurringFrequency\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), display_daily, display_interval, display_weekly, display_monthly);\n };\n\n const ScheduleTrigger = () => {\n const display_recurring = scheduleType === SCHEDULE_TYPE_OPTIONS[0].id ? /*#__PURE__*/React.createElement(ScheduleTriggerRecurring, null) : null;\n const display_cron = scheduleType === SCHEDULE_TYPE_OPTIONS[1].id ? /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(CronExpression, null), /*#__PURE__*/React.createElement(TimezoneSelect, {\n reportDefinitionRequest: reportDefinitionRequest,\n httpClientProps: httpClientProps,\n edit: edit,\n editDefinitionId: editDefinitionId\n })) : null;\n useEffect(() => {\n // Set default trigger_type\n SCHEDULE_TYPE_OPTIONS.map(item => {\n if (item.id === scheduleType) {\n reportDefinitionRequest.trigger.trigger_params = { ...reportDefinitionRequest.trigger.trigger_params,\n schedule_type: item.id //TODO: need better handle\n\n };\n\n if (!edit) {\n reportDefinitionRequest.trigger.trigger_params.enabled = true;\n }\n\n if (!('enabled' in reportDefinitionRequest.trigger.trigger_params)) {\n reportDefinitionRequest.trigger.trigger_params.enabled = true;\n }\n }\n });\n }, [scheduleType]);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Request time\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: SCHEDULE_TYPE_OPTIONS,\n idSelected: scheduleType,\n onChange: handleScheduleType\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), display_recurring, display_cron);\n };\n\n const schedule = reportTriggerType === 'Schedule' ? /*#__PURE__*/React.createElement(ScheduleTrigger, null) : null;\n\n const defaultEditTriggerType = trigger_type => {\n let index = 0;\n\n for (index; index < TRIGGER_TYPE_OPTIONS.length; ++index) {\n if (TRIGGER_TYPE_OPTIONS[index].id === trigger_type) {\n setReportTriggerType(TRIGGER_TYPE_OPTIONS[index].id);\n }\n }\n };\n\n const defaultEditRequestType = trigger => {\n let index = 0;\n\n for (index; index < SCHEDULE_TYPE_OPTIONS.length; ++index) {\n if (SCHEDULE_TYPE_OPTIONS[index].id === trigger.trigger_params.schedule_type) {\n setScheduleType(SCHEDULE_TYPE_OPTIONS[index].id);\n }\n }\n };\n\n const defaultEditScheduleFrequency = trigger_params => {\n if (trigger_params.schedule_type === SCHEDULE_TYPE_OPTIONS[0].id) {\n if (trigger_params.schedule.interval.unit === 'DAYS') {\n setScheduleRecurringFrequency('daily');\n } else {\n setScheduleRecurringFrequency('byInterval');\n }\n }\n };\n\n const defaultConfigurationEdit = trigger => {\n defaultEditTriggerType(trigger.trigger_type);\n\n if (trigger.trigger_type === 'Schedule') {\n defaultEditScheduleFrequency(trigger.trigger_params);\n defaultEditRequestType(trigger);\n } else if (trigger.trigger_type == 'On demand') {\n setReportTriggerType('On demand');\n reportDefinitionRequest.trigger.trigger_type = 'On demand';\n }\n };\n\n useEffect(() => {\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n defaultConfigurationEdit(response.report_definition.trigger);\n reportDefinitionRequest.trigger = response.report_definition.trigger;\n });\n } // Set default trigger_type for create new report definition\n else {\n TRIGGER_TYPE_OPTIONS.map(item => {\n if (item.id === reportTriggerType) {\n reportDefinitionRequest.trigger.trigger_type = item.id;\n }\n });\n }\n }, []);\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n panelPaddingSize: 'l'\n }, /*#__PURE__*/React.createElement(EuiPageHeader, null, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Report trigger\"))), /*#__PURE__*/React.createElement(EuiHorizontalRule, null), /*#__PURE__*/React.createElement(EuiPageContentBody, null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Trigger type\",\n id: \"reportDefinitionTriggerTypes\"\n }, /*#__PURE__*/React.createElement(EuiRadioGroup, {\n options: TRIGGER_TYPE_OPTIONS,\n idSelected: reportTriggerType,\n onChange: handleReportTriggerType\n })), /*#__PURE__*/React.createElement(EuiSpacer, null), schedule));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport moment from 'moment-timezone';\nexport const TRIGGER_TYPE_OPTIONS = [{\n id: 'On demand',\n label: 'On demand'\n}, {\n id: 'Schedule',\n label: 'Schedule'\n}];\nexport const SCHEDULE_TYPE_OPTIONS = [{\n id: 'Recurring',\n label: 'Recurring'\n}, {\n id: 'Cron based',\n label: 'Cron-based'\n}];\nexport const SCHEDULE_RECURRING_OPTIONS = [{\n value: 'daily',\n text: 'Daily'\n}, {\n value: 'byInterval',\n text: 'By interval'\n} // TODO: disable on UI. Add them back once we support\n// {\n// value: 'weekly',\n// text: 'Weekly',\n// },\n// {\n// value: 'monthly',\n// text: 'Monthly',\n// },\n];\nexport const INTERVAL_TIME_PERIODS = [{\n value: 'MINUTES',\n text: 'Minutes'\n}, {\n value: 'HOURS',\n text: 'Hours'\n}, {\n value: 'DAYS',\n text: 'Days'\n}];\nexport const WEEKLY_CHECKBOX_OPTIONS = [{\n id: 'monCheckbox',\n label: 'Mon'\n}, {\n id: 'tueCheckbox',\n label: 'Tue'\n}, {\n id: 'wedCheckbox',\n label: 'Wed'\n}, {\n id: 'thuCheckbox',\n label: 'Thu'\n}, {\n id: 'friCheckbox',\n label: 'Fri'\n}, {\n id: 'satCheckbox',\n label: 'Sat'\n}, {\n id: 'sunCheckbox',\n label: 'Sun'\n}];\nexport const MONTHLY_ON_THE_OPTIONS = [{\n value: 'day',\n text: 'Day'\n}];\nexport const TIMEZONE_OPTIONS = moment.tz.names().map(tz => ({\n value: tz,\n text: tz\n}));","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { EuiFormRow, EuiSelect } from '@elastic/eui';\nimport React, { useState, useEffect } from 'react';\nimport { TIMEZONE_OPTIONS } from './report_trigger_constants';\nexport function TimezoneSelect(props) {\n const {\n reportDefinitionRequest,\n httpClientProps,\n edit,\n editDefinitionId\n } = props;\n const [timezone, setTimezone] = useState(TIMEZONE_OPTIONS[0].value);\n\n const handleTimezone = e => {\n setTimezone(e.target.value);\n\n if (reportDefinitionRequest.trigger.trigger_params.schedule_type === 'Cron based') {\n reportDefinitionRequest.trigger.trigger_params.schedule.cron.timezone = e.target.value;\n }\n };\n\n useEffect(() => {\n let unmounted = false;\n\n if (edit) {\n httpClientProps.get(`../api/reporting/reportDefinitions/${editDefinitionId}`).then(async response => {\n if (!unmounted && reportDefinitionRequest.trigger.trigger_params.schedule_type === 'Cron based') {\n setTimezone(response.report_definition.trigger.trigger_params.schedule.cron.timezone);\n }\n });\n }\n\n return () => {\n unmounted = true;\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Timezone\"\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n id: \"setTimezone\",\n options: TIMEZONE_OPTIONS,\n value: timezone,\n onChange: handleTimezone\n })));\n}","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport Showdown from 'showdown';\nexport const converter = new Showdown.Converter({\n tables: true,\n simplifiedAutoLink: true,\n strikethrough: true,\n tasklists: true,\n noHeaderId: true\n});","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport { isValidCron } from \"cron-validator\";\nimport moment from \"moment\";\nexport const definitionInputValidation = async (metadata, error, setShowSettingsReportNameError, setSettingsReportNameErrorMessage, setShowTriggerIntervalNaNError, timeRange, setShowTimeRangeError, setShowCronError, setShowEmailRecipientsError, setEmailRecipientsErrorMessage) => {\n // check report name\n // allow a-z, A-Z, 0-9, (), [], ',' - and _ and spaces\n let regexp = /^[\\w\\-\\s\\(\\)\\[\\]\\,\\_\\-+]+$/;\n\n if (metadata.report_params.report_name.search(regexp) === -1) {\n setShowSettingsReportNameError(true);\n\n if (metadata.report_params.report_name === '') {\n setSettingsReportNameErrorMessage('Name must not be empty.');\n } else {\n setSettingsReportNameErrorMessage('Invalid characters in report name.');\n }\n\n error = true;\n } // if recurring by interval and input is not a number\n\n\n if (metadata.trigger.trigger_type === 'Schedule' && metadata.trigger.trigger_params.schedule_type === 'Recurring') {\n let interval = parseInt(metadata.trigger.trigger_params.schedule.interval.period);\n\n if (isNaN(interval)) {\n setShowTriggerIntervalNaNError(true);\n error = true;\n }\n } // if time range is invalid\n\n\n const nowDate = new Date(moment.now());\n\n if (timeRange.timeFrom > timeRange.timeTo || timeRange.timeTo > nowDate) {\n setShowTimeRangeError(true);\n error = true;\n } // if cron based and cron input is invalid\n\n\n if (metadata.trigger.trigger_type === 'Schedule' && metadata.trigger.trigger_params.schedule_type === 'Cron based') {\n if (!isValidCron(metadata.trigger.trigger_params.schedule.cron.expression)) {\n setShowCronError(true);\n error = true;\n }\n } // if email delivery\n\n\n if (metadata.delivery.delivery_type === 'Channel') {\n // no recipients are listed\n if (metadata.delivery.delivery_params.recipients.length === 0) {\n setShowEmailRecipientsError(true);\n setEmailRecipientsErrorMessage('Email recipients list cannot be empty.');\n error = true;\n } // recipients have invalid email addresses: regexp checks format xxxxx@yyyy.zzz\n\n\n let emailRegExp = /\\S+@\\S+\\.\\S+/;\n let index;\n let recipients = metadata.delivery.delivery_params.recipients;\n\n for (index = 0; index < recipients.length; ++index) {\n if (recipients[0].search(emailRegExp) === -1) {\n setShowEmailRecipientsError(true);\n setEmailRecipientsErrorMessage('Invalid email addresses in recipients list.');\n error = true;\n }\n }\n }\n\n return error;\n};","/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\nimport React from \"react\";\nexport const permissionsMissingToast = action => {\n return {\n title: 'Error ' + action,\n color: 'danger',\n iconType: 'alert',\n id: 'permissionsMissingErrorToast' + action.replace(' ', ''),\n text: /*#__PURE__*/React.createElement(\"p\", null, \"Insufficient permissions. Reach out to your Kibana administrator.\")\n };\n};\nexport const permissionsMissingActions = {\n CHANGE_SCHEDULE_STATUS: 'changing schedule status.',\n DELETE_REPORT_DEFINITION: 'deleting report definition.',\n GENERATING_REPORT: 'generating report.',\n LOADING_REPORTS_TABLE: 'loading reports table.',\n LOADING_DEFINITIONS_TABLE: 'loading report definitions table.',\n VIEWING_EDIT_PAGE: 'viewing edit page.',\n UPDATING_DEFINITION: 'updating report definition',\n CREATING_REPORT_DEFINITION: 'creating new report definition.'\n};"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7eA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxNA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3EA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnJA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClRA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7HA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1LA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7cA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/kibana-reports/target/public/opendistro_kibana_reports.plugin.js b/kibana-reports/target/public/opendistro_kibana_reports.plugin.js index ad709a6b..2d25110d 100644 --- a/kibana-reports/target/public/opendistro_kibana_reports.plugin.js +++ b/kibana-reports/target/public/opendistro_kibana_reports.plugin.js @@ -201,10879 +201,10027 @@ /************************************************************************/ /******/ ({ -/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/src/index.js?!../../node_modules/resolve-url-loader/index.js?!../../node_modules/sass-loader/dist/cjs.js?!./public/index.scss?v7dark": -/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** /Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-0-1!/Users/szhongna/Desktop/reporting/kibana/node_modules/postcss-loader/src??ref--6-oneOf-0-2!/Users/szhongna/Desktop/reporting/kibana/node_modules/resolve-url-loader??ref--6-oneOf-0-3!/Users/szhongna/Desktop/reporting/kibana/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-0-4!./public/index.scss?v7dark ***! - \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, "/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n.react-mde .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 12px 4px 0px;\n background-color: transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n padding: 0 16px;\n min-height: 30px; }\n .react-mde .mde-header .mde-tabs button.selected {\n border-top: none;\n border-left: none;\n border-right: none;\n border-bottom: 3px solid #006bb4; }\n .react-mde .mde-header .mde-tabs button:first-child {\n margin-left: 0px; }\n\n.mde-preview-content ul {\n list-style: disc; }\n\n.mde-preview-content ol {\n list-style: decimal; }\n", "",{"version":3,"sources":["index.scss"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;EAaE;AACF;EACE,kBAAkB;EAClB,oBAAoB;EACpB,6BAA6B;EAC7B,oCAAoC;EACpC,eAAe;EACf,eAAe;EACf,gBAAgB,EAAE;EAClB;IACE,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,gCAAgC,EAAE;EACpC;IACE,gBAAgB,EAAE;;AAEtB;EACE,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB,EAAE","file":"index.scss?v7dark","sourcesContent":["/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n.react-mde .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 12px 4px 0px;\n background-color: transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n padding: 0 16px;\n min-height: 30px; }\n .react-mde .mde-header .mde-tabs button.selected {\n border-top: none;\n border-left: none;\n border-right: none;\n border-bottom: 3px solid #006bb4; }\n .react-mde .mde-header .mde-tabs button:first-child {\n margin-left: 0px; }\n\n.mde-preview-content ul {\n list-style: disc; }\n\n.mde-preview-content ol {\n list-style: decimal; }\n"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/src/index.js?!../../node_modules/resolve-url-loader/index.js?!../../node_modules/sass-loader/dist/cjs.js?!./public/index.scss?v7light": -/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** /Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!/Users/szhongna/Desktop/reporting/kibana/node_modules/postcss-loader/src??ref--6-oneOf-1-2!/Users/szhongna/Desktop/reporting/kibana/node_modules/resolve-url-loader??ref--6-oneOf-1-3!/Users/szhongna/Desktop/reporting/kibana/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-4!./public/index.scss?v7light ***! - \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, "/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n.react-mde .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 12px 4px 0px;\n background-color: transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n padding: 0 16px;\n min-height: 30px; }\n .react-mde .mde-header .mde-tabs button.selected {\n border-top: none;\n border-left: none;\n border-right: none;\n border-bottom: 3px solid #006bb4; }\n .react-mde .mde-header .mde-tabs button:first-child {\n margin-left: 0px; }\n\n.mde-preview-content ul {\n list-style: disc; }\n\n.mde-preview-content ol {\n list-style: decimal; }\n", "",{"version":3,"sources":["index.scss"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;EAaE;AACF;EACE,kBAAkB;EAClB,oBAAoB;EACpB,6BAA6B;EAC7B,oCAAoC;EACpC,eAAe;EACf,eAAe;EACf,gBAAgB,EAAE;EAClB;IACE,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,gCAAgC,EAAE;EACpC;IACE,gBAAgB,EAAE;;AAEtB;EACE,gBAAgB,EAAE;;AAEpB;EACE,mBAAmB,EAAE","file":"index.scss?v7light","sourcesContent":["/*\n * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file except in compliance with the License.\n * A copy of the License is located at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * or in the \"license\" file accompanying this file. This file is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n * express or implied. See the License for the specific language governing\n * permissions and limitations under the License.\n */\n.react-mde .mde-header .mde-tabs button {\n border-radius: 2px;\n margin: 12px 4px 0px;\n background-color: transparent;\n border-bottom: 3px solid transparent;\n cursor: pointer;\n padding: 0 16px;\n min-height: 30px; }\n .react-mde .mde-header .mde-tabs button.selected {\n border-top: none;\n border-left: none;\n border-right: none;\n border-bottom: 3px solid #006bb4; }\n .react-mde .mde-header .mde-tabs button:first-child {\n margin-left: 0px; }\n\n.mde-preview-content ul {\n list-style: disc; }\n\n.mde-preview-content ol {\n list-style: decimal; }\n"]}]); -// Exports -module.exports = exports; +/***/ "../../.kibana-reports/kibana-reports/common/index.ts": +/*!************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/common/index.ts ***! + \************************************************************************************************/ +/*! exports provided: PLUGIN_ID, PLUGIN_NAME, API_PREFIX, NOTIFICATION_API, ES_REPORTS_API */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLUGIN_ID", function() { return PLUGIN_ID; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLUGIN_NAME", function() { return PLUGIN_NAME; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_PREFIX", function() { return API_PREFIX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_API", function() { return NOTIFICATION_API; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ES_REPORTS_API", function() { return ES_REPORTS_API; }); +/* + * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ +const PLUGIN_ID = 'opendistro_kibana_reports'; +const PLUGIN_NAME = 'opendistro_kibana_reports'; +const API_PREFIX = '/api/reporting'; +const NOTIFICATION_API = { + SEND: '/_opendistro/_notifications/send' +}; +const BASE_REPORTS_URI = '/_opendistro/_reports'; +const ES_REPORTS_API = { + ON_DEMAND_REPORT: `${BASE_REPORTS_URI}/on_demand`, + REPORT_INSTANCE: `${BASE_REPORTS_URI}/instance`, + LIST_REPORT_INSTANCES: `${BASE_REPORTS_URI}/instances`, + REPORT_DEFINITION: `${BASE_REPORTS_URI}/definition`, + LIST_REPORT_DEFINITIONS: `${BASE_REPORTS_URI}/definitions`, + POLL_REPORT_INSTANCE: `${BASE_REPORTS_URI}/poll_instance` +}; /***/ }), -/***/ "../../node_modules/css-loader/dist/runtime/api.js": -/*!********************************************************************************************!*\ - !*** /Users/szhongna/Desktop/reporting/kibana/node_modules/css-loader/dist/runtime/api.js ***! - \********************************************************************************************/ +/***/ "../../.kibana-reports/kibana-reports/node_modules/babel-polyfill/lib/index.js": +/*!*************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/lib/index.js ***! + \*************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/* WEBPACK VAR INJECTION */(function(global) { +__webpack_require__(/*! core-js/shim */ "../../.kibana-reports/kibana-reports/node_modules/core-js/shim.js"); -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names -module.exports = function (useSourceMap) { - var list = []; // return the list of modules as css string - - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); +__webpack_require__(/*! regenerator-runtime/runtime */ "../../.kibana-reports/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js"); - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); - } +__webpack_require__(/*! core-js/fn/regexp/escape */ "../../.kibana-reports/kibana-reports/node_modules/core-js/fn/regexp/escape.js"); - return content; - }).join(''); - }; // import a list of modules into the list - // eslint-disable-next-line func-names +if (global._babelPolyfill) { + throw new Error("only one instance of babel-polyfill is allowed"); +} +global._babelPolyfill = true; +var DEFINE_PROPERTY = "defineProperty"; +function define(O, key, value) { + O[key] || Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value + }); +} - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === 'string') { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, '']]; - } +define(String.prototype, "padLeft", "".padStart); +define(String.prototype, "padRight", "".padEnd); - var alreadyImportedModules = {}; +"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); +}); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"))) - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; +/***/ }), - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } +/***/ "../../.kibana-reports/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js": +/*!********************************************************************************************************************************************************!*\ + !*** /Users/lijshu/Projects/7.9.1/kibana-7.9.1/.kibana-reports/kibana-reports/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js ***! + \********************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } +!(function(global) { + "use strict"; - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - list.push(item); + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; } - }; + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } - return list; -}; + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); - var cssMapping = item[3]; + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); - if (!cssMapping) { - return content; + return generator; } + runtime.wrap = wrap; - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); - }); - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } } - return [content].join('\n'); -} // Adapted from convert-source-map (MIT) - + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); - return "/*# ".concat(data, " */"); -} + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; -/***/ }), + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} -/***/ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": -/*!*******************************************************************************************************************!*\ - !*** /Users/szhongna/Desktop/reporting/kibana/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! - \*******************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; -"use strict"; + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; -var isOldIE = function isOldIE() { - var memo; - return function memorize() { - if (typeof memo === 'undefined') { - // Test for IE <= 9 as proposed by Browserhacks - // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 - // Tests for existence of standard globals is to allow style-loader - // to operate correctly into non-standard environments - // @see https://github.com/webpack-contrib/style-loader/issues/177 - memo = Boolean(window && document && document.all && !window.atob); - } + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } - return memo; + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; }; -}(); - -var getTarget = function getTarget() { - var memo = {}; - return function memorize(target) { - if (typeof memo[target] === 'undefined') { - var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch (e) { - // istanbul ignore next - styleTarget = null; - } + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; } - - memo[target] = styleTarget; } - - return memo[target]; + genFun.prototype = Object.create(Gp); + return genFun; }; -}(); -var stylesInDom = []; + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; -function getIndexByIdentifier(identifier) { - var result = -1; + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } - for (var i = 0; i < stylesInDom.length; i++) { - if (stylesInDom[i].identifier === identifier) { - result = i; - break; + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } } - } - return result; -} + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } -function modulesToDom(list, options) { - var idCountMap = {}; - var identifiers = []; + var previousPromise; - for (var i = 0; i < list.length; i++) { - var item = list[i]; - var id = options.base ? item[0] + options.base : item[0]; - var count = idCountMap[id] || 0; - var identifier = "".concat(id, " ").concat(count); - idCountMap[id] = count + 1; - var index = getIndexByIdentifier(identifier); - var obj = { - css: item[1], - media: item[2], - sourceMap: item[3] - }; + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } - if (index !== -1) { - stylesInDom[index].references++; - stylesInDom[index].updater(obj); - } else { - stylesInDom.push({ - identifier: identifier, - updater: addStyle(obj, options), - references: 1 - }); + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); } - identifiers.push(identifier); + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; } - return identifiers; -} + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; -function insertStyleElement(options) { - var style = document.createElement('style'); - var attributes = options.attributes || {}; + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); - if (typeof attributes.nonce === 'undefined') { - var nonce = true ? __webpack_require__.nc : undefined; + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; - if (nonce) { - attributes.nonce = nonce; - } - } + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; - Object.keys(attributes).forEach(function (key) { - style.setAttribute(key, attributes[key]); - }); + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } - if (typeof options.insert === 'function') { - options.insert(style); - } else { - var target = getTarget(options.insert || 'head'); + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } - if (!target) { - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); - } + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } - target.appendChild(style); - } + context.method = method; + context.arg = arg; - return style; -} + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } -function removeStyleElement(style) { - // istanbul ignore if - if (style.parentNode === null) { - return false; - } + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; - style.parentNode.removeChild(style); -} -/* istanbul ignore next */ + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + context.dispatchException(context.arg); -var replaceText = function replaceText() { - var textStore = []; - return function replace(index, replacement) { - textStore[index] = replacement; - return textStore.filter(Boolean).join('\n'); - }; -}(); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } -function applyToSingletonTag(style, index, remove, obj) { - var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + state = GenStateExecuting; - /* istanbul ignore if */ + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; - if (style.styleSheet) { - style.styleSheet.cssText = replaceText(index, css); - } else { - var cssNode = document.createTextNode(css); - var childNodes = style.childNodes; + if (record.arg === ContinueSentinel) { + continue; + } - if (childNodes[index]) { - style.removeChild(childNodes[index]); - } + return { + value: record.arg, + done: context.done + }; - if (childNodes.length) { - style.insertBefore(cssNode, childNodes[index]); - } else { - style.appendChild(cssNode); - } + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; } -} - -function applyToTag(style, options, obj) { - var css = obj.css; - var media = obj.media; - var sourceMap = obj.sourceMap; - if (media) { - style.setAttribute('media', media); - } else { - style.removeAttribute('media'); - } + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; - if (sourceMap && btoa) { - css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); - } // For old IE + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); - /* istanbul ignore if */ + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - while (style.firstChild) { - style.removeChild(style.firstChild); + return ContinueSentinel; } - style.appendChild(document.createTextNode(css)); - } -} + var record = tryCatch(method, delegate.iterator, context.arg); -var singleton = null; -var singletonCounter = 0; + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } -function addStyle(obj, options) { - var style; - var update; - var remove; + var info = record.arg; - if (options.singleton) { - var styleIndex = singletonCounter++; - style = singleton || (singleton = insertStyleElement(options)); - update = applyToSingletonTag.bind(null, style, styleIndex, false); - remove = applyToSingletonTag.bind(null, style, styleIndex, true); - } else { - style = insertStyleElement(options); - update = applyToTag.bind(null, style, options); + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } - remove = function remove() { - removeStyleElement(style); - }; - } + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; - update(obj); - return function updateStyle(newObj) { - if (newObj) { - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { - return; + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; } - update(obj = newObj); } else { - remove(); + // Re-yield the result returned by the delegate method. + return info; } - }; -} - -module.exports = function (list, options) { - options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of